This commit is contained in:
Klaus K Wilting 2020-10-09 16:42:53 +02:00
parent 4286e4b8b3
commit 287e8dbc20
2 changed files with 3 additions and 9 deletions

View File

@ -6,6 +6,7 @@
// Local logging tag
static const char TAG[] = __FILE__;
// default settings for device data to be sent
#define PAYLOADMASK \
((GPS_DATA | ALARM_DATA | MEMS_DATA | COUNT_DATA | SENSOR1_DATA | \
SENSOR2_DATA | SENSOR3_DATA) & \
@ -52,7 +53,7 @@ static void defaultConfig(configData_t *myconfig) {
myconfig->vendorfilter = VENDORFILTER; // 0=disabled, 1=enabled
myconfig->rgblum = RGBLUMINOSITY; // RGB Led luminosity (0..100%)
myconfig->monitormode = 0; // 0=disabled, 1=enabled
myconfig->payloadmask = PAYLOADMASK; // all payload switched on
myconfig->payloadmask = PAYLOADMASK; // payloads as defined in default
myconfig->enscount = 0; // 0=disabled, 1=enabled
#ifdef HAS_BME680

View File

@ -181,14 +181,7 @@ void PayloadConvert::addConfig(configData_t value) {
value.blescan ? true : false, value.wifiant ? true : false,
value.vendorfilter ? true : false,
value.monitormode ? true : false);
writeBitmap(value.payloadmask && GPS_DATA ? true : false,
value.payloadmask && ALARM_DATA ? true : false,
value.payloadmask && MEMS_DATA ? true : false,
value.payloadmask && COUNT_DATA ? true : false,
value.payloadmask && SENSOR1_DATA ? true : false,
value.payloadmask && SENSOR2_DATA ? true : false,
value.payloadmask && SENSOR3_DATA ? true : false,
value.payloadmask && BATT_DATA ? true : false);
writeUint8(value.payloadmask);
writeVersion(value.version);
}