rcommand.cpp fixed (issue #9)

This commit is contained in:
Klaus K Wilting 2018-03-24 15:58:12 +01:00
parent d6164f3132
commit 4559aa02a6
4 changed files with 19 additions and 6 deletions

View File

@ -69,8 +69,8 @@ monitor_baud = 115200
lib_deps = U8g2 lib_deps = U8g2
build_flags = build_flags =
;set log level, we need build_flag for this, otherwise we can't use ESP_LOGx in arduino framework ;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_VERBOSE
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_NONE ; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_NONE
;needed for ESP32 BLE Ardunio v0.4.9 ;needed for ESP32 BLE Ardunio v0.4.9
-fexceptions -fexceptions
-std=c++11 -std=c++11

View File

@ -264,7 +264,8 @@ void loadConfig() {
ESP_LOGI(TAG, "Done"); ESP_LOGI(TAG, "Done");
// put actions to be triggered on loaded config here // 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); antenna_select(cfg.wifiant);
#endif #endif
} }

View File

@ -1,5 +1,5 @@
// program version // 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" #define PROGNAME "PAXCNT"
// Verbose enables serial output // 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 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 // 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_eu868 1
//#define CFG_us915 1 //#define CFG_us915 1
// This is the SX1272/SX1273 radio, which is also used on the HopeRF // This is the SX1272/SX1273 radio, which is also used on the HopeRF
// RFM92 boards. // RFM92 boards.
//#define CFG_sx1272_radio 1 //#define CFG_sx1272_radio 1

View File

@ -38,8 +38,18 @@ void switch_lora (int sf, int tx) {
case 8: LMIC_setDrTxpow(DR_SF8,tx); cfg.lorasf=sf; break; case 8: LMIC_setDrTxpow(DR_SF8,tx); cfg.lorasf=sf; break;
case 9: LMIC_setDrTxpow(DR_SF9,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 10: LMIC_setDrTxpow(DR_SF10,tx); cfg.lorasf=sf; break;
case 11: LMIC_setDrTxpow(DR_SF11,tx); cfg.lorasf=sf; break; case 11:
case 12: LMIC_setDrTxpow(DR_SF12,tx); cfg.lorasf=sf; break; #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; default: break;
} }
} }