enable GPS default,fix SenseBox payload,whitespace

This commit is contained in:
nerdyscout 2019-11-27 20:26:03 +00:00
parent 6feb1c1f65
commit b7a640e02f
5 changed files with 12 additions and 10 deletions

View File

@ -171,7 +171,7 @@ Output of sensor and peripheral data is internally switched by a bitmask registe
| Bit | Sensordata | Default
| --- | ------------- | -------
| 0 | GPS | off*
| 0 | GPS* | on
| 1 | Beacon alarm | on
| 2 | BME280/680 | on
| 3 | Paxcounter | on

View File

@ -9,9 +9,9 @@ nvs_handle my_handle;
esp_err_t err;
#define PAYLOADMASK \
((ALARM_DATA | MEMS_DATA | COUNT_DATA | SENSOR1_DATA | SENSOR2_DATA | \
SENSOR3_DATA) & \
(~BATT_DATA) & (~GPS_DATA))
((GPS_DATA | ALARM_DATA | MEMS_DATA | COUNT_DATA | \
SENSOR1_DATA | SENSOR2_DATA | SENSOR3_DATA) & \
(~BATT_DATA) )
// populate cfg vars with factory settings
void defaultConfig() {

View File

@ -93,7 +93,7 @@
#define RCMDPORT 2 // remote commands
#define STATUSPORT 2 // remote command results
#define CONFIGPORT 3 // config query results
#define GPSPORT 4 // gps - set to 1 to send combined GPS+COUNT payload
#define GPSPORT 4 // gps - set to 1 to send combined GPS+COUNTERPORT payload
#define BUTTONPORT 5 // button pressed signal
#define BEACONPORT 6 // beacon alarms
#define BMEPORT 7 // BME680 sensor

View File

@ -195,10 +195,12 @@ void PayloadConvert::addStatus(uint16_t voltage, uint64_t uptime, float cputemp,
void PayloadConvert::addGPS(gpsStatus_t value) {
#if(HAS_GPS)
writeLatLng(value.latitude, value.longitude);
#if (!PAYLOAD_OPENSENSEBOX)
writeUint8(value.satellites);
writeUint16(value.hdop);
writeUint16(value.altitude);
#endif
#endif
}
void PayloadConvert::addSensor(uint8_t buf[]) {