rcommand.cpp bugfix payloadmask invert

This commit is contained in:
Verkehrsrot 2019-09-01 00:17:13 +02:00
parent 0db8e37563
commit 6ec704d050

View File

@ -127,7 +127,7 @@ void set_gps(uint8_t val[]) {
if (val[0]) {
cfg.payloadmask |= (uint8_t)GPS_DATA; // set bit in mask
} else {
cfg.payloadmask &= ~(uint8_t)GPS_DATA; // clear bit in mask
cfg.payloadmask &= (uint8_t)~GPS_DATA; // clear bit in mask
}
}
@ -136,7 +136,7 @@ void set_bme(uint8_t val[]) {
if (val[0]) {
cfg.payloadmask |= (uint8_t)MEMS_DATA; // set bit in mask
} else {
cfg.payloadmask &= ~(uint8_t)MEMS_DATA; // clear bit in mask
cfg.payloadmask &= (uint8_t)~MEMS_DATA; // clear bit in mask
}
}
@ -146,7 +146,7 @@ void set_batt(uint8_t val[]) {
if (val[0]) {
cfg.payloadmask |= (uint8_t)BATT_DATA; // set bit in mask
} else {
cfg.payloadmask &= ~(uint8_t)BATT_DATA; // clear bit in mask
cfg.payloadmask &= (uint8_t)~BATT_DATA; // clear bit in mask
}
}