rcommand.cpp fixed (issue #9)
This commit is contained in:
parent
d6164f3132
commit
4559aa02a6
@ -69,8 +69,8 @@ monitor_baud = 115200
|
||||
lib_deps = U8g2
|
||||
build_flags =
|
||||
;set log level, we need build_flag for this, otherwise we can't use ESP_LOGx in arduino framework
|
||||
; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE
|
||||
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_NONE
|
||||
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE
|
||||
; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_NONE
|
||||
;needed for ESP32 BLE Ardunio v0.4.9
|
||||
-fexceptions
|
||||
-std=c++11
|
||||
|
@ -264,7 +264,8 @@ void loadConfig() {
|
||||
ESP_LOGI(TAG, "Done");
|
||||
|
||||
// put actions to be triggered on loaded config here
|
||||
#ifdef HAS_ANTENNA_SWITCH
|
||||
u8x8.setPowerSave(!cfg.screenon); // set display on/off
|
||||
#ifdef HAS_ANTENNA_SWITCH // set antenna type, if device has one
|
||||
antenna_select(cfg.wifiant);
|
||||
#endif
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
// program version
|
||||
#define PROGVERSION "1.2.4" // use max 10 chars here!
|
||||
#define PROGVERSION "1.2.41" // use max 10 chars here!
|
||||
#define PROGNAME "PAXCNT"
|
||||
|
||||
// Verbose enables serial output
|
||||
@ -28,8 +28,10 @@
|
||||
// define hardware independent LMIC settings here, settings of standard library in /lmic/config.h will be ignored
|
||||
// define hardware specifics settings in platformio.ini as build_flag for hardware environment
|
||||
|
||||
// Select frequency band here according to national regulations
|
||||
#define CFG_eu868 1
|
||||
//#define CFG_us915 1
|
||||
|
||||
// This is the SX1272/SX1273 radio, which is also used on the HopeRF
|
||||
// RFM92 boards.
|
||||
//#define CFG_sx1272_radio 1
|
||||
|
@ -38,8 +38,18 @@ void switch_lora (int sf, int tx) {
|
||||
case 8: LMIC_setDrTxpow(DR_SF8,tx); cfg.lorasf=sf; break;
|
||||
case 9: LMIC_setDrTxpow(DR_SF9,tx); cfg.lorasf=sf; break;
|
||||
case 10: LMIC_setDrTxpow(DR_SF10,tx); cfg.lorasf=sf; break;
|
||||
case 11: LMIC_setDrTxpow(DR_SF11,tx); cfg.lorasf=sf; break;
|
||||
case 12: LMIC_setDrTxpow(DR_SF12,tx); cfg.lorasf=sf; break;
|
||||
case 11:
|
||||
#if defined(CFG_eu868)
|
||||
LMIC_setDrTxpow(DR_SF11,tx); cfg.lorasf=sf; break;
|
||||
#elif defined(CFG_us915)
|
||||
LMIC_setDrTxpow(DR_SF11CR,tx); cfg.lorasf=sf; break;
|
||||
#endif
|
||||
case 12:
|
||||
#if defined(CFG_eu868)
|
||||
LMIC_setDrTxpow(DR_SF12,tx); cfg.lorasf=sf; break;
|
||||
#elif defined(CFG_us915)
|
||||
LMIC_setDrTxpow(DR_SF12CR,tx); cfg.lorasf=sf; break;
|
||||
#endif
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user