combined GPS data revised logic
This commit is contained in:
		
							parent
							
								
									52f293e04f
								
							
						
					
					
						commit
						2c102f69a9
					
				| @ -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 | ||||
| 
 | ||||
|  | ||||
| @ -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 | ||||
| @ -76,7 +75,7 @@ | ||||
| #define TIME_SYNC_INTERVAL_RETRY        10      // retry time sync after lost sync each .. minutes [default = 10], 0 means off | ||||
| #define TIME_SYNC_COMPILEDATE           0       // set to 1 to use compile date to initialize RTC after power outage [default = 0] | ||||
| #define TIME_SYNC_LORAWAN               0       // set to 1 to use LORA network as time source, 0 means off [default = 0] | ||||
| #define TIME_SYNC_LORASERVER            0       // set to 1 to use LORA timeserver as time source, 0 means off [default = 0] | ||||
| #define TIME_SYNC_LORASERVER            1       // set to 1 to use LORA timeserver as time source, 0 means off [default = 0] | ||||
| 
 | ||||
| // settings for syncing time with timeserver applications | ||||
| #define TIME_SYNC_SAMPLES               1       // number of time requests for averaging | ||||
| @ -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 | ||||
|  | ||||
| @ -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()) { | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user