step 1 migrations to Espressif 1.1.0 core
This commit is contained in:
parent
308187aab6
commit
165aa75ab3
@ -11,9 +11,9 @@
|
|||||||
|
|
||||||
; ---> SELECT TARGET PLATFORM HERE! <---
|
; ---> SELECT TARGET PLATFORM HERE! <---
|
||||||
[platformio]
|
[platformio]
|
||||||
env_default = heltec
|
;env_default = heltec
|
||||||
;env_default = ttgov1
|
;env_default = ttgov1
|
||||||
;env_default = ttgov2
|
env_default = ttgov2
|
||||||
;env_default = ttgov21
|
;env_default = ttgov21
|
||||||
;env_default = ttgobeam
|
;env_default = ttgobeam
|
||||||
;env_default = lopy
|
;env_default = lopy
|
||||||
@ -25,11 +25,11 @@ 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.
|
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]
|
[common_env_data]
|
||||||
platform_espressif32 = espressif32@1.0.2
|
platform_espressif32 = espressif32@1.1.0
|
||||||
board_build.partitions = no_ota.csv
|
board_build.partitions = no_ota.csv
|
||||||
lib_deps_all =
|
lib_deps_all =
|
||||||
lib_deps_display =
|
lib_deps_display =
|
||||||
U8g2@>=2.22.14
|
U8g2@>=2.23.12
|
||||||
lib_deps_rgbled =
|
lib_deps_rgbled =
|
||||||
SmartLeds@>=1.1.3
|
SmartLeds@>=1.1.3
|
||||||
lib_deps_gps =
|
lib_deps_gps =
|
||||||
|
@ -249,14 +249,7 @@ void start_BLEscan(void) {
|
|||||||
ESP_LOGI(TAG, "Initializing bluetooth scanner ...");
|
ESP_LOGI(TAG, "Initializing bluetooth scanner ...");
|
||||||
|
|
||||||
// Initialize BT controller to allocate task and other resource.
|
// Initialize BT controller to allocate task and other resource.
|
||||||
esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT();
|
btStart();
|
||||||
bt_cfg.controller_task_stack_size =
|
|
||||||
BLESTACKSIZE; // set BT stack size to value configured in paxcounter.conf
|
|
||||||
ESP_ERROR_CHECK(esp_bt_controller_init(&bt_cfg));
|
|
||||||
ESP_ERROR_CHECK(esp_bt_controller_enable(ESP_BT_MODE_BTDM));
|
|
||||||
|
|
||||||
// Init and alloc the resource for bluetooth stack, must be done prior to
|
|
||||||
// every bluetooth stuff
|
|
||||||
ESP_ERROR_CHECK(esp_bluedroid_init());
|
ESP_ERROR_CHECK(esp_bluedroid_init());
|
||||||
ESP_ERROR_CHECK(esp_bluedroid_enable());
|
ESP_ERROR_CHECK(esp_bluedroid_enable());
|
||||||
|
|
||||||
@ -271,8 +264,7 @@ void stop_BLEscan(void) {
|
|||||||
ESP_ERROR_CHECK(esp_ble_gap_register_callback(NULL));
|
ESP_ERROR_CHECK(esp_ble_gap_register_callback(NULL));
|
||||||
ESP_ERROR_CHECK(esp_bluedroid_disable());
|
ESP_ERROR_CHECK(esp_bluedroid_disable());
|
||||||
ESP_ERROR_CHECK(esp_bluedroid_deinit());
|
ESP_ERROR_CHECK(esp_bluedroid_deinit());
|
||||||
ESP_ERROR_CHECK(esp_bt_controller_disable());
|
btStop(); // disable & deinit bt_controller
|
||||||
ESP_ERROR_CHECK(esp_bt_controller_deinit());
|
|
||||||
ESP_LOGI(TAG, "Bluetooth scanner stopped");
|
ESP_LOGI(TAG, "Bluetooth scanner stopped");
|
||||||
} // stop_BLEscan
|
} // stop_BLEscan
|
||||||
|
|
||||||
|
@ -11,9 +11,9 @@
|
|||||||
|
|
||||||
#define HAS_DISPLAY U8X8_SSD1306_128X64_NONAME_HW_I2C
|
#define HAS_DISPLAY U8X8_SSD1306_128X64_NONAME_HW_I2C
|
||||||
#define DISPLAY_FLIP 1 // rotated display
|
#define DISPLAY_FLIP 1 // rotated display
|
||||||
#define HAS_LED GPIO_NUM_23 // green on board LED (new board ONLY)
|
#define HAS_LED GPIO_NUM_23 // green on board LED (new board ONLY)
|
||||||
#define HAS_BATTERY_PROBE ADC1_GPIO35_CHANNEL // uses GPIO7 (new board ONLY)
|
#define HAS_BATTERY_PROBE ADC1_GPIO35_CHANNEL // uses GPIO7
|
||||||
#define BATT_FACTOR 2 // voltage divider 100k/100k on board (new board ONLY)
|
#define BATT_FACTOR 2 // voltage divider 100k/100k on board
|
||||||
|
|
||||||
// re-define pin definitions of pins_arduino.h
|
// re-define pin definitions of pins_arduino.h
|
||||||
#define PIN_SPI_SS GPIO_NUM_18 // ESP32 GPIO18 (Pin18) -- HPD13A NSS/SEL (Pin4) SPI Chip Select Input
|
#define PIN_SPI_SS GPIO_NUM_18 // ESP32 GPIO18 (Pin18) -- HPD13A NSS/SEL (Pin4) SPI Chip Select Input
|
||||||
|
@ -9,10 +9,9 @@
|
|||||||
// 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,
|
static wifi_country_t wifi_country = {WIFI_MY_COUNTRY, WIFI_CHANNEL_MIN,
|
||||||
.schan = WIFI_CHANNEL_MIN,
|
WIFI_CHANNEL_MAX, 0,
|
||||||
.nchan = WIFI_CHANNEL_MAX,
|
WIFI_COUNTRY_POLICY_MANUAL};
|
||||||
.policy = WIFI_COUNTRY_POLICY_MANUAL};
|
|
||||||
|
|
||||||
// globals
|
// globals
|
||||||
uint16_t salt;
|
uint16_t salt;
|
||||||
@ -106,7 +105,7 @@ void wifi_sniffer_init(void) {
|
|||||||
esp_wifi_set_country(&wifi_country)); // set locales for RF and channels
|
esp_wifi_set_country(&wifi_country)); // set locales for RF and channels
|
||||||
ESP_ERROR_CHECK(
|
ESP_ERROR_CHECK(
|
||||||
esp_wifi_set_storage(WIFI_STORAGE_RAM)); // we don't need NVRAM
|
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_ERROR_CHECK(
|
||||||
esp_wifi_set_promiscuous_filter(&filter)); // set MAC frame filter
|
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));
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
// program version - note: increment version after modifications to configData_t
|
// program version - note: increment version after modifications to configData_t
|
||||||
// struct!!
|
// struct!!
|
||||||
#define PROGVERSION "1.3.82" // use max 10 chars here!
|
#define PROGVERSION "1.3.83" // use max 10 chars here!
|
||||||
#define PROGNAME "PAXCNT"
|
#define PROGNAME "PAXCNT"
|
||||||
|
|
||||||
//--- Declarations ---
|
//--- Declarations ---
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
#define BLECOUNTER 1 // comment out if you don't want BLE count, saves power & memory
|
#define BLECOUNTER 1 // comment out if you don't want BLE count, saves power & memory
|
||||||
|
|
||||||
// BLE scan parameters
|
// BLE scan parameters
|
||||||
#define BLESTACKSIZE 8192 // stack size for esp_bt_controller
|
|
||||||
#define BLESCANTIME 0 // [seconds] scan duration, 0 means infinite [default], see note below
|
#define BLESCANTIME 0 // [seconds] scan duration, 0 means infinite [default], see note below
|
||||||
#define BLESCANWINDOW 80 // [milliseconds] scan window, see below, 3 .. 10240, default 80ms
|
#define BLESCANWINDOW 80 // [milliseconds] scan window, see below, 3 .. 10240, default 80ms
|
||||||
#define BLESCANINTERVAL 80 // [illiseconds] scan interval, see below, 3 .. 10240, default 80ms = 100% duty cycle
|
#define BLESCANINTERVAL 80 // [illiseconds] scan interval, see below, 3 .. 10240, default 80ms = 100% duty cycle
|
||||||
@ -53,7 +52,7 @@
|
|||||||
#define RGBLUMINOSITY 30 // 30%
|
#define RGBLUMINOSITY 30 // 30%
|
||||||
|
|
||||||
// OLED Display refresh cycle (in Milliseconds)
|
// OLED Display refresh cycle (in Milliseconds)
|
||||||
#define DISPLAYREFRESH_MS 40 // e.g. 40ms -> 1000/40 = 25 frames per second
|
#define DISPLAYREFRESH_MS 80 // e.g. 40ms -> 1000/40 = 25 frames per second
|
||||||
|
|
||||||
// LMIC settings
|
// LMIC settings
|
||||||
// define hardware independent LMIC settings here, settings of standard library in /lmic/config.h will be ignored
|
// define hardware independent LMIC settings here, settings of standard library in /lmic/config.h will be ignored
|
||||||
|
Loading…
Reference in New Issue
Block a user