Merge pull request #493 from cyberman54/development

combined gps payload
This commit is contained in:
Verkehrsrot 2019-11-19 21:33:14 +01:00 committed by GitHub
commit d5e9e78de5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 6 deletions

View File

@ -180,7 +180,7 @@ Output of sensor and peripheral data is internally switched by a bitmask registe
| 6 | User sensor 3 | on | 6 | User sensor 3 | on
| 7 | Batterylevel | off | 7 | Batterylevel | off
*) GPS data can also be combined with payload on port 1, #define PAYLOAD_GPS in paxcounter.conf to enable *) GPS data can also be combined with payload on port 1, *#define GPSPORT 1* in paxcounter.conf to enable
# Time sync # Time sync

View File

@ -9,6 +9,8 @@
// Hardware related definitions for #IoT Octopus32 with the Adafruit LoRaWAN Wing // Hardware related definitions for #IoT Octopus32 with the Adafruit LoRaWAN Wing
// You can use this configuration also with the Adafruit ESP32 Feather + the LoRaWAN Wing // You can use this configuration also with the Adafruit ESP32 Feather + the LoRaWAN Wing
// In this config we use the Adafruit OLED Wing which is only 128x32 pixel, need to find a smaller font // In this config we use the Adafruit OLED Wing which is only 128x32 pixel, need to find a smaller font
// NOTE: if LORA_IRQ and LORA_IO1 are tied to the same GPIO using diodes on the board,
// you must disable LMIC_USE_INTERRUPTS in lmic_config.h
// disable brownout detection (avoid unexpected reset on some boards) // disable brownout detection (avoid unexpected reset on some boards)
#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature #define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature

View File

@ -62,7 +62,7 @@ PMUIRQ -> PMU chip gpio -> irqHandlerTask (Core 1)
fired by software (Ticker.h) fired by software (Ticker.h)
TIMESYNC_IRQ -> timeSync() -> irqHandlerTask (Core 1) TIMESYNC_IRQ -> timeSync() -> irqHandlerTask (Core 1)
CYLCIC_IRQ -> housekeeping() -> irqHandlerTask (Core 1) CYCLIC_IRQ -> housekeeping() -> irqHandlerTask (Core 1)
SENDCYCLE_IRQ -> sendcycle() -> irqHandlerTask (Core 1) SENDCYCLE_IRQ -> sendcycle() -> irqHandlerTask (Core 1)
BME_IRQ -> bmecycle() -> irqHandlerTask (Core 1) BME_IRQ -> bmecycle() -> irqHandlerTask (Core 1)

View File

@ -13,7 +13,6 @@
#define SENDCYCLE 30 // payload send cycle [seconds/2], 0 .. 255 #define SENDCYCLE 30 // payload send cycle [seconds/2], 0 .. 255
#define PAYLOAD_ENCODER 2 // payload encoder: 1=Plain, 2=Packed, 3=Cayenne LPP dynamic, 4=Cayenne LPP packed #define PAYLOAD_ENCODER 2 // payload encoder: 1=Plain, 2=Packed, 3=Cayenne LPP dynamic, 4=Cayenne LPP packed
#define COUNTERMODE 0 // 0=cyclic, 1=cumulative, 2=cyclic confirmed #define COUNTERMODE 0 // 0=cyclic, 1=cumulative, 2=cyclic confirmed
#define PAYLOAD_GPS 1 // add gps location to pax count payload: 0=no, 1=yes
// Set this to include BLE counting and vendor filter functions, or to switch off WIFI counting // Set this to include BLE counting and vendor filter functions, or to switch off WIFI counting
#define VENDORFILTER 1 // set to 0 if you want to count things, not people #define VENDORFILTER 1 // set to 0 if you want to count things, not people
@ -93,7 +92,7 @@
#define RCMDPORT 2 // remote commands #define RCMDPORT 2 // remote commands
#define STATUSPORT 2 // remote command results #define STATUSPORT 2 // remote command results
#define CONFIGPORT 3 // config query results #define CONFIGPORT 3 // config query results
#define GPSPORT 4 // gps #define GPSPORT 4 // gps - set to 1 to send combined GPS+COUNT payload
#define BUTTONPORT 5 // button pressed signal #define BUTTONPORT 5 // button pressed signal
#define BEACONPORT 6 // beacon alarms #define BEACONPORT 6 // beacon alarms
#define BMEPORT 7 // BME680 sensor #define BMEPORT 7 // BME680 sensor

View File

@ -70,7 +70,7 @@ void sendData() {
if (cfg.blescan) if (cfg.blescan)
payload.addCount(macs_ble, MAC_SNIFF_BLE); payload.addCount(macs_ble, MAC_SNIFF_BLE);
#if (PAYLOAD_GPS) #if (HAS_GPS) && (GPSPORT == 1)
// 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()) {
gpsStatus_t gps_status; gpsStatus_t gps_status;
@ -102,7 +102,7 @@ void sendData() {
break; break;
#endif #endif
#if (HAS_GPS) #if (HAS_GPS) && (GPSPORT != 1)
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()) {