code sanitizations
This commit is contained in:
parent
f4a3cb8571
commit
ac0ff020c6
@ -11,8 +11,8 @@
|
|||||||
; ---> SELECT TARGET PLATFORM HERE! <---
|
; ---> SELECT TARGET PLATFORM HERE! <---
|
||||||
[platformio]
|
[platformio]
|
||||||
env_default = heltec_wifi_lora_32
|
env_default = heltec_wifi_lora_32
|
||||||
;env_default = ttgov2
|
|
||||||
;env_default = ttgov1
|
;env_default = ttgov1
|
||||||
|
;env_default = ttgov2
|
||||||
;env_default = lopy
|
;env_default = lopy
|
||||||
;env_default = lopy4
|
;env_default = lopy4
|
||||||
|
|
||||||
|
@ -1,15 +1,10 @@
|
|||||||
// Log Level magic
|
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
// not using this seems to break U8X8LIB
|
// not using this seems to break U8X8LIB
|
||||||
#include <Arduino.h>
|
//#include <Arduino.h>
|
||||||
|
|
||||||
// Local logging tag
|
|
||||||
static const char *TAG = "blecount";
|
|
||||||
|
|
||||||
// Basic Config
|
// Basic Config
|
||||||
|
#include "main.h"
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "loraconf.h"
|
//#include "loraconf.h"
|
||||||
|
|
||||||
#ifdef BLECOUNTER
|
#ifdef BLECOUNTER
|
||||||
#include <BLEDevice.h>
|
#include <BLEDevice.h>
|
||||||
@ -17,6 +12,9 @@ static const char *TAG = "blecount";
|
|||||||
#include <BLEScan.h>
|
#include <BLEScan.h>
|
||||||
#include <BLEAdvertisedDevice.h>
|
#include <BLEAdvertisedDevice.h>
|
||||||
|
|
||||||
|
// Local logging tag
|
||||||
|
static const char *TAG = "blecount";
|
||||||
|
|
||||||
class MyAdvertisedDeviceCallbacks: public BLEAdvertisedDeviceCallbacks {
|
class MyAdvertisedDeviceCallbacks: public BLEAdvertisedDeviceCallbacks {
|
||||||
void onResult(BLEAdvertisedDevice advertisedDevice) {
|
void onResult(BLEAdvertisedDevice advertisedDevice) {
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
/* configmanager persists runtime configuration using NVRAM of ESP32*/
|
/* configmanager persists runtime configuration using NVRAM of ESP32*/
|
||||||
|
|
||||||
|
#include "main.h"
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include <nvs.h>
|
#include <nvs.h>
|
||||||
#include <nvs_flash.h>
|
#include <nvs_flash.h>
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
|
|
||||||
// Basic Config
|
// Basic Config
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
// #include <Arduino.h>
|
|
||||||
|
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "loraconf.h"
|
|
||||||
|
|
||||||
// LMIC-Arduino LoRaWAN Stack
|
// LMIC-Arduino LoRaWAN Stack
|
||||||
|
#include "loraconf.h"
|
||||||
#include <lmic.h>
|
#include <lmic.h>
|
||||||
#include <hal/hal.h>
|
#include <hal/hal.h>
|
||||||
|
|
||||||
|
49
src/main.cpp
49
src/main.cpp
@ -1,27 +1,29 @@
|
|||||||
/*
|
/*
|
||||||
*
|
|
||||||
* Oliver Brandmueller <ob@sysadm.in> 2017/2018
|
|
||||||
* Klaus Wilting <verkehrsrot@arcor.de> 2018
|
|
||||||
*
|
|
||||||
* some lines of code taken from:
|
|
||||||
*
|
|
||||||
* Copyright (c) 2017, Łukasz Marcin Podkalicki <lpodkalicki@gmail.com>
|
|
||||||
* ESP32/016 WiFi Sniffer.
|
|
||||||
* https://github.com/lpodkalicki/blog/tree/master/esp32/016_wifi_sniffer
|
|
||||||
*
|
|
||||||
* Arduino-LMIC Library
|
|
||||||
* TTN OTAA Example
|
|
||||||
* https://github.com/matthijskooijman/arduino-lmic/blob/master/examples/ttn-otaa/
|
|
||||||
*
|
|
||||||
* nkolban esp32 snippets
|
|
||||||
* BLE Scan
|
|
||||||
* https://github.com/nkolban/esp32-snippets/tree/master/cpp_utils/tests/BLETests/Arduino/BLE_scan
|
|
||||||
*
|
|
||||||
* parts of code in lorawan.cpp has been grabbed from RadioHead Library
|
|
||||||
*/
|
|
||||||
|
|
||||||
// First things first
|
Copyright 2018 Oliver Brandmueller <ob@sysadm.in>
|
||||||
|
Copyright 2018 Klaus Wilting <verkehrsrot@arcor.de>
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
NOTICE:
|
||||||
|
Parts of the source files in this repository are made available under different licenses.
|
||||||
|
Refer to LICENSE.txt file in repository for more details.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Basic Config
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
#include "globals.h"
|
||||||
|
|
||||||
// std::set for unified array functions
|
// std::set for unified array functions
|
||||||
#include <set>
|
#include <set>
|
||||||
@ -30,13 +32,10 @@
|
|||||||
#include <U8x8lib.h>
|
#include <U8x8lib.h>
|
||||||
|
|
||||||
// LMIC-Arduino LoRaWAN Stack
|
// LMIC-Arduino LoRaWAN Stack
|
||||||
|
#include "loraconf.h"
|
||||||
#include <lmic.h>
|
#include <lmic.h>
|
||||||
#include <hal/hal.h>
|
#include <hal/hal.h>
|
||||||
|
|
||||||
// Basic Config
|
|
||||||
#include "loraconf.h"
|
|
||||||
#include "globals.h"
|
|
||||||
|
|
||||||
// WiFi Functions
|
// WiFi Functions
|
||||||
#include <esp_wifi.h>
|
#include <esp_wifi.h>
|
||||||
#include <esp_wifi_types.h>
|
#include <esp_wifi_types.h>
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
// parses multiple number of command / value pairs from LoRaWAN remote command port (RCMDPORT)
|
// parses multiple number of command / value pairs from LoRaWAN remote command port (RCMDPORT)
|
||||||
// checks commands and executes each command with 1 argument per command
|
// checks commands and executes each command with 1 argument per command
|
||||||
|
|
||||||
|
// Basic Config
|
||||||
|
#include "main.h"
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
|
|
||||||
// Local logging tag
|
// Local logging tag
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
#include "main.h"
|
|
||||||
|
|
||||||
#include <Arduino.h>
|
|
||||||
|
|
||||||
// Basic Config
|
// Basic Config
|
||||||
|
#include "main.h"
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "loraconf.h"
|
|
||||||
|
|
||||||
// WiFi Functions
|
// WiFi Functions
|
||||||
#include <esp_wifi.h>
|
#include <esp_wifi.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user