#include cleanup

This commit is contained in:
Klaus K Wilting committed 2020-03-29 18:08:52 +02:00
1 parent 11e91bbd00
commit 87d93f6978
31 files changed
+54 -108

No files matched your search

+4 -1
View File
@@ -1,9 +1,12 @@
#ifndef _BMESENSOR_H
#define _BMESENSOR_H
#include "globals.h"
#include <Wire.h>
#include "globals.h"
#include "irqhandler.h"
#include "configmanager.h"
#ifdef HAS_BME680
#include <bsec.h>
#elif defined HAS_BME280
+4
View File
@@ -2,6 +2,10 @@
#define _BUTTON_H
#include <SimpleButton.h>
#include "irqhandler.h"
#include "senddata.h"
#include "display.h"
#include "payload.h"
void button_init(int pin);
void readButton();
+1 -17
View File
@@ -1,31 +1,15 @@
#ifndef _CYCLIC_H
#define _CYCLIC_H
//#include <lmic.h>
#include "globals.h"
#include "senddata.h"
#include "rcommand.h"
#include "spislave.h"
#if(HAS_LORA)
#include <lmic.h>
#endif
#if (HAS_BME)
#include "bmesensor.h"
#endif
#ifdef HAS_DISPLAY
#include "display.h"
#endif
#if (HAS_SDS011)
#include "sds011read.h"
#endif
#if (HAS_SDCARD)
#include "sdcard.h"
#endif
extern Ticker housekeeper;
-38
View File
@@ -134,42 +134,4 @@ extern TimerHandle_t WifiChanTimer;
extern Timezone myTZ;
extern RTC_DATA_ATTR runmode_t RTC_runmode;
// application includes
#include "led.h"
#include "payload.h"
#include "blescan.h"
#include "power.h"
#if (HAS_GPS)
#include "gpsread.h"
#endif
#if (HAS_LORA)
#include "lorawan.h"
#endif
#ifdef HAS_DISPLAY
#include "display.h"
#endif
#ifdef HAS_MATRIX_DISPLAY
#include "ledmatrixdisplay.h"
#endif
#ifdef HAS_BUTTON
#include "button.h"
#endif
#ifdef HAS_ANTENNA_SWITCH
#include "antenna.h"
#endif
#if (HAS_SENSORS)
#include "sensor.h"
#endif
#if (HAS_BME)
#include "bmesensor.h"
#endif
#endif
+2
View File
@@ -13,11 +13,13 @@
#define PMU_IRQ 0x200
#include "globals.h"
#include "button.h"
#include "cyclic.h"
#include "senddata.h"
#include "timekeeper.h"
#include "bmesensor.h"
#include "power.h"
#include "ledmatrixdisplay.h"
void irqHandler(void *pvParameters);
void mask_user_IRQ();
+1 -2
View File
@@ -1,9 +1,8 @@
#ifndef _LED_H
#define _LED_H
#ifdef HAS_RGB_LED
#include <SmartLeds.h>
#endif
#include "lorawan.h"
// value for HSL color
// see http://www.workwithcolor.com/blue-color-hue-range-01.htm
+1
View File
@@ -3,6 +3,7 @@
#include "LEDMatrix.h"
#include "ledmatrixfonts.h"
#include "ledmatrixdisplay.h"
extern uint8_t MatrixDisplayIsOn;
+1
View File
@@ -8,6 +8,7 @@
#include "hash.h"
#include "senddata.h"
#include "cyclic.h"
#include "led.h"
#define MAC_SNIFF_WIFI 0
#define MAC_SNIFF_BLE 1
+3 -4
View File
@@ -17,9 +17,8 @@
#include "ota.h"
#include "irqhandler.h"
#include "spislave.h"
#if (HAS_LORA)
#include "sensor.h"
#include "lorawan.h"
#endif
#include "timekeeper.h"
#endif
#endif
+3 -1
View File
@@ -4,7 +4,9 @@
#ifdef USE_OTA
#include "globals.h"
#include <ss_oled.h>
#include "led.h"
#include "display.h"
#include <Update.h>
#include <WiFi.h>
#include <WiFiClientSecure.h>
-4
View File
@@ -1,11 +1,7 @@
#ifndef _PAYLOAD_H_
#define _PAYLOAD_H_
#include "paxcounter.conf"
#if (HAS_SDS011)
#include "sds011read.h"
#endif
// MyDevices CayenneLPP 1.0 channels for Synamic sensor payload format
// all payload goes out on LoRa FPort 1
+1
View File
@@ -4,6 +4,7 @@
#include <Arduino.h>
#include <driver/adc.h>
#include <esp_adc_cal.h>
#include "i2c.h"
#include "reset.h"
+4 -5
View File
@@ -1,20 +1,19 @@
#ifndef _RCOMMAND_H
#define _RCOMMAND_H
#include <rom/rtc.h>
#include "senddata.h"
#include "cyclic.h"
#include "configmanager.h"
#if(HAS_LORA)
#include "lorawan.h"
#endif
#include "sensor.h"
#include "macsniff.h"
#include "wifiscan.h"
#include <rom/rtc.h>
#include "cyclic.h"
#include "timekeeper.h"
#if(TIME_SYNC_LORASERVER)
#include "timesync.h"
#endif
#include "blescan.h"
// table of remote commands and assigned functions
typedef struct {
+4
View File
@@ -3,7 +3,11 @@
#include <driver/rtc_io.h>
#include <rom/rtc.h>
#include "i2c.h"
#include "lorawan.h"
#include "display.h"
#include "power.h"
void do_reset(bool warmstart);
void do_after_reset(int reason);
+3 -2
View File
@@ -1,11 +1,12 @@
#ifndef _RTCTIME_H
#define _RTCTIME_H
#include "globals.h"
#include "timekeeper.h"
#include <Wire.h> // must be included here so that Arduino library object file references work
#include <RtcDS3231.h>
#include "globals.h"
#include "timekeeper.h"
extern RtcDS3231<TwoWire> Rtc; // make RTC instance globally available
uint8_t rtc_init(void);
+2 -1
View File
@@ -3,10 +3,11 @@
#include <globals.h>
#include <stdio.h>
#include <SPI.h>
#include <mySD.h>
#include "sds011read.h"
#define SDCARD_FILE_NAME "paxcount.%02d"
#define SDCARD_FILE_HEADER "date, time, wifi, bluet"
+1 -1
View File
@@ -1,8 +1,8 @@
#ifndef _SDS011READ_H
#define _SDS011READ_H
#include "globals.h"
#include <SDS011.h>
#include "globals.h"
#define SDCARD_FILE_HEADER_SDS011 ", PM10,PM25"
+1 -9
View File
@@ -3,18 +3,10 @@
#include "spislave.h"
#include "cyclic.h"
#if(HAS_LORA)
#include "sensor.h"
#include "lorawan.h"
#endif
#ifdef HAS_DISPLAY
#include "display.h"
#endif
#ifdef HAS_SDCARD
#include "sdcard.h"
#endif
extern Ticker sendcycler;
+1
View File
@@ -25,6 +25,7 @@ licenses. Refer to LICENSE.txt file in repository for more details.
#define _SPISLAVE_H
#include "globals.h"
#include "rcommand.h"
esp_err_t spi_init();
-7
View File
@@ -6,16 +6,9 @@
#include "TimeLib.h"
#include "irqhandler.h"
#include "timesync.h"
#if (HAS_GPS)
#include "gpsread.h"
#endif
#ifdef HAS_IF482
#include "if482.h"
#elif defined HAS_DCF77
#include "dcf77.h"
#endif
extern const char timeSetSymbols[];
extern Ticker timesyncer;
+1 -1
View File
@@ -240,4 +240,4 @@ std::array<uint32_t, 1683> vendors = {
0xb84fd5, 0xc0eefb, 0x206e9c, 0x6c2f2c, 0x18227e, 0x30c7ae, 0x501ac5,
0x6045bd, 0x1cb094, 0xe85b5b, 0x0025ae, 0x001dd8, 0x000a75, 0xa4c939,
0xc0dcda, 0x04b429, 0x48794d,
};
};
+8 -4
View File
@@ -3,13 +3,17 @@
// ESP32 Functions
#include <esp_wifi.h>
#include <esp_coexist.h>
#include "coexist_internal.h"
// Hash function for scrambling MAC addresses
#include "hash.h"
#include "hash.h" // Hash function for scrambling MAC addresses
#include "antenna.h" // code for switching wifi antennas
#include "macsniff.h"
void wifi_sniffer_init(void);
void switch_wifi_sniffer (uint8_t state);
void IRAM_ATTR wifi_sniffer_packet_handler(void *buff, wifi_promiscuous_pkt_type_t type);
void switch_wifi_sniffer(uint8_t state);
void IRAM_ATTR wifi_sniffer_packet_handler(void *buff,
wifi_promiscuous_pkt_type_t type);
void switchWifiChannel(TimerHandle_t xTimer);
#endif