From 6ec704d0509add5344a9c54965099198d98cec25 Mon Sep 17 00:00:00 2001 From: Verkehrsrot Date: Sun, 1 Sep 2019 00:17:13 +0200 Subject: [PATCH] rcommand.cpp bugfix payloadmask invert --- src/rcommand.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rcommand.cpp b/src/rcommand.cpp index 90f55ead..a5cca590 100644 --- a/src/rcommand.cpp +++ b/src/rcommand.cpp @@ -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 } }