bugfix rcommand.cpp in set_sensor()
This commit is contained in:
parent
b8e7b4bf48
commit
6463eeb415
@ -5,7 +5,11 @@
|
||||
|
||||
// Hardware related definitions for TTGO T-Beam board
|
||||
|
||||
#define HAS_SENSORS 1 // test
|
||||
////////////// test //////////
|
||||
// enable only if device has these sensors, otherwise comment these lines
|
||||
#define HAS_BME 0x77 // BME680 sensor on I2C bus (default SDA=21/SCL=22); comment out if not present
|
||||
//#define HAS_SENSORS 1 // comment out if device has user defined sensors
|
||||
////////////// test //////////
|
||||
|
||||
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
|
||||
#define CFG_sx1276_radio 1 // HPD13A LoRa SoC
|
||||
|
@ -133,6 +133,7 @@ void set_gps(uint8_t val[]) {
|
||||
}
|
||||
|
||||
void set_sensor(uint8_t val[]) {
|
||||
#ifdef HAS_SENSORS
|
||||
switch (val[0]) { // check if valid sensor number 1...4
|
||||
case 1:
|
||||
case 2:
|
||||
@ -153,6 +154,7 @@ void set_sensor(uint8_t val[]) {
|
||||
cfg.payloadmask |= sensor_mask(val[0]); // set bit
|
||||
else
|
||||
cfg.payloadmask &= ~sensor_mask(val[0]); // clear bit
|
||||
#endif
|
||||
}
|
||||
|
||||
void set_beacon(uint8_t val[]) {
|
||||
|
Loading…
Reference in New Issue
Block a user