Added Battery to MenuBattery

This commit is contained in:
2022-03-04 14:36:12 +01:00
parent 77aa588ca0
commit bfa571898f
4 changed files with 17 additions and 17 deletions
+6 -1
View File
@@ -27,6 +27,7 @@
#include "moveControl.h"
#include "network.h"
#include "debugMqtt.h"
#include "battery.h"
#include "menu.h"
#include "menuAction.h"
@@ -44,6 +45,7 @@ LiquidCrystal_I2C* lcd;
OutputBuf* outputBuf;
DebugMqtt* debugMqtt = nullptr;
BluetoothSerial* serialBT = nullptr;
Battery* mainBattery;
bool wifiIsActive;
@@ -57,6 +59,8 @@ void setup() {
Serial.begin(115200);
char wifiIndicator = 'X';
mainBattery = new Battery(35, 690000, 220000);
Wire.begin(21, 19);
// i2cScanner();
lcd = new LiquidCrystal_I2C(0x3F,16,2);
@@ -109,6 +113,7 @@ void loop() {
}
driveManager.loop();
mainBattery->loop();
// static uint32_t lastMillis = 0;
// if (millis() - lastMillis > 2000) {
@@ -215,7 +220,7 @@ void makeMenu() {
MenuCaptureRoute* cap_m = new MenuCaptureRoute(&driveManager);
MenuAutopilot* auto_m = new MenuAutopilot(&driveManager);
MenuGPS* gps_m = new MenuGPS(driveManager.getNavigation()->getGPS());
MenuAkku* akku_m = new MenuAkku();
MenuAkku* akku_m = new MenuAkku(mainBattery);
// Set Menus on LCD
main_m->setLcd(lcd);