Bugfix: Cast longitude to longitude byte array

This commit is contained in:
Starbeamrainbowlabs 2019-07-09 13:11:31 +01:00
parent 321b154105
commit 7dba01bff1

View file

@ -28,12 +28,12 @@ void setup() {
GPSLocation gps_data = gps_fetch();
DISPLAY_FREE_MEMORY();
Serial.print(F("[main] Location ")); Serial.print(gps_data.lat); Serial.print(F(", ")); Serial.println(gps_data.lng);
// Serial.print(F("[main] Location ")); Serial.print(gps_data.lat); Serial.print(F(", ")); Serial.println(gps_data.lng);
uint32_t id = random_get();
Serial.print(F("[main] Id "));
Serial.println(id);
// Serial.print(F("[main] Id "));
// Serial.println(id);
// Activate microSD card breakout board on the SPI bus
@ -60,7 +60,7 @@ void setup() {
const uint8_t* bytes_id = reinterpret_cast<uint8_t const *>(&id);
const uint8_t* bytes_lat = reinterpret_cast<uint8_t const *>(&(gps_data.lat));
const uint8_t* bytes_lng = reinterpret_cast<uint8_t const *>(&(gps_data.lat));
const uint8_t* bytes_lng = reinterpret_cast<uint8_t const *>(&(gps_data.lng));
// for(int i = 0; i < sizeof(uint32_t); i++) {
// }