diff --git a/src/configmanager.cpp b/src/configmanager.cpp index c55bd7ef..c8fecc2d 100644 --- a/src/configmanager.cpp +++ b/src/configmanager.cpp @@ -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 diff --git a/src/payload.cpp b/src/payload.cpp index 7517e9d5..112a544d 100644 --- a/src/payload.cpp +++ b/src/payload.cpp @@ -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); }