changes opensensebox payload struct
This commit is contained in:
1 parent
494a9a3586
commit
032cfa0f8e
3 files changed
+2
-4
No files matched your search
@@ -76,11 +76,9 @@ void gps_storelocation(gpsStatus_t *gps_store) {
|
||||
(gps.location.age() < 1500)) {
|
||||
gps_store->latitude = (int32_t)(gps.location.lat() * 1e6);
|
||||
gps_store->longitude = (int32_t)(gps.location.lng() * 1e6);
|
||||
#if !(PAYLOAD_OPENSENSEBOX)
|
||||
gps_store->satellites = (uint8_t)gps.satellites.value();
|
||||
gps_store->hdop = (uint16_t)gps.hdop.value();
|
||||
gps_store->altitude = (int16_t)gps.altitude.meters();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -89,12 +89,14 @@ void PayloadConvert::addGPS(gpsStatus_t value) {
|
||||
buffer[cursor++] = (byte)((value.longitude & 0x00FF0000) >> 16);
|
||||
buffer[cursor++] = (byte)((value.longitude & 0x0000FF00) >> 8);
|
||||
buffer[cursor++] = (byte)((value.longitude & 0x000000FF));
|
||||
#if (!PAYLOAD_OPENSENSEBOX)
|
||||
buffer[cursor++] = value.satellites;
|
||||
buffer[cursor++] = highByte(value.hdop);
|
||||
buffer[cursor++] = lowByte(value.hdop);
|
||||
buffer[cursor++] = highByte(value.altitude);
|
||||
buffer[cursor++] = lowByte(value.altitude);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void PayloadConvert::addSensor(uint8_t buf[]) {
|
||||
|
||||
Reference in new issue
Block a user