append gps data to counter data

This commit is contained in:
Klaus K Wilting 2018-12-28 20:23:17 +01:00
parent 5bdc354a07
commit 330b3045d4

View File

@ -43,6 +43,18 @@ 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);
#ifdef 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); SendPayload(COUNTERPORT);
// clear counter if not in cumulative counter mode // clear counter if not in cumulative counter mode
if (cfg.countermode != 1) { if (cfg.countermode != 1) {