diff --git a/platformio.ini b/platformio.ini index a2a3ab93..3f56fbfd 100644 --- a/platformio.ini +++ b/platformio.ini @@ -34,7 +34,7 @@ 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_INFO ; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE ; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG ; @@ -43,9 +43,11 @@ build_flags = -include "src/paxcounter.conf" [env:heltec] -platform = espressif32@0.12.0 +platform = espressif32@1.0.1 framework = arduino board = heltec_wifi_lora_32 +board_build.partitions = no_ota.csv +board_upload.maximum_size = 2097152 monitor_speed = 115200 lib_deps = ${common_env_data.lib_deps_display} @@ -54,9 +56,11 @@ build_flags = -include "src/hal/heltec.h" [env:ttgov1] -platform = espressif32@0.12.0 +platform = espressif32@1.0.1 framework = arduino board = esp32dev +board_build.partitions = no_ota.csv +board_upload.maximum_size = 2097152 monitor_speed = 115200 upload_speed = 115200 lib_deps = @@ -66,9 +70,11 @@ build_flags = -include "src/hal/ttgov1.h" [env:ttgov2] -platform = espressif32@0.12.0 +platform = espressif32@1.0.1 framework = arduino board = esp32dev +board_build.partitions = no_ota.csv +board_upload.maximum_size = 2097152 monitor_speed = 115200 upload_speed = 921600 lib_deps = @@ -78,9 +84,11 @@ build_flags = -include "src/hal/ttgov2.h" [env:ttgov21] -platform = espressif32@0.12.0 +platform = espressif32@1.0.1 framework = arduino board = esp32dev +board_build.partitions = no_ota.csv +board_upload.maximum_size = 2097152 monitor_speed = 115200 upload_speed = 921600 lib_deps = @@ -90,9 +98,11 @@ build_flags = -include "src/hal/ttgov21.h" [env:fipy] -platform = espressif32@0.12.0 +platform = espressif32@1.0.1 framework = arduino board = esp32dev +board_build.partitions = no_ota.csv +board_upload.maximum_size = 2097152 monitor_speed = 115200 upload_speed = 921600 lib_deps = @@ -102,9 +112,11 @@ build_flags = -include "src/hal/fipy.h" [env:lopy] -platform = espressif32@0.12.0 +platform = espressif32@1.0.1 framework = arduino board = esp32dev +board_build.partitions = no_ota.csv +board_upload.maximum_size = 2097152 monitor_speed = 115200 upload_speed = 921600 lib_deps = @@ -114,9 +126,11 @@ build_flags = -include "src/hal/lopy.h" [env:lopy4] -platform = espressif32@0.12.0 +platform = espressif32@1.0.1 framework = arduino board = esp32dev +board_build.partitions = no_ota.csv +board_upload.maximum_size = 2097152 monitor_speed = 115200 upload_speed = 921600 lib_deps = @@ -126,9 +140,11 @@ build_flags = -include "src/hal/lopy4.h" [env:lolin32lite] -platform = espressif32@0.12.0 +platform = espressif32@1.0.1 framework = arduino board = lolin32 +board_build.partitions = no_ota.csv +board_upload.maximum_size = 2097152 monitor_speed = 115200 upload_speed = 256000 lib_deps = @@ -138,9 +154,11 @@ build_flags = -include "src/hal/lolin32lite_lora.h" [env:lolin32] -platform = espressif32@0.12.0 +platform = espressif32@1.0.1 framework = arduino board = lolin32 +board_build.partitions = no_ota.csv +board_upload.maximum_size = 2097152 monitor_speed = 115200 upload_speed = 921600 lib_deps = diff --git a/src/antenna.cpp b/src/antenna.cpp index 6c083275..402a313b 100644 --- a/src/antenna.cpp +++ b/src/antenna.cpp @@ -5,7 +5,7 @@ #include // Local logging tag -static const char* TAG = "wifi"; +static const char TAG[] = "wifi"; typedef enum { ANTENNA_INT = 0, diff --git a/src/blecsan.cpp b/src/blecsan.cpp index 18df2135..c7f4f9b4 100644 --- a/src/blecsan.cpp +++ b/src/blecsan.cpp @@ -17,17 +17,12 @@ https://github.com/nkolban/esp32-snippets/tree/master/BLE/scanner #define BT_BD_ADDR_HEX(addr) addr[0], addr[1], addr[2], addr[3], addr[4], addr[5] // local Tag for logging -static const char* TAG = "bluetooth"; +static const char TAG[] = "bluetooth"; // defined in macsniff.cpp bool mac_add(uint8_t *paddr, int8_t rssi, bool sniff_type); -// Prototypes -static const char *bt_addr_t_to_string(esp_ble_addr_type_t type); -static const char *btsig_gap_type(uint32_t gap_type); -static void gap_callback_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param); - -static const char *bt_addr_t_to_string(esp_ble_addr_type_t type) { +const char *bt_addr_t_to_string(esp_ble_addr_type_t type) { switch(type) { case BLE_ADDR_TYPE_PUBLIC: return "BLE_ADDR_TYPE_PUBLIC"; @@ -42,7 +37,7 @@ static const char *bt_addr_t_to_string(esp_ble_addr_type_t type) { } } // bt_addr_t_to_string -static const char *btsig_gap_type(uint32_t gap_type) { +const char *btsig_gap_type(uint32_t gap_type) { switch (gap_type) { case 0x01: return "Flags"; @@ -89,7 +84,7 @@ static const char *btsig_gap_type(uint32_t gap_type) { } // btsig_gap_type // using IRAM_:ATTR here to speed up callback function -IRAM_ATTR static void gap_callback_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param) +IRAM_ATTR void gap_callback_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param) { esp_ble_gap_cb_param_t *p = (esp_ble_gap_cb_param_t *)param; diff --git a/src/configmanager.cpp b/src/configmanager.cpp index 5f00752e..97ae1ee5 100644 --- a/src/configmanager.cpp +++ b/src/configmanager.cpp @@ -5,7 +5,7 @@ #include // Local logging tag -static const char* TAG = "flash"; +static const char TAG[] = "flash"; nvs_handle my_handle; diff --git a/src/hal/ttgov21.h b/src/hal/ttgov21.h index bbd27002..6e8149c4 100644 --- a/src/hal/ttgov21.h +++ b/src/hal/ttgov21.h @@ -6,9 +6,6 @@ #define DISPLAY_FLIP 1 // rotated display #define HAS_LED 23 // green on board LED_G3 (not in initial board version) -// 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 #define PIN_SPI_MOSI 27 // ESP32 GPIO27 (Pin27) -- HPD13A MOSI/DSI (Pin6) SPI Data Input diff --git a/src/lorawan.cpp b/src/lorawan.cpp index 87a5c58f..67668cfb 100644 --- a/src/lorawan.cpp +++ b/src/lorawan.cpp @@ -11,7 +11,7 @@ #endif // Local logging Tag -static const char* TAG = "lora"; +static const char TAG[] = "lora"; // functions defined in rcommand.cpp void rcommand(uint8_t cmd, uint8_t arg); diff --git a/src/macsniff.cpp b/src/macsniff.cpp index 0f566349..8403e701 100644 --- a/src/macsniff.cpp +++ b/src/macsniff.cpp @@ -7,7 +7,7 @@ #endif // Local logging tag -static const char* TAG = "wifi"; +static const char TAG[] = "wifi"; static wifi_country_t wifi_country = {.cc=WIFI_MY_COUNTRY, .schan=WIFI_CHANNEL_MIN, .nchan=WIFI_CHANNEL_MAX, .policy=WIFI_COUNTRY_POLICY_MANUAL}; @@ -90,7 +90,7 @@ void wifi_sniffer_init(void) { ESP_ERROR_CHECK(esp_wifi_init(&cfg)); // configure Wifi with cfg ESP_ERROR_CHECK(esp_wifi_set_country(&wifi_country)); // set locales for RF and channels ESP_ERROR_CHECK(esp_wifi_set_storage(WIFI_STORAGE_RAM)); // we don't need NVRAM - ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_NULL)); + //ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_NULL)); ESP_ERROR_CHECK(esp_wifi_set_promiscuous_filter(&filter)); // set MAC frame filter ESP_ERROR_CHECK(esp_wifi_set_promiscuous_rx_cb(&wifi_sniffer_packet_handler)); ESP_ERROR_CHECK(esp_wifi_set_promiscuous(true)); // now switch on monitor mode diff --git a/src/main.cpp b/src/main.cpp index 2b1b3e67..71e4e4ef 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -61,7 +61,7 @@ std::set macs; // associative container holds total of unique MAC adre static volatile int ButtonPressed = 0, DisplayTimerIRQ = 0, ChannelTimerIRQ = 0; // local Tag for logging -static const char* TAG = "main"; +static const char TAG[] = "main"; #ifndef VERBOSE int redirect_log(const char * fmt, va_list args) { diff --git a/src/main.h b/src/main.h index 7db20f2b..226ad844 100644 --- a/src/main.h +++ b/src/main.h @@ -1,6 +1,6 @@ // program version - note: increment version after modifications to configData_t struct!! -#define PROGVERSION "1.3.6" // use max 10 chars here! +#define PROGVERSION "1.3.7" // use max 10 chars here! #define PROGNAME "PAXCNT" //--- Declarations --- diff --git a/src/rcommand.cpp b/src/rcommand.cpp index 0d8427f4..a678c988 100644 --- a/src/rcommand.cpp +++ b/src/rcommand.cpp @@ -10,7 +10,7 @@ #include // Local logging tag -static const char* TAG = "main"; +static const char TAG[] = "main"; // table of remote commands and assigned functions typedef struct {