removed gps data from counter payload
This commit is contained in:
parent
d3a7d35959
commit
7244596ded
@ -170,7 +170,6 @@ Hereafter described is the default *plain* format, which uses MSB bit numbering.
|
|||||||
|
|
||||||
byte 1-2: Number of unique pax, first seen on Wifi
|
byte 1-2: Number of unique pax, first seen on Wifi
|
||||||
byte 3-4: Number of unique pax, first seen on Bluetooth [omited if BT disabled]
|
byte 3-4: Number of unique pax, first seen on Bluetooth [omited if BT disabled]
|
||||||
bytes 5-17: GPS data, if present, in same format as for Port #4
|
|
||||||
|
|
||||||
**Port #2:** Device status query result
|
**Port #2:** Device status query result
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ void SendPayload(uint8_t port, sendprio_t prio) {
|
|||||||
memcpy(SendBuffer.Message, payload.getBuffer(), payload.getSize());
|
memcpy(SendBuffer.Message, payload.getBuffer(), payload.getSize());
|
||||||
|
|
||||||
// enqueue message in device's send queues
|
// enqueue message in device's send queues
|
||||||
#if(HAS_LORA)
|
#if (HAS_LORA)
|
||||||
lora_enqueuedata(&SendBuffer, prio);
|
lora_enqueuedata(&SendBuffer, prio);
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAS_SPI
|
#ifdef HAS_SPI
|
||||||
@ -62,18 +62,6 @@ void sendCounter() {
|
|||||||
payload.addCount(macs_wifi, MAC_SNIFF_WIFI);
|
payload.addCount(macs_wifi, MAC_SNIFF_WIFI);
|
||||||
if (cfg.blescan)
|
if (cfg.blescan)
|
||||||
payload.addCount(macs_ble, MAC_SNIFF_BLE);
|
payload.addCount(macs_ble, MAC_SNIFF_BLE);
|
||||||
|
|
||||||
#if(HAS_GPS)
|
|
||||||
if (gps.location.isValid()) { // send GPS position only if we have a fix
|
|
||||||
gps_read();
|
|
||||||
payload.addGPS(gps_status);
|
|
||||||
} else {
|
|
||||||
ESP_LOGD(
|
|
||||||
TAG,
|
|
||||||
"No valid GPS position. GPS data not appended to counter data.");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
SendPayload(COUNTERPORT, prio_normal);
|
SendPayload(COUNTERPORT, prio_normal);
|
||||||
// clear counter if not in cumulative counter mode
|
// clear counter if not in cumulative counter mode
|
||||||
if (cfg.countermode != 1) {
|
if (cfg.countermode != 1) {
|
||||||
@ -83,7 +71,7 @@ void sendCounter() {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#if(HAS_BME)
|
#if (HAS_BME)
|
||||||
case MEMS_DATA:
|
case MEMS_DATA:
|
||||||
payload.reset();
|
payload.reset();
|
||||||
payload.addBME(bme_status);
|
payload.addBME(bme_status);
|
||||||
@ -91,7 +79,7 @@ void sendCounter() {
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if(HAS_GPS)
|
#if (HAS_GPS)
|
||||||
case GPS_DATA:
|
case GPS_DATA:
|
||||||
// send GPS position only if we have a fix
|
// send GPS position only if we have a fix
|
||||||
if (gps.location.isValid()) {
|
if (gps.location.isValid()) {
|
||||||
@ -104,7 +92,7 @@ void sendCounter() {
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if(HAS_SENSORS)
|
#if (HAS_SENSORS)
|
||||||
case SENSOR1_DATA:
|
case SENSOR1_DATA:
|
||||||
payload.reset();
|
payload.reset();
|
||||||
payload.addSensor(sensor_read(1));
|
payload.addSensor(sensor_read(1));
|
||||||
@ -138,7 +126,7 @@ void sendCounter() {
|
|||||||
} // sendCounter()
|
} // sendCounter()
|
||||||
|
|
||||||
void flushQueues() {
|
void flushQueues() {
|
||||||
#if(HAS_LORA)
|
#if (HAS_LORA)
|
||||||
lora_queuereset();
|
lora_queuereset();
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAS_SPI
|
#ifdef HAS_SPI
|
||||||
|
Loading…
Reference in New Issue
Block a user