diff --git a/Software/USER_SETTINGS.h b/Software/USER_SETTINGS.h index 1a4f300d..87f106e5 100644 --- a/Software/USER_SETTINGS.h +++ b/Software/USER_SETTINGS.h @@ -21,7 +21,7 @@ /* Select inverter communication protocol. See Wiki for which to use with your inverter: https://github.com/dalathegreat/BYD-Battery-Emulator-For-Gen24/wiki */ //#define BYD_CAN //Enable this line to emulate a "BYD Battery-Box Premium HVS" over CAN Bus -#define BYD_MODBUS //Enable this line to emulate a "BYD 11kWh HVM battery" over Modbus RTU +#define BYD_MODBUS //Enable this line to emulate a "BYD 11kWh HVM battery" over Modbus RTU //#define LUNA2000_MODBUS //Enable this line to emulate a "Luna2000 battery" over Modbus RTU //#define PYLON_CAN //Enable this line to emulate a "Pylontech battery" over CAN bus //#define SMA_CAN //Enable this line to emulate a "BYD Battery-Box H 8.9kWh, 7 mod" over CAN bus @@ -30,7 +30,7 @@ /* Other options */ #define DEBUG_VIA_USB //Enable this line to have the USB port output serial diagnostic data while program runs -#define INTERLOCK_REQUIRED //Nissan LEAF specific setting, if enabled requires both high voltage conenctors to be seated before starting +#define INTERLOCK_REQUIRED //Nissan LEAF specific setting, if enabled requires both high voltage conenctors to be seated before starting //#define CONTACTOR_CONTROL //Enable this line to have pins 25,32,33 handle automatic precharge/contactor+/contactor- closing sequence //#define PWM_CONTACTOR_CONTROL //Enable this line to use PWM logic for contactors, which lower power consumption and heat generation //#define DUAL_CAN //Enable this line to activate an isolated secondary CAN Bus using add-on MCP2515 controller (Needed for FoxESS inverters) diff --git a/Software/src/devboard/mqtt/mqtt.cpp b/Software/src/devboard/mqtt/mqtt.cpp index 18d425c6..6d2ff5ca 100644 --- a/Software/src/devboard/mqtt/mqtt.cpp +++ b/Software/src/devboard/mqtt/mqtt.cpp @@ -96,4 +96,4 @@ void mqtt_loop(void) { bool mqtt_publish(const String& topic, const String& payload) { return client.publish(topic.c_str(), payload.c_str()); -} \ No newline at end of file +} diff --git a/Software/src/devboard/utils/timer.h b/Software/src/devboard/utils/timer.h index 7b37c5ad..c610879c 100644 --- a/Software/src/devboard/utils/timer.h +++ b/Software/src/devboard/utils/timer.h @@ -4,13 +4,13 @@ #include class MyTimer { -public: + public: MyTimer(unsigned long interval); bool elapsed(); -private: + private: unsigned long interval; unsigned long previousMillis; }; -#endif // __MYTIMER_H__ \ No newline at end of file +#endif // __MYTIMER_H__ diff --git a/Software/src/devboard/webserver/webserver.h b/Software/src/devboard/webserver/webserver.h index 7490f082..f7370c74 100644 --- a/Software/src/devboard/webserver/webserver.h +++ b/Software/src/devboard/webserver/webserver.h @@ -11,8 +11,10 @@ #include "../../lib/me-no-dev-AsyncTCP/src/AsyncTCP.h" #include "../../lib/me-no-dev-ESPAsyncWebServer/src/ESPAsyncWebServer.h" #include "../../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h" -#include "../config.h" // Needed for LED defines -#include "../mqtt/mqtt.h" // Needed for LED defines +#include "../config.h" // Needed for LED defines +#ifdef MQTT +#include "../mqtt/mqtt.h" +#endif extern uint16_t SOC; //SOC%, 0-100.00 (0-10000) extern uint16_t StateOfHealth; //SOH%, 0-100.00 (0-10000)