ESP32-PaxCounter/src/globals.h

58 lines
1.3 KiB
C
Raw Normal View History

2018-03-18 19:45:17 +01:00
// The mother of all embedded development...
#include <Arduino.h>
// std::set for unified array functions
2018-06-10 21:03:16 +02:00
#include <set>
#include <array>
#include <algorithm>
2018-03-18 19:45:17 +01:00
2018-04-24 22:37:20 +02:00
// OLED Display
2018-04-16 20:56:29 +02:00
#ifdef HAS_DISPLAY
#include <U8x8lib.h>
2018-04-16 20:56:29 +02:00
#endif
2018-03-18 19:45:17 +01:00
// GPS
2018-06-08 22:41:37 +02:00
#ifdef HAS_GPS
#include <TinyGPS++.h>
2018-06-08 22:41:37 +02:00
#endif
2018-07-14 20:07:33 +02:00
#ifdef HAS_LORA
2018-03-18 19:45:17 +01:00
// LMIC-Arduino LoRaWAN Stack
2018-06-10 21:03:16 +02:00
#include <lmic.h>
#include <hal/hal.h>
2018-07-14 20:07:33 +02:00
#endif
2018-03-18 19:45:17 +01:00
2018-04-03 17:47:11 +02:00
// LED controls
2018-04-02 01:36:51 +02:00
#ifdef HAS_RGB_LED
#include <SmartLeds.h>
2018-04-02 01:36:51 +02:00
#endif
2018-04-03 17:47:11 +02:00
#include "rgb_led.h"
2018-04-02 01:36:51 +02:00
#include "macsniff.h"
2018-04-19 15:17:23 +02:00
#include "main.h"
2018-06-16 19:50:36 +02:00
#include "payload.h"
2018-06-08 22:41:37 +02:00
2018-03-21 17:34:11 +01:00
extern configData_t cfg;
2018-07-14 20:07:33 +02:00
extern char display_line6[], display_line7[];
2018-04-17 19:20:54 +02:00
extern uint64_t uptimecounter;
extern int countermode, screensaver, adrmode, lorasf, txpower, rlim;
2018-04-19 10:55:59 +02:00
extern uint16_t macs_total, macs_wifi, macs_ble; // MAC counters
2018-04-28 14:09:27 +02:00
extern std::set<uint16_t> macs;
extern hw_timer_t
2018-06-16 19:50:36 +02:00
*channelSwitch; // hardware timer used for wifi channel switching
#ifdef HAS_GPS
extern gpsStatus_t gps_status; // struct for storing gps data
extern TinyGPSPlus gps; // Make TinyGPS++ instance globally availabe
#endif
// payload encoder
2018-06-17 01:15:02 +02:00
#if PAYLOAD_ENCODER == 1
extern TTNplain payload;
2018-06-17 01:15:02 +02:00
#elif PAYLOAD_ENCODER == 2
2018-06-17 22:41:32 +02:00
extern TTNpacked payload;
2018-06-17 01:15:02 +02:00
#elif PAYLOAD_ENCODER == 3
extern CayenneLPP payload;
2018-06-16 19:50:36 +02:00
#else
#error "No valid payload converter defined"
2018-06-17 01:15:02 +02:00
#endif