diff --git a/platformio.ini b/platformio.ini index 280ada88..99ae625b 100644 --- a/platformio.ini +++ b/platformio.ini @@ -25,7 +25,8 @@ env_default = ttgobeam description = Paxcounter is a proof-of-concept ESP32 device for metering passenger flows in realtime. It counts how many mobile devices are around. [common_env_data] -platform_espressif32 = espressif32@1.1.0 +;platform_espressif32 = espressif32@>=1.1.0 +platform_espressif32 = https://github.com/platformio/platform-espressif32.git board_build.partitions = no_ota.csv lib_deps_all = lib_deps_display = @@ -40,8 +41,8 @@ build_flags = ; otherwise device may crash in dense environments due to serial buffer overflow ; ; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_NONE -; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_INFO - -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG + -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_INFO +; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG ; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE ; ; override lora settings from LMiC library in lmic/config.h and use main.h instead @@ -117,6 +118,7 @@ lib_deps = build_flags = ${common_env_data.build_flags} -include "src/hal/ttgobeam.h" + -DBOARD_HAS_PSRAM [env:fipy] platform = ${common_env_data.platform_espressif32} @@ -161,6 +163,7 @@ lib_deps = build_flags = ${common_env_data.build_flags} -include "src/hal/lopy4.h" + -DBOARD_HAS_PSRAM [env:lolin32lite] platform = ${common_env_data.platform_espressif32} diff --git a/src/hal/lopy4.h b/src/hal/lopy4.h index ef6a4d77..6a799351 100644 --- a/src/hal/lopy4.h +++ b/src/hal/lopy4.h @@ -28,10 +28,10 @@ //#define BUTTON_PULLUP 1 // Button need pullup instead of default pulldown // uncomment this only if your LoPy runs on a expansion board 3.0 -//#define HAS_BATTERY_PROBE ADC1_GPIO39_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_7 -//#define BATT_FACTOR 2 // voltage divider 1MOhm/1MOhm on board -//#define HAS_BUTTON GPIO_NUM_37 // (P14) -//#define BUTTON_PULLUP 1 // Button need pullup instead of default pulldown +#define HAS_BATTERY_PROBE ADC1_GPIO39_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_7 +#define BATT_FACTOR 2 // voltage divider 1MOhm/1MOhm on board +#define HAS_BUTTON GPIO_NUM_37 // (P14) +#define BUTTON_PULLUP 1 // Button need pullup instead of default pulldown // uncomment this only if your LoPy runs on a expansion board 2.0 //#define HAS_BATTERY_PROBE ADC1_GPIO39_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_7 diff --git a/src/paxcounter.conf b/src/paxcounter.conf index 632b2544..b0973688 100644 --- a/src/paxcounter.conf +++ b/src/paxcounter.conf @@ -36,7 +36,7 @@ #define WIFI_CHANNEL_SWITCH_INTERVAL 50 // [seconds/100] -> 0,5 sec. // LoRa payload parameters -#define PAYLOAD_ENCODER 1 // select payload encoder: 1=Plain [default], 2=Packed, 3=CayenneLPP +#define PAYLOAD_ENCODER 2 // select payload encoder: 1=Plain [default], 2=Packed, 3=CayenneLPP #define SEND_SECS 120 // payload send cycle [seconds/2] -> 240 sec. #define MEM_LOW 2048 // [Bytes] low memory threshold triggering a send cycle #define RETRANSMIT_RCMD 5 // [seconds] wait time before retransmitting rcommand results