diff --git a/.vscode/settings.json b/.vscode/settings.json index b8d72a8..cbf4d73 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -87,6 +87,8 @@ "Keine", "kleiax", "Lebennig", + "pidl", + "pidr", "Punica", "RHEDE", "TPMOBIL", diff --git a/doc/Notes and TODOs/TODO allgemein.txt b/doc/Notes and TODOs/TODO allgemein.txt index 4fadd46..b9552c1 100644 --- a/doc/Notes and TODOs/TODO allgemein.txt +++ b/doc/Notes and TODOs/TODO allgemein.txt @@ -1,3 +1,4 @@ - -> Document the Akku lib + -> Document the battery pack lib -> Program underfloorLighting + -> Program battery pack tracking diff --git a/src/main.cpp b/src/main.cpp index bb62579..7917572 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -46,7 +46,6 @@ DebugMqtt* debugMqtt; void callbackControllerAction(void); void callbackControllerConnect(void); void i2cScanner(void); -void restart(void); void makeMenu(void); @@ -65,7 +64,7 @@ void setup() { std::cout.rdbuf(bufMqtt); std::cout << "Welcome to Kleiax-Rover" << std::endl; - std::cout << "All actions from the main programm run on Core -> " << xPortGetCoreID() << std::endl; + std::cout << "All actions from the main program run on Core -> " << xPortGetCoreID() << std::endl; Ps3.attach(callbackControllerAction); Ps3.attachOnConnect(callbackControllerConnect); @@ -130,7 +129,8 @@ void callbackControllerConnect() { std::cout << "Controller connected to ESP32" << std::endl; std::cout << "All actions from the Controller run on Core -> " << xPortGetCoreID() << std::endl; - // TODO: Display is not functional without this seconde init, first init is in setup() + // Display is not functional without this seconde init, first init is in setup(), + // because after the setup the other core control the display. lcd->init(); main_m->printMenu(); } @@ -140,33 +140,29 @@ void i2cScanner() { byte error, address; int nDevices; - Serial.println("Scanning..."); + std::cout << "Scanning..." << std::endl; nDevices = 0; for(address = 1; address < 127; address++ ) { Wire.beginTransmission(address); error = Wire.endTransmission(); if (error == 0) { - Serial.print("I2C device found at address 0x"); + std::cout << "I2C device found at address 0x"; if (address<16) - Serial.print("0"); - Serial.println(address,HEX); + std::cout << "0"; + std::cout << std::hex << address << std::endl; nDevices++; } else if (error==4) { - Serial.print("Unknow error at address 0x"); + std::cout << "Unknow error at address 0x"; if (address<16) - Serial.print("0"); - Serial.println(address,HEX); + std::cout << "0"; + std::cout << std::hex << address << std::endl; } } if (nDevices == 0) - Serial.println("No I2C devices found\n"); + std::cout << "No I2C devices found\n" << std::endl; else - Serial.println("done\n"); -} - -void restart() { - ESP.restart(); + std::cout << "done\n" << std::endl; } void makeMenu() { @@ -174,6 +170,10 @@ void makeMenu() { std::cout << "Dummy in Action" <