refactore
all components now have a base class compnent for loop functions
This commit is contained in:
2023-08-18 10:47:35 +02:00
parent 25d37e3970
commit 11d21e2e89
35 changed files with 303 additions and 511 deletions
+4 -3
View File
@@ -135,19 +135,20 @@ void loop() {
if (wifiIsActive) {
DebugTimes wifiTime;
Network::checkWiFi();
#ifdef MQTT
bool err = Network::checkMQTT();
if (!err)
std::cout << "loop(): checkMQTT returns false" << std::endl;
#endif //MQTT
wifiTime.stopConsol("WiFi-Time", 10);
}
driveManager->loop();
controlPad->loop();
main_m->update();
lcdWrapper->loop();
mainBattery->loop();
bool newValues = mainBattery->loop();
if (newValues) {
if (mainBattery->isNewValue()) {
static uint8_t batteryLowCounter = 0;
if (mainBattery->isBatteryLow(10))
batteryLowCounter++;