changed main.h -> main.conf
This commit is contained in:
parent
875ad77967
commit
f6f63b6a57
@ -34,9 +34,9 @@ build_flags =
|
||||
;needed for ESP32 BLE Ardunio v0.4.9
|
||||
-fexceptions
|
||||
-std=c++11
|
||||
;override lora settings from LMiC library in lmic/config.h and use main.h instead
|
||||
;override lora settings from LMiC library in lmic/config.h and use main.conf instead
|
||||
-D_lmic_config_h_
|
||||
-include "src/main.h"
|
||||
-include "src/main.conf"
|
||||
-include "src/hal/heltec.h"
|
||||
;FreeRTOS single core operation, switches off core 1 (see arduino-esp32/cores/esp32/main.cpp)
|
||||
; -DCONFIG_FREERTOS_UNICORE
|
||||
@ -56,9 +56,9 @@ build_flags =
|
||||
;needed for ESP32 BLE Ardunio v0.4.9
|
||||
-fexceptions
|
||||
-std=c++11
|
||||
;override lora settings from LMiC library in lmic/config.h and use main.h instead
|
||||
;override lora settings from LMiC library in lmic/config.h and use main.conf instead
|
||||
-D_lmic_config_h_
|
||||
-include "src/main.h"
|
||||
-include "src/main.conf"
|
||||
-include "src/hal/ttgov1.h"
|
||||
;FreeRTOS single core operation, switches off core 1 (see arduino-esp32/cores/esp32/main.cpp)
|
||||
; -DCONFIG_FREERTOS_UNICORE
|
||||
@ -78,9 +78,9 @@ build_flags =
|
||||
;needed for ESP32 BLE Ardunio v0.4.9
|
||||
-fexceptions
|
||||
-std=c++11
|
||||
;override lora settings from LMiC library in lmic/config.h and use main.h instead
|
||||
;override lora settings from LMiC library in lmic/config.h and use main.conf instead
|
||||
-D_lmic_config_h_
|
||||
-include "src/main.h"
|
||||
-include "src/main.conf"
|
||||
-include "src/hal/ttgov2.h"
|
||||
;FreeRTOS single core operation, switches off core 1 (see arduino-esp32/cores/esp32/main.cpp)
|
||||
; -DCONFIG_FREERTOS_UNICORE
|
||||
@ -101,9 +101,9 @@ build_flags =
|
||||
;needed for ESP32 BLE Ardunio v0.4.9
|
||||
-fexceptions
|
||||
-std=c++11
|
||||
;override lora settings from LMiC library in lmic/config.h and use main.h instead
|
||||
;override lora settings from LMiC library in lmic/config.h and use main.conf instead
|
||||
-D_lmic_config_h_
|
||||
-include "src/main.h"
|
||||
-include "src/main.conf"
|
||||
-include "src/hal/lopy.h"
|
||||
;FreeRTOS single core operation, switches off core 1 (see arduino-esp32/cores/esp32/main.cpp)
|
||||
; -DCONFIG_FREERTOS_UNICORE
|
||||
@ -124,9 +124,9 @@ build_flags =
|
||||
;needed for ESP32 BLE Ardunio v0.4.9
|
||||
-fexceptions
|
||||
-std=c++11
|
||||
;override lora settings from LMiC library in lmic/config.h and use main.h instead
|
||||
;override lora settings from LMiC library in lmic/config.h and use main.conf instead
|
||||
-D_lmic_config_h_
|
||||
-include "src/main.h"
|
||||
-include "src/main.conf"
|
||||
-include "src/hal/lopy4.h"
|
||||
;FreeRTOS single core operation, switches off core 1 (see arduino-esp32/cores/esp32/main.cpp)
|
||||
; -DCONFIG_FREERTOS_UNICORE
|
||||
@ -148,9 +148,9 @@ build_flags =
|
||||
;needed for ESP32 BLE Ardunio v0.4.9
|
||||
-fexceptions
|
||||
-std=c++11
|
||||
;override lora settings from LMiC library in lmic/config.h and use main.h instead
|
||||
;override lora settings from LMiC library in lmic/config.h and use main.conf instead
|
||||
-D_lmic_config_h_
|
||||
-include "src/main.h"
|
||||
-include "src/main.conf"
|
||||
-include "src/hal/lolin32lite_lora.h"
|
||||
;FreeRTOS single core operation, switches off core 1 (see arduino-esp32/cores/esp32/main.cpp)
|
||||
; -DCONFIG_FREERTOS_UNICORE
|
||||
@ -172,9 +172,9 @@ build_flags =
|
||||
;needed for ESP32 BLE Ardunio v0.4.9
|
||||
-fexceptions
|
||||
-std=c++11
|
||||
;override lora settings from LMiC library in lmic/config.h and use main.h instead
|
||||
;override lora settings from LMiC library in lmic/config.h and use main.conf instead
|
||||
-D_lmic_config_h_
|
||||
-include "src/main.h"
|
||||
-include "src/main.conf"
|
||||
-include "src/hal/lolin32_lora.h"
|
||||
;FreeRTOS single core operation, switches off core 1 (see arduino-esp32/cores/esp32/main.cpp)
|
||||
; -DCONFIG_FREERTOS_UNICORE
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* configmanager persists runtime configuration using NVRAM of ESP32*/
|
||||
|
||||
#include "main.h"
|
||||
#include "main.conf"
|
||||
#include "globals.h"
|
||||
#include <nvs.h>
|
||||
#include <nvs_flash.h>
|
||||
@ -19,7 +19,7 @@ esp_err_t err;
|
||||
|
||||
// populate cfg vars with factory settings
|
||||
void defaultConfig() {
|
||||
cfg.lorasf = LORASFDEFAULT; // 7-12, initial lora spreadfactor defined in main.h
|
||||
cfg.lorasf = LORASFDEFAULT; // 7-12, initial lora spreadfactor defined in main.conf
|
||||
cfg.txpower = 15; // 2-15, lora tx power
|
||||
cfg.adrmode = 1; // 0=disabled, 1=enabled
|
||||
cfg.screensaver = 0; // 0=disabled, 1=enabled
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include <hal/hal.h>
|
||||
|
||||
// Struct holding devices's runtime configuration
|
||||
|
||||
typedef struct {
|
||||
int8_t lorasf; // 7-12, lora spreadfactor
|
||||
int8_t txpower; // 2-15, lora tx power
|
||||
@ -35,7 +34,6 @@ extern uint64_t uptimecounter;
|
||||
extern osjob_t sendjob;
|
||||
extern int macnum, blenum, countermode, screensaver, adrmode, lorasf, txpower, rlim;
|
||||
extern bool joinstate;
|
||||
//extern std::set<uint64_t, std::greater <uint64_t> > macs;
|
||||
extern std::set<uint64_t> macs;
|
||||
|
||||
#ifdef HAS_DISPLAY
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Basic Config
|
||||
#include "main.h"
|
||||
#include "main.conf"
|
||||
#include "globals.h"
|
||||
|
||||
// LMIC-Arduino LoRaWAN Stack
|
||||
|
@ -22,12 +22,9 @@ Refer to LICENSE.txt file in repository for more details.
|
||||
*/
|
||||
|
||||
// Basic Config
|
||||
#include "main.h"
|
||||
#include "main.conf"
|
||||
#include "globals.h"
|
||||
|
||||
// std::set for unified array functions
|
||||
#include <set>
|
||||
|
||||
// OLED driver
|
||||
#include <U8x8lib.h>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
// checks commands and executes each command with 1 argument per command
|
||||
|
||||
// Basic Config
|
||||
#include "main.h"
|
||||
#include "main.conf"
|
||||
#include "globals.h"
|
||||
|
||||
// LMIC-Arduino LoRaWAN Stack
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Basic Config
|
||||
#include "main.h"
|
||||
#include "main.conf"
|
||||
#include "globals.h"
|
||||
|
||||
// ESP32 Functions
|
||||
@ -37,7 +37,7 @@ extern void wifi_sniffer_packet_handler(void *buff, wifi_promiscuous_pkt_type_t
|
||||
|
||||
void wifi_sniffer_init(void) {
|
||||
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
|
||||
cfg.nvs_enable = 0; // we don't want wifi settings from NVRAM
|
||||
cfg.nvs_enable = 0; // we don't need any wifi settings from NVRAM
|
||||
wifi_promiscuous_filter_t filter = {.filter_mask = WIFI_PROMIS_FILTER_MASK_MGMT}; // we need only MGMT frames
|
||||
ESP_ERROR_CHECK(esp_wifi_init(&cfg));
|
||||
ESP_ERROR_CHECK(esp_wifi_set_country(&wifi_country));
|
||||
|
Loading…
Reference in New Issue
Block a user