replace #ifdef with #if to streamline feature setting

This commit is contained in:
Oliver Brandmueller committed 2019-03-11 18:09:01 +01:00
1 parent 8c58fa04a7
commit 4a7525efcb
24 files changed
+84 -71

No files matched your search

+4 -2
View File
@@ -5,9 +5,11 @@
#include "senddata.h"
#include "rcommand.h"
#include "spislave.h"
#if(HAS_LORA)
#include <lmic.h>
#endif
#ifdef HAS_BME
#if(HAS_BME)
#include "bme680mems.h"
#endif
@@ -19,4 +21,4 @@ uint64_t uptime(void);
void reset_counters(void);
uint32_t getFreeRAM();
#endif
#endif
+5 -5
View File
@@ -123,15 +123,15 @@ extern time_t userUTCTime;
#include "payload.h"
#include "blescan.h"
#ifdef HAS_GPS
#if(HAS_GPS)
#include "gpsread.h"
#endif
#ifdef HAS_LORA
#if(HAS_LORA)
#include "lorawan.h"
#endif
#ifdef HAS_DISPLAY
#if(HAS_DISPLAY)
#include "display.h"
#endif
@@ -147,11 +147,11 @@ extern time_t userUTCTime;
#include "antenna.h"
#endif
#ifdef HAS_SENSORS
#if(HAS_SENSORS)
#include "sensor.h"
#endif
#ifdef HAS_BME
#if(HAS_BME)
#include "bme680mems.h"
#endif
+1 -1
View File
@@ -14,7 +14,7 @@
void irqHandler(void *pvParameters);
#ifdef HAS_DISPLAY
#if(HAS_DISPLAY)
#include "display.h"
void IRAM_ATTR DisplayIRQ();
#endif
+3 -1
View File
@@ -16,6 +16,8 @@
#include "irqhandler.h"
#include "led.h"
#include "spislave.h"
#if(HAS_LORA)
#include "lorawan.h"
#endif
#include "timekeeper.h"
#endif
#endif
+1 -1
View File
@@ -18,7 +18,7 @@ void start_ota_update();
int version_compare(const String v1, const String v2);
void display(const uint8_t row, const std::string status,
const std::string msg);
#ifdef HAS_DISPLAY
#if(HAS_DISPLAY)
void show_progress(unsigned long current, unsigned long size);
#endif
+3 -1
View File
@@ -4,7 +4,9 @@
#include "senddata.h"
#include "cyclic.h"
#include "configmanager.h"
#if(HAS_LORA)
#include "lorawan.h"
#endif
#include "macsniff.h"
#include <rom/rtc.h>
#include "cyclic.h"
@@ -24,4 +26,4 @@ typedef struct {
void rcommand(uint8_t cmd[], uint8_t cmdlength);
void do_reset();
#endif
#endif
+3 -1
View File
@@ -2,7 +2,9 @@
#define _SENDDATA_H
#include "spislave.h"
#if(HAS_LORA)
#include "lorawan.h"
#endif
#include "cyclic.h"
extern Ticker sendcycler;
@@ -13,4 +15,4 @@ void checkSendQueues(void);
void flushQueues();
void sendcycle(void);
#endif // _SENDDATA_H_
#endif // _SENDDATA_H_
+1 -1
View File
@@ -6,7 +6,7 @@
#include "TimeLib.h"
#include "irqhandler.h"
#ifdef HAS_GPS
#if(HAS_GPS)
#include "gpsread.h"
#endif
#ifdef HAS_IF482