diff --git a/README.md b/README.md index 214e9d40..68fe86bd 100644 --- a/README.md +++ b/README.md @@ -180,7 +180,7 @@ Output of sensor and peripheral data is internally switched by a bitmask registe | 6 | User sensor 3 | on | 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 diff --git a/src/hal/octopus32.h b/src/hal/octopus32.h index f34f609b..19ed4ca5 100644 --- a/src/hal/octopus32.h +++ b/src/hal/octopus32.h @@ -9,6 +9,8 @@ // 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 // 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) #define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature diff --git a/src/main.cpp b/src/main.cpp index f1452fb1..6d96d7b9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -62,7 +62,7 @@ PMUIRQ -> PMU chip gpio -> irqHandlerTask (Core 1) fired by software (Ticker.h) TIMESYNC_IRQ -> timeSync() -> irqHandlerTask (Core 1) -CYLCIC_IRQ -> housekeeping() -> irqHandlerTask (Core 1) +CYCLIC_IRQ -> housekeeping() -> irqHandlerTask (Core 1) SENDCYCLE_IRQ -> sendcycle() -> irqHandlerTask (Core 1) BME_IRQ -> bmecycle() -> irqHandlerTask (Core 1) diff --git a/src/paxcounter.conf b/src/paxcounter.conf index d9b2990d..e4fe6a15 100644 --- a/src/paxcounter.conf +++ b/src/paxcounter.conf @@ -13,7 +13,6 @@ #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 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 #define VENDORFILTER 1 // set to 0 if you want to count things, not people @@ -93,7 +92,7 @@ #define RCMDPORT 2 // remote commands #define STATUSPORT 2 // remote command 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 BEACONPORT 6 // beacon alarms #define BMEPORT 7 // BME680 sensor diff --git a/src/senddata.cpp b/src/senddata.cpp index 4e230cb8..3df51b3c 100644 --- a/src/senddata.cpp +++ b/src/senddata.cpp @@ -70,7 +70,7 @@ void sendData() { if (cfg.blescan) payload.addCount(macs_ble, MAC_SNIFF_BLE); -#if (PAYLOAD_GPS) +#if (HAS_GPS) && (GPSPORT == 1) // send GPS position only if we have a fix if (gps.location.isValid()) { gpsStatus_t gps_status; @@ -102,7 +102,7 @@ void sendData() { break; #endif -#if (HAS_GPS) +#if (HAS_GPS) && (GPSPORT != 1) case GPS_DATA: // send GPS position only if we have a fix if (gps.location.isValid()) {