diff --git a/platformio.ini b/platformio.ini index 0b59267c..de53f14d 100644 --- a/platformio.ini +++ b/platformio.ini @@ -11,8 +11,8 @@ ; ---> SELECT TARGET PLATFORM HERE! <--- [platformio] -env_default = lolin32lite, heltec, generic -;env_default = generic +;env_default = lolin32lite, heltec, generic +env_default = generic ;env_default = heltec ;env_default = ttgov1 ;env_default = ttgov2 diff --git a/src/antenna.h b/src/antenna.h index 14986287..39ff7ec5 100644 --- a/src/antenna.h +++ b/src/antenna.h @@ -1,5 +1,5 @@ -#ifndef antenna_H -#define antenna_H +#ifndef _ANTENNA_H +#define _ANTENNA_H void antenna_init(void); void antenna_select(const uint8_t _ant); diff --git a/src/battery.h b/src/battery.h index 1ee5ad2f..d05dc9b1 100644 --- a/src/battery.h +++ b/src/battery.h @@ -1,5 +1,5 @@ -#ifndef battery_H -#define battery_H +#ifndef _BATTERY_H +#define _BATTERY_H #include #include diff --git a/src/blescan.h b/src/blescan.h index fa66b551..7fd4e906 100644 --- a/src/blescan.h +++ b/src/blescan.h @@ -1,5 +1,5 @@ -#ifndef BLESCAN_H -#define BLESCAN_H +#ifndef _BLESCAN_H +#define _BLESCAN_H #include "macsniff.h" diff --git a/src/configmanager.h b/src/configmanager.h index f9c5d3fa..96e24e21 100644 --- a/src/configmanager.h +++ b/src/configmanager.h @@ -1,5 +1,5 @@ -#ifndef CONFIGMANAGER_H -#define CONFIGMANAGER_H +#ifndef _CONFIGMANAGER_H +#define _CONFIGMANAGER_H void eraseConfig(void); void saveConfig(void); diff --git a/src/display.h b/src/display.h index a0ef19a6..9fbd884a 100644 --- a/src/display.h +++ b/src/display.h @@ -1,5 +1,5 @@ -#ifndef DISPLAY_H -#define DISPLAY_H +#ifndef _DISPLAY_H +#define _DISPLAY_H #include diff --git a/src/globals.h b/src/globals.h index 9344ef3f..a904bdb8 100644 --- a/src/globals.h +++ b/src/globals.h @@ -1,3 +1,6 @@ +#ifndef _GLOBALS_H +#define _GLOBALS_H + // The mother of all embedded development... #include @@ -42,6 +45,10 @@ extern std::set macs; extern hw_timer_t *channelSwitch, *sendCycle; extern portMUX_TYPE timerMux; +#ifdef HAS_GPS +#include "gps.h" +#endif + #ifdef HAS_LORA #include "lorawan.h" #endif @@ -50,20 +57,6 @@ extern portMUX_TYPE timerMux; #include "display.h" #endif -#ifdef HAS_GPS -#include "gps.h" -/* -typedef struct { - uint32_t latitude; - uint32_t longitude; - uint8_t satellites; - uint16_t hdop; - uint16_t altitude; -} gpsStatus_t; -extern gpsStatus_t gps_status; // struct for storing gps data -*/ -#endif - #ifdef BLECOUNTER #include "blescan.h" #endif @@ -94,4 +87,6 @@ extern CayenneLPP payload; void reset_counters(void); void blink_LED(uint16_t set_color, uint16_t set_blinkduration); void led_loop(void); -uint64_t uptime(); \ No newline at end of file +uint64_t uptime(); + +#endif \ No newline at end of file diff --git a/src/gps.h b/src/gps.h index c984b005..96f79815 100644 --- a/src/gps.h +++ b/src/gps.h @@ -1,5 +1,5 @@ -#ifndef gps_H -#define gps_H +#ifndef _GPS_H +#define _GPS_H #include // library for parsing NMEA data diff --git a/src/hash.h b/src/hash.h index f69eccfc..010fd6b8 100644 --- a/src/hash.h +++ b/src/hash.h @@ -1,5 +1,5 @@ -#ifndef hash_H -#define hash_H +#ifndef _HASH_H +#define _HASH_H uint32_t rokkit(const char *data, int len); diff --git a/src/led.h b/src/led.h index 9ed8699d..8dd4716c 100644 --- a/src/led.h +++ b/src/led.h @@ -1,5 +1,5 @@ -#ifndef led_H -#define led_H +#ifndef _LED_H +#define _LED_H #ifdef HAS_RGB_LED #include diff --git a/src/lorawan.h b/src/lorawan.h index d81baad2..3467d35c 100644 --- a/src/lorawan.h +++ b/src/lorawan.h @@ -1,5 +1,5 @@ -#ifndef LORAWAN_H -#define LORAWAN_H +#ifndef _LORAWAN_H +#define _LORAWAN_H // LMIC-Arduino LoRaWAN Stack #include diff --git a/src/macsniff.h b/src/macsniff.h index 23ff36a0..ee2d7e7b 100644 --- a/src/macsniff.h +++ b/src/macsniff.h @@ -1,5 +1,5 @@ -#ifndef MACSNIFF_H -#define MACSNIFF_H +#ifndef _MACSNIFF_H +#define _MACSNIFF_H // ESP32 Functions #include diff --git a/src/main.h b/src/main.h index 2c330989..e09abf3d 100644 --- a/src/main.h +++ b/src/main.h @@ -1,5 +1,5 @@ -#ifndef main_H -#define main_H +#ifndef _MAIN_H +#define _MAIN_H #include "led.h" #include "macsniff.h" diff --git a/src/payload.h b/src/payload.h index 53cda054..3a06a948 100644 --- a/src/payload.h +++ b/src/payload.h @@ -1,4 +1,3 @@ - #ifndef _PAYLOAD_H_ #define _PAYLOAD_H_ diff --git a/src/rcommand.h b/src/rcommand.h index 71ee79fe..1121db7a 100644 --- a/src/rcommand.h +++ b/src/rcommand.h @@ -1,5 +1,5 @@ -#ifndef rcommand_H -#define rcommand_H +#ifndef _RCOMMAND_H +#define _RCOMMAND_H #include "senddata.h" #include "configmanager.h" diff --git a/src/senddata.h b/src/senddata.h index 390fa2f3..b2418162 100644 --- a/src/senddata.h +++ b/src/senddata.h @@ -1,5 +1,5 @@ -#ifndef SENDDATA_H -#define SENDDATA_H +#ifndef _SENDDATA_H +#define _SENDDATA_H void senddata(uint8_t port);