diff --git a/platformio.ini b/platformio.ini index b1239b62..e6cf59df 100644 --- a/platformio.ini +++ b/platformio.ini @@ -12,11 +12,11 @@ ; ---> SELECT TARGET PLATFORM HERE! <--- [platformio] ;env_default = generic -env_default = heltec +;env_default = heltec ;env_default = ttgov1 ;env_default = ttgov2 ;env_default = ttgov21 -;env_default = ttgobeam +env_default = ttgobeam ;env_default = lopy ;env_default = lopy4 ;env_default = fipy @@ -27,9 +27,9 @@ env_default = heltec 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.0.2 +;platform_espressif32 = espressif32@1.0.2 ;platform_espressif32 = espressif32@1.1.2 -;platform_espressif32 = https://github.com/platformio/platform-espressif32.git#feature/stage +platform_espressif32 = https://github.com/platformio/platform-espressif32.git#feature/stage board_build.partitions = no_ota.csv lib_deps_all = lib_deps_display = @@ -45,15 +45,15 @@ 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 -D_lmic_config_h_ -include "src/paxcounter.conf" -include "src/hal/${PIOENV}.h" - -w +; -w [env:heltec] platform = ${common_env_data.platform_espressif32} diff --git a/src/beacon_array.h b/src/beacon_array.h index f11cea69..6b7dbaca 100644 --- a/src/beacon_array.h +++ b/src/beacon_array.h @@ -1,5 +1,3 @@ std::array::iterator it; -std::array beacons = {0x000000000000, 0x111111111111, - 0x123456789000, 0xaaaaaaaaaaaa, - 0x0101010101010}; \ No newline at end of file +std::array beacons = {0,0,0,0,0}; \ No newline at end of file diff --git a/src/homecycle.cpp b/src/homecycle.cpp index 370bf034..85b170db 100644 --- a/src/homecycle.cpp +++ b/src/homecycle.cpp @@ -10,7 +10,9 @@ static const char TAG[] = "main"; // do all housekeeping void doHomework() { - static uint64_t uptimecounter; + + // update uptime counter + uptime(); // read battery voltage into global variable #ifdef HAS_BATTERY_PROBE @@ -39,10 +41,7 @@ void doHomework() { reset_counters(); // clear macs container and reset all counters reset_salt(); // get new salt for salting hashes } - - // update uptime counter - uptimecounter = uptime(); -} +} // doHomework() void checkHousekeeping() { if (HomeCycleIRQ) { diff --git a/src/paxcounter.conf b/src/paxcounter.conf index 3758dd9f..799c55d4 100644 --- a/src/paxcounter.conf +++ b/src/paxcounter.conf @@ -60,7 +60,7 @@ // Some hardware settings #define RGBLUMINOSITY 30 // RGB LED luminosity [default = 30%] #define DISPLAYREFRESH_MS 40 // OLED refresh cycle in ms [default = 40] -> 1000/40 = 25 frames per second -#define HOMECYCLE 60 // house keeping cycle in seconds [default = 60 secs] +#define HOMECYCLE 30 // house keeping cycle in seconds [default = 30 secs] // LMIC settings // define hardware independent LMIC settings here, settings of standard library in /lmic/config.h will be ignored