From ebc75e3bbef882aaa86b37652a80e0a4d713ef2b Mon Sep 17 00:00:00 2001 From: Verkehrsrot Date: Sat, 25 May 2019 15:30:53 +0200 Subject: [PATCH 1/4] Lolin32 hal files update --- src/hal/lolin32lite.h | 7 ++++--- src/hal/wemos32oled.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/hal/lolin32lite.h b/src/hal/lolin32lite.h index 70dfbcdf..3c3942e8 100644 --- a/src/hal/lolin32lite.h +++ b/src/hal/lolin32lite.h @@ -7,9 +7,10 @@ // Hardware related definitions for lolin32lite (without LoRa shield) -#define HAS_LORA 0 // no LoRa module -#define CFG_sx1272_radio 1 // dummy #define HAS_LED LED_BUILTIN // on board LED on GPIO5 #define LED_ACTIVE_LOW 1 // Onboard LED is active when pin is LOW -#endif +// disable brownout detection (avoid unexpected reset on some boards) +#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature + +#endif \ No newline at end of file diff --git a/src/hal/wemos32oled.h b/src/hal/wemos32oled.h index d5c27832..3917dfea 100644 --- a/src/hal/wemos32oled.h +++ b/src/hal/wemos32oled.h @@ -40,6 +40,6 @@ // user defined sensors (if connected) //#define HAS_SENSORS 1 // comment out if device has user defined sensors -//#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature +#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature #endif From 93c576f1e278aeb3193ac204d0cdae4ff8dcd629 Mon Sep 17 00:00:00 2001 From: Verkehrsrot Date: Sat, 25 May 2019 15:31:20 +0200 Subject: [PATCH 2/4] Change string OUIFLT to FILTER --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index a26379fc..ca10932c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -300,7 +300,7 @@ void setup() { #endif #if (VENDORFILTER) - strcat_P(features, " OUIFLT"); + strcat_P(features, " FILTER"); #endif // initialize display From 47647bc604c4b3b5ddff07b04083720bcc69cdf1 Mon Sep 17 00:00:00 2001 From: Verkehrsrot Date: Sat, 25 May 2019 15:31:51 +0200 Subject: [PATCH 3/4] Add .pio to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 875ecd9f..da637fe1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.pio .pioenvs .piolibdeps .vscode From d04a04adfa65acd5dd7f41d6199c8088fcd69f4a Mon Sep 17 00:00:00 2001 From: Verkehrsrot Date: Sat, 25 May 2019 16:32:57 +0200 Subject: [PATCH 4/4] patches for new paths in platformio core 4.0.0a15 --- README.md | 2 +- platformio.ini | 9 ++++++--- src/mbedtls_aes.c | 6 +++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 910ce69e..a3fb586b 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ If your device has a **real time clock** it can be updated bei either LoRaWAN ne # Building -Use PlatformIO with your preferred IDE for development and building this code. Make sure you have latest PlatformIO version. +Use PlatformIO with your preferred IDE for development and building this code. Make sure you have latest PlatformIO version, **at least v4.0.0a15**. # Uploading diff --git a/platformio.ini b/platformio.ini index e42691a4..8cde83eb 100644 --- a/platformio.ini +++ b/platformio.ini @@ -6,7 +6,7 @@ ; ---> SELECT TARGET PLATFORM HERE! <--- [platformio] -;env_default = generic +env_default = generic ;env_default = ebox ;env_default = eboxtube ;env_default = ecopower @@ -24,7 +24,7 @@ ;env_default = lolin32litelora ;env_default = lolin32lora ;env_default = lolin32lite -env_default = wemos32oled +;env_default = wemos32oled ;env_default = octopus32 ;env_default = ecopower, eboxtube, heltec, ttgobeam, lopy4, lopy, ttgov21old, ttgov21new, ttgofox ; @@ -74,7 +74,10 @@ build_flags_basic = -include "src/hal/${PIOENV}.h" -include "src/paxcounter.conf" -w - '-DARDUINO_LMIC_PROJECT_CONFIG_H=../../../src/lmic_config.h' + ;use this is you have platformio version >= 4.0.0a15 + '-DARDUINO_LMIC_PROJECT_CONFIG_H=../../../../../src/lmic_config.h' + ;use this is you have platformio version < 4.0.0a15 + ;'-DARDUINO_LMIC_PROJECT_CONFIG_H=../../../src/lmic_config.h' '-DCORE_DEBUG_LEVEL=${common.debug_level}' '-DLOG_LOCAL_LEVEL=${common.debug_level}' '-DBINTRAY_PACKAGE="${PIOENV}"' diff --git a/src/mbedtls_aes.c b/src/mbedtls_aes.c index aa481790..23b18a06 100644 --- a/src/mbedtls_aes.c +++ b/src/mbedtls_aes.c @@ -10,10 +10,10 @@ * AES encryption using ESP32's hardware AES unit. *******************************************************************************/ -#include "mbedtls/aes.h" -#include "lmic/oslmic.h" +#ifdef USE_MBEDTLS_AES -#if defined USE_MBEDTLS_AES +#include "mbedtls/aes.h" +#include "../../lmic/oslmic.h" void lmic_aes_encrypt(u1_t *data, u1_t *key) {