v1.3.7 taylored to espressif32 v1.0.1

This commit is contained in:
Klaus K Wilting 2018-06-02 18:28:01 +02:00
parent c922bafa2f
commit 428db80073
10 changed files with 40 additions and 30 deletions

View File

@ -43,9 +43,11 @@ build_flags =
-include "src/paxcounter.conf" -include "src/paxcounter.conf"
[env:heltec] [env:heltec]
platform = espressif32@0.12.0 platform = espressif32@1.0.1
framework = arduino framework = arduino
board = heltec_wifi_lora_32 board = heltec_wifi_lora_32
board_build.partitions = no_ota.csv
board_upload.maximum_size = 2097152
monitor_speed = 115200 monitor_speed = 115200
lib_deps = lib_deps =
${common_env_data.lib_deps_display} ${common_env_data.lib_deps_display}
@ -54,9 +56,11 @@ build_flags =
-include "src/hal/heltec.h" -include "src/hal/heltec.h"
[env:ttgov1] [env:ttgov1]
platform = espressif32@0.12.0 platform = espressif32@1.0.1
framework = arduino framework = arduino
board = esp32dev board = esp32dev
board_build.partitions = no_ota.csv
board_upload.maximum_size = 2097152
monitor_speed = 115200 monitor_speed = 115200
upload_speed = 115200 upload_speed = 115200
lib_deps = lib_deps =
@ -66,9 +70,11 @@ build_flags =
-include "src/hal/ttgov1.h" -include "src/hal/ttgov1.h"
[env:ttgov2] [env:ttgov2]
platform = espressif32@0.12.0 platform = espressif32@1.0.1
framework = arduino framework = arduino
board = esp32dev board = esp32dev
board_build.partitions = no_ota.csv
board_upload.maximum_size = 2097152
monitor_speed = 115200 monitor_speed = 115200
upload_speed = 921600 upload_speed = 921600
lib_deps = lib_deps =
@ -78,9 +84,11 @@ build_flags =
-include "src/hal/ttgov2.h" -include "src/hal/ttgov2.h"
[env:ttgov21] [env:ttgov21]
platform = espressif32@0.12.0 platform = espressif32@1.0.1
framework = arduino framework = arduino
board = esp32dev board = esp32dev
board_build.partitions = no_ota.csv
board_upload.maximum_size = 2097152
monitor_speed = 115200 monitor_speed = 115200
upload_speed = 921600 upload_speed = 921600
lib_deps = lib_deps =
@ -90,9 +98,11 @@ build_flags =
-include "src/hal/ttgov21.h" -include "src/hal/ttgov21.h"
[env:fipy] [env:fipy]
platform = espressif32@0.12.0 platform = espressif32@1.0.1
framework = arduino framework = arduino
board = esp32dev board = esp32dev
board_build.partitions = no_ota.csv
board_upload.maximum_size = 2097152
monitor_speed = 115200 monitor_speed = 115200
upload_speed = 921600 upload_speed = 921600
lib_deps = lib_deps =
@ -102,9 +112,11 @@ build_flags =
-include "src/hal/fipy.h" -include "src/hal/fipy.h"
[env:lopy] [env:lopy]
platform = espressif32@0.12.0 platform = espressif32@1.0.1
framework = arduino framework = arduino
board = esp32dev board = esp32dev
board_build.partitions = no_ota.csv
board_upload.maximum_size = 2097152
monitor_speed = 115200 monitor_speed = 115200
upload_speed = 921600 upload_speed = 921600
lib_deps = lib_deps =
@ -114,9 +126,11 @@ build_flags =
-include "src/hal/lopy.h" -include "src/hal/lopy.h"
[env:lopy4] [env:lopy4]
platform = espressif32@0.12.0 platform = espressif32@1.0.1
framework = arduino framework = arduino
board = esp32dev board = esp32dev
board_build.partitions = no_ota.csv
board_upload.maximum_size = 2097152
monitor_speed = 115200 monitor_speed = 115200
upload_speed = 921600 upload_speed = 921600
lib_deps = lib_deps =
@ -126,9 +140,11 @@ build_flags =
-include "src/hal/lopy4.h" -include "src/hal/lopy4.h"
[env:lolin32lite] [env:lolin32lite]
platform = espressif32@0.12.0 platform = espressif32@1.0.1
framework = arduino framework = arduino
board = lolin32 board = lolin32
board_build.partitions = no_ota.csv
board_upload.maximum_size = 2097152
monitor_speed = 115200 monitor_speed = 115200
upload_speed = 256000 upload_speed = 256000
lib_deps = lib_deps =
@ -138,9 +154,11 @@ build_flags =
-include "src/hal/lolin32lite_lora.h" -include "src/hal/lolin32lite_lora.h"
[env:lolin32] [env:lolin32]
platform = espressif32@0.12.0 platform = espressif32@1.0.1
framework = arduino framework = arduino
board = lolin32 board = lolin32
board_build.partitions = no_ota.csv
board_upload.maximum_size = 2097152
monitor_speed = 115200 monitor_speed = 115200
upload_speed = 921600 upload_speed = 921600
lib_deps = lib_deps =

View File

@ -5,7 +5,7 @@
#include <Arduino.h> #include <Arduino.h>
// Local logging tag // Local logging tag
static const char* TAG = "wifi"; static const char TAG[] = "wifi";
typedef enum { typedef enum {
ANTENNA_INT = 0, ANTENNA_INT = 0,

View File

@ -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] #define BT_BD_ADDR_HEX(addr) addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]
// local Tag for logging // local Tag for logging
static const char* TAG = "bluetooth"; static const char TAG[] = "bluetooth";
// defined in macsniff.cpp // defined in macsniff.cpp
bool mac_add(uint8_t *paddr, int8_t rssi, bool sniff_type); bool mac_add(uint8_t *paddr, int8_t rssi, bool sniff_type);
// Prototypes const char *bt_addr_t_to_string(esp_ble_addr_type_t type) {
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) {
switch(type) { switch(type) {
case BLE_ADDR_TYPE_PUBLIC: case BLE_ADDR_TYPE_PUBLIC:
return "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 } // 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) switch (gap_type)
{ {
case 0x01: return "Flags"; case 0x01: return "Flags";
@ -89,7 +84,7 @@ static const char *btsig_gap_type(uint32_t gap_type) {
} // btsig_gap_type } // btsig_gap_type
// using IRAM_:ATTR here to speed up callback function // 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; esp_ble_gap_cb_param_t *p = (esp_ble_gap_cb_param_t *)param;

View File

@ -5,7 +5,7 @@
#include <nvs_flash.h> #include <nvs_flash.h>
// Local logging tag // Local logging tag
static const char* TAG = "flash"; static const char TAG[] = "flash";
nvs_handle my_handle; nvs_handle my_handle;

View File

@ -6,9 +6,6 @@
#define DISPLAY_FLIP 1 // rotated display #define DISPLAY_FLIP 1 // rotated display
#define HAS_LED 23 // green on board LED_G3 (not in initial board version) #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 // 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_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 #define PIN_SPI_MOSI 27 // ESP32 GPIO27 (Pin27) -- HPD13A MOSI/DSI (Pin6) SPI Data Input

View File

@ -11,7 +11,7 @@
#endif #endif
// Local logging Tag // Local logging Tag
static const char* TAG = "lora"; static const char TAG[] = "lora";
// functions defined in rcommand.cpp // functions defined in rcommand.cpp
void rcommand(uint8_t cmd, uint8_t arg); void rcommand(uint8_t cmd, uint8_t arg);

View File

@ -7,7 +7,7 @@
#endif #endif
// Local logging tag // 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}; 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_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_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_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_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_rx_cb(&wifi_sniffer_packet_handler));
ESP_ERROR_CHECK(esp_wifi_set_promiscuous(true)); // now switch on monitor mode ESP_ERROR_CHECK(esp_wifi_set_promiscuous(true)); // now switch on monitor mode

View File

@ -61,7 +61,7 @@ std::set<uint16_t> macs; // associative container holds total of unique MAC adre
static volatile int ButtonPressed = 0, DisplayTimerIRQ = 0, ChannelTimerIRQ = 0; static volatile int ButtonPressed = 0, DisplayTimerIRQ = 0, ChannelTimerIRQ = 0;
// local Tag for logging // local Tag for logging
static const char* TAG = "main"; static const char TAG[] = "main";
#ifndef VERBOSE #ifndef VERBOSE
int redirect_log(const char * fmt, va_list args) { int redirect_log(const char * fmt, va_list args) {

View File

@ -1,6 +1,6 @@
// program version - note: increment version after modifications to configData_t struct!! // 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" #define PROGNAME "PAXCNT"
//--- Declarations --- //--- Declarations ---

View File

@ -10,7 +10,7 @@
#include <hal/hal.h> #include <hal/hal.h>
// Local logging tag // Local logging tag
static const char* TAG = "main"; static const char TAG[] = "main";
// table of remote commands and assigned functions // table of remote commands and assigned functions
typedef struct { typedef struct {