From 92cbaeeaa647194e944a9c146ed21768e72ab812 Mon Sep 17 00:00:00 2001 From: Klaus K Wilting Date: Tue, 27 Mar 2018 12:46:38 +0200 Subject: [PATCH] v1.2.5 --- platformio.ini | 4 ++-- src/blecount.cpp | 2 +- src/hal/ttgov2.h | 4 ++++ src/main.h | 2 +- src/rcommand.cpp | 20 ++++++++++---------- 5 files changed, 18 insertions(+), 14 deletions(-) diff --git a/platformio.ini b/platformio.ini index 80c91ae1..75a8b218 100644 --- a/platformio.ini +++ b/platformio.ini @@ -10,12 +10,12 @@ ; ---> SELECT TARGET PLATFORM HERE! <--- [platformio] -env_default = heltec_wifi_lora_32 +;env_default = heltec_wifi_lora_32 ;env_default = ttgov1 ;env_default = ttgov2 ;env_default = lopy ;env_default = lopy4 -;env_default = lolin32_lora +env_default = lolin32_lora [env:heltec_wifi_lora_32] platform = espressif32 diff --git a/src/blecount.cpp b/src/blecount.cpp index b2cd6c92..3872d360 100644 --- a/src/blecount.cpp +++ b/src/blecount.cpp @@ -19,7 +19,7 @@ class MyAdvertisedDeviceCallbacks: public BLEAdvertisedDeviceCallbacks { void BLECount() { u8x8.clearLine(3); u8x8.drawString(0,3,"BLE Scan..."); - BLEDevice::init("PaxCnt"); + BLEDevice::init(PROGNAME); BLEScan* pBLEScan = BLEDevice::getScan(); //create new scan pBLEScan->setAdvertisedDeviceCallbacks(new MyAdvertisedDeviceCallbacks()); pBLEScan->setActiveScan(true); //active scan uses more power, but get results faster diff --git a/src/hal/ttgov2.h b/src/hal/ttgov2.h index ec0ec5de..beae5675 100644 --- a/src/hal/ttgov2.h +++ b/src/hal/ttgov2.h @@ -3,6 +3,10 @@ #define CFG_sx1276_radio 1 // HPD13A LoRa SoC #define HAS_DISPLAY U8X8_SSD1306_128X64_NONAME_HW_I2C +//#define HAS_LED NOT_A_PIN // on-board LED is wired to SCL (used by display) therefore totally useless + +// disable brownout detection (needed on TTGOv2 for battery powered operation) +#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature // re-define pin definitions of pins_arduino.h #define PIN_SPI_SS 18 // ESP32 GPIO18 (Pin18) -- HPD13A NSS/SEL (Pin4) SPI Chip Select Input diff --git a/src/main.h b/src/main.h index 36541f8d..a32c075b 100644 --- a/src/main.h +++ b/src/main.h @@ -1,5 +1,5 @@ // program version -#define PROGVERSION "1.2.41" // use max 10 chars here! +#define PROGVERSION "1.2.5" // use max 10 chars here! #define PROGNAME "PAXCNT" // Verbose enables serial output diff --git a/src/rcommand.cpp b/src/rcommand.cpp index 97b647a6..46fe8022 100644 --- a/src/rcommand.cpp +++ b/src/rcommand.cpp @@ -13,15 +13,6 @@ // Local logging tag static const char *TAG = "rcommand"; -// functions defined in configmanager.cpp -void eraseConfig(void); -void saveConfig(void); - -// defined in antenna.cpp -#ifdef HAS_ANTENNA_SWITCH - void antenna_select(const int8_t _ant); -#endif - // table of remote commands and assigned functions typedef struct { const int nam; @@ -29,7 +20,16 @@ typedef struct { const bool store; } cmd_t; -// help function to assign LoRa datarates to spreadfactor values +// functions defined in configmanager.cpp +void eraseConfig(void); +void saveConfig(void); + +// function defined in antenna.cpp +#ifdef HAS_ANTENNA_SWITCH + void antenna_select(const int8_t _ant); +#endif + +// help function to assign LoRa datarates to numeric spreadfactor values void switch_lora (int sf, int tx) { if ( tx > 20 ) return; cfg.txpower = tx;