disabled Lora by define
This commit is contained in:
		| @@ -17,7 +17,9 @@ | ||||
| #include "globals.h" | ||||
| #include "dtc.h" | ||||
| #include "common.h" | ||||
| #ifdef FEATURE_ENABLE_LORA | ||||
| #include "lora_net.h" | ||||
| #endif | ||||
|  | ||||
| #ifdef WIFI_CLIENT | ||||
| #include <WiFiMulti.h> | ||||
| @@ -46,10 +48,13 @@ void SetBatteryType(batteryType_t type); | ||||
| void ProcessKeyCombos(bool *btnState); | ||||
| void OverrideDisplay(const uint8_t *message, uint32_t time); | ||||
| void initGlobals(); | ||||
| void setMPins_Helper(int pin, int status); | ||||
|  | ||||
| #ifdef FEATURE_ENABLE_LORA | ||||
| void setMPins_Helper(int pin, int status); | ||||
| void tmrCallback_StatusSender(); | ||||
| Ticker tmrStatusSender(tmrCallback_StatusSender, 30000, 0, MILLIS); | ||||
| #endif | ||||
|  | ||||
| void tmrCallback_PowerMonitor(); | ||||
| Ticker tmrPowerMonitor(tmrCallback_PowerMonitor, 10000, 0, MILLIS); | ||||
| void tmrCallback_FactionTicker(); | ||||
| @@ -75,11 +80,12 @@ void initGlobals() | ||||
| 	globals.resumeStatus = sysStat_Normal; | ||||
| 	globals.systemStatus = sysStat_Startup; | ||||
| } | ||||
|  | ||||
| #ifdef FEATURE_ENABLE_LORA | ||||
| void setMPins_Helper(int pin, int status) | ||||
| { | ||||
| 	i2c_io.write(pin, status); | ||||
| } | ||||
| #endif | ||||
|  | ||||
| void setup() | ||||
| { | ||||
| @@ -120,6 +126,7 @@ void setup() | ||||
| 		Serial.print("INA219 not Initialized\n"); | ||||
| 	} | ||||
|  | ||||
| #ifdef FEATURE_ENABLE_LORA | ||||
| 	if (InitLoRa(&setMPins_Helper)) | ||||
| 	{ | ||||
| 		Serial.printf("Initialized LoRa_Transceiver"); | ||||
| @@ -129,6 +136,7 @@ void setup() | ||||
| 	{ | ||||
| 		Serial.print("LoRa not Initialized\n"); | ||||
| 	} | ||||
| #endif | ||||
|  | ||||
| #ifdef FEATURE_ENABLE_WIFI_CLIENT | ||||
| 	WiFi.mode(WIFI_STA); | ||||
| @@ -218,7 +226,11 @@ void loop() | ||||
| 	ArduinoOTA.handle(); | ||||
| 	SevenSeg_Output(); | ||||
| 	EEPROM_Process(); | ||||
|  | ||||
| #ifdef FEATURE_ENABLE_LORA | ||||
| 	tmrStatusSender.update(); | ||||
| 	LoRa_Process(); | ||||
| #endif | ||||
|  | ||||
| #ifdef CAPTIVE | ||||
| 	dnsServer.processNextRequest(); | ||||
| @@ -362,10 +374,12 @@ void tmrCallback_InputGetter() | ||||
| 	} | ||||
| } | ||||
|  | ||||
| #ifdef FEATURE_ENABLE_LORA | ||||
| void tmrCallback_StatusSender() | ||||
| { | ||||
| 	sendStatus_LoRa(); | ||||
| } | ||||
| #endif | ||||
|  | ||||
| void tmrCallback_PowerMonitor() | ||||
| { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user