pointer as auto declaration
This commit is contained in:
+4
-2
@@ -15,7 +15,7 @@ board_build.partitions = no_ota.csv
|
|||||||
framework = arduino
|
framework = arduino
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
upload_speed = 921600
|
upload_speed = 921600
|
||||||
monitor_port = COM6
|
; monitor_port = COM6
|
||||||
lib_deps =
|
lib_deps =
|
||||||
https://git.kleiax.de/PlatformIO-Libs/SparkFunGNSS.git
|
https://git.kleiax.de/PlatformIO-Libs/SparkFunGNSS.git
|
||||||
knolleary/PubSubClient@^2.8
|
knolleary/PubSubClient@^2.8
|
||||||
@@ -26,11 +26,13 @@ lib_deps =
|
|||||||
https://git.kleiax.de/PlatformIO-Libs/Menu.git
|
https://git.kleiax.de/PlatformIO-Libs/Menu.git
|
||||||
nrf24/RF24@^1.4.5
|
nrf24/RF24@^1.4.5
|
||||||
jrowberg/I2Cdevlib-MPU6050@^1.0.0
|
jrowberg/I2Cdevlib-MPU6050@^1.0.0
|
||||||
upload_port = COM6
|
; upload_port = COM6
|
||||||
test_ignore = test_desktop
|
test_ignore = test_desktop
|
||||||
build_type = debug
|
build_type = debug
|
||||||
monitor_filters = esp32_exception_decoder
|
monitor_filters = esp32_exception_decoder
|
||||||
check_tool = clangtidy
|
check_tool = clangtidy
|
||||||
|
check_flags =
|
||||||
|
clangtidy: --checks=*,-llvmlibc
|
||||||
|
|
||||||
[env:native]
|
[env:native]
|
||||||
platform = native
|
platform = native
|
||||||
|
|||||||
@@ -87,10 +87,10 @@ void MenuRoute::init() {
|
|||||||
this->mainMenu->setLcd(this->lcd);
|
this->mainMenu->setLcd(this->lcd);
|
||||||
pointsMenu->setLcd(this->lcd);
|
pointsMenu->setLcd(this->lcd);
|
||||||
|
|
||||||
MenuIntInput* importWrapper = new MenuIntInput(1, new MenuRouteWrapper(this, &MenuRoute::importRoute));
|
auto importWrapper = new MenuIntInput(1, new MenuRouteWrapper(this, &MenuRoute::importRoute));
|
||||||
MenuIntInput* exportWrapper = new MenuIntInput(1, new MenuRouteWrapper(this, &MenuRoute::exportRoute));
|
auto exportWrapper = new MenuIntInput(1, new MenuRouteWrapper(this, &MenuRoute::exportRoute));
|
||||||
MenuIntInput* deleteWrapper = new MenuIntInput(1, new MenuRouteWrapper(this, &MenuRoute::deleteRoute));
|
auto deleteWrapper = new MenuIntInput(1, new MenuRouteWrapper(this, &MenuRoute::deleteRoute));
|
||||||
MenuActionRoute* clearWrapper = new MenuActionRoute(this, &MenuRoute::clearRoute);
|
auto clearWrapper = new MenuActionRoute(this, &MenuRoute::clearRoute);
|
||||||
|
|
||||||
importWrapper->setLcd(this->lcd);
|
importWrapper->setLcd(this->lcd);
|
||||||
importWrapper->setMinMax(0, 100);
|
importWrapper->setMinMax(0, 100);
|
||||||
|
|||||||
@@ -85,18 +85,18 @@ void MenuTestMode::init() {
|
|||||||
|
|
||||||
// Create menu
|
// Create menu
|
||||||
this->mainMenu = new Menu;
|
this->mainMenu = new Menu;
|
||||||
Menu* engineMenu = new Menu;
|
auto engineMenu = new Menu;
|
||||||
Menu* lightMenu = new Menu;
|
auto lightMenu = new Menu;
|
||||||
Menu* encoderMenu = new Menu;
|
auto encoderMenu = new Menu;
|
||||||
// Sound
|
// Sound
|
||||||
// Ping google
|
// Ping google
|
||||||
|
|
||||||
MenuIntInput* drivingMenu = new MenuIntInput(2, new MenuTestModeWrapper(this, &TestMode::drive));
|
auto drivingMenu = new MenuIntInput(2, new MenuTestModeWrapper(this, &TestMode::drive));
|
||||||
MenuIntInput* engineLeftMenu = new MenuIntInput(2, new MenuTestModeWrapper(this, &TestMode::leftEngine));
|
auto engineLeftMenu = new MenuIntInput(2, new MenuTestModeWrapper(this, &TestMode::leftEngine));
|
||||||
MenuIntInput* engineRightMenu = new MenuIntInput(2, new MenuTestModeWrapper(this, &TestMode::rightEngine));
|
auto engineRightMenu = new MenuIntInput(2, new MenuTestModeWrapper(this, &TestMode::rightEngine));
|
||||||
MenuIntInput* engineBothMenu = new MenuIntInput(2, new MenuTestModeWrapper(this, &TestMode::bothEngine));
|
auto engineBothMenu = new MenuIntInput(2, new MenuTestModeWrapper(this, &TestMode::bothEngine));
|
||||||
SpeedometerTest* encoderLeftMenu = new SpeedometerTest(this->testMode->getSpeedometerLeft());
|
auto encoderLeftMenu = new SpeedometerTest(this->testMode->getSpeedometerLeft());
|
||||||
SpeedometerTest* encoderRightMenu = new SpeedometerTest(this->testMode->getSpeedometerRight());
|
auto encoderRightMenu = new SpeedometerTest(this->testMode->getSpeedometerRight());
|
||||||
|
|
||||||
|
|
||||||
// Set menus on LCD
|
// Set menus on LCD
|
||||||
|
|||||||
+16
-16
@@ -203,22 +203,22 @@ void makeMenu() {
|
|||||||
// Create Menu
|
// Create Menu
|
||||||
main_m = new Menu();
|
main_m = new Menu();
|
||||||
main_m->setLcd(lcdWrapper);
|
main_m->setLcd(lcdWrapper);
|
||||||
Menu* mode_m = new Menu();
|
auto mode_m = new Menu();
|
||||||
Menu* set_m = new Menu();
|
auto set_m = new Menu();
|
||||||
Menu* pid_m = new Menu();
|
auto pid_m = new Menu();
|
||||||
MenuIntInput* pidl_m = new MenuIntInput(3, new MenuPidSettings(moveController.getPID(0)));
|
auto pidl_m = new MenuIntInput(3, new MenuPidSettings(moveController.getPID(0)));
|
||||||
MenuIntInput* pidr_m = new MenuIntInput(3, new MenuPidSettings(moveController.getPID(1)));
|
auto pidr_m = new MenuIntInput(3, new MenuPidSettings(moveController.getPID(1)));
|
||||||
MenuIntInput* speed_m = new MenuIntInput(2, new MenuSpeed(driveManager->getDrivingSpeedsRef()));
|
auto speed_m = new MenuIntInput(2, new MenuSpeed(driveManager->getDrivingSpeedsRef()));
|
||||||
MenuManualControl* man_m = new MenuManualControl(driveManager);
|
auto man_m = new MenuManualControl(driveManager);
|
||||||
MenuCaptureRoute* cap_m = new MenuCaptureRoute(driveManager);
|
auto cap_m = new MenuCaptureRoute(driveManager);
|
||||||
MenuAutopilot* auto_m = new MenuAutopilot(driveManager);
|
auto auto_m = new MenuAutopilot(driveManager);
|
||||||
MenuTestMode* testM_m = new MenuTestMode(driveManager);
|
auto testM_m = new MenuTestMode(driveManager);
|
||||||
MenuCalibrateCompass* comp_m = new MenuCalibrateCompass(driveManager);
|
auto comp_m = new MenuCalibrateCompass(driveManager);
|
||||||
MenuSysteminformation* sys_m = new MenuSysteminformation(mainBattery);
|
auto sys_m = new MenuSysteminformation(mainBattery);
|
||||||
MenuSensorData* sen_m = new MenuSensorData(sensorData);
|
auto sen_m = new MenuSensorData(sensorData);
|
||||||
//TODO: Wie bekommt jeder die dumme Route?
|
//TODO: Wie bekommt jeder die dumme Route?
|
||||||
MenuRoute* rout_m = new MenuRoute(new Route());
|
auto rout_m = new MenuRoute(new Route());
|
||||||
MenuCalibrateBattery* bat_m = new MenuCalibrateBattery(mainBattery);
|
auto bat_m = new MenuCalibrateBattery(mainBattery);
|
||||||
|
|
||||||
auto_m->setUpdateDelay(1000);
|
auto_m->setUpdateDelay(1000);
|
||||||
sys_m->setUpdateDelay(1500);
|
sys_m->setUpdateDelay(1500);
|
||||||
@@ -271,7 +271,7 @@ void makeMenu() {
|
|||||||
controlPad->setMenuControl(main_m);
|
controlPad->setMenuControl(main_m);
|
||||||
}
|
}
|
||||||
|
|
||||||
void restart(void) {
|
void restart() {
|
||||||
lcdWrapper->clear();
|
lcdWrapper->clear();
|
||||||
lcdWrapper->setCursor(0, 0);
|
lcdWrapper->setCursor(0, 0);
|
||||||
lcdWrapper->print("Rebooting ...");
|
lcdWrapper->print("Rebooting ...");
|
||||||
|
|||||||
+1
-2
@@ -151,8 +151,7 @@ PID* MoveControl::getPID(uint8_t side) const {
|
|||||||
return this->left_pid;
|
return this->left_pid;
|
||||||
else if (side == 1)
|
else if (side == 1)
|
||||||
return this->right_pid;
|
return this->right_pid;
|
||||||
else
|
return nullptr;
|
||||||
return nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MoveControl::setSpeedometerDirection(Speedometer *speedometer, double value) {
|
void MoveControl::setSpeedometerDirection(Speedometer *speedometer, double value) {
|
||||||
|
|||||||
Reference in New Issue
Block a user