refactor, comment and move speedometerTest
This commit is contained in:
@@ -90,6 +90,7 @@ void MenuTestMode::init() {
|
||||
this->mainMenu = new Menu;
|
||||
Menu* engineMenu = new Menu;
|
||||
Menu* lightMenu = new Menu;
|
||||
Menu* encoderMenu = new Menu;
|
||||
// Sound
|
||||
// Ping google
|
||||
// WheelEncoder
|
||||
@@ -98,6 +99,8 @@ void MenuTestMode::init() {
|
||||
MenuIntInput* engineLeftMenu = new MenuIntInput(2, new MenuTestModeWrapper(this, &TestMode::leftEngine));
|
||||
MenuIntInput* engineRightMenu = new MenuIntInput(2, new MenuTestModeWrapper(this, &TestMode::rightEngine));
|
||||
MenuIntInput* engineBothMenu = new MenuIntInput(2, new MenuTestModeWrapper(this, &TestMode::bothEngine));
|
||||
SpeedometerTest* encoderLeftMenu = new SpeedometerTest(this->testMode->getSpeedometerLeft());
|
||||
SpeedometerTest* encoderRightMenu = new SpeedometerTest(this->testMode->getSpeedometerRight());
|
||||
|
||||
|
||||
// Set menus on LCD
|
||||
@@ -108,6 +111,9 @@ void MenuTestMode::init() {
|
||||
engineBothMenu->setLcd(this->lcd);
|
||||
drivingMenu->setLcd(this->lcd);
|
||||
lightMenu->setLcd(this->lcd);
|
||||
encoderMenu->setLcd(this->lcd);
|
||||
encoderLeftMenu->setLcd(this->lcd);
|
||||
encoderRightMenu->setLcd(this->lcd);
|
||||
|
||||
// Other menu config
|
||||
drivingMenu->setEntry(0, "Centimeter", 100);
|
||||
@@ -140,6 +146,10 @@ void MenuTestMode::init() {
|
||||
|
||||
MenuAction* drivingAction = new MenuAction("Driving", drivingMenu);
|
||||
|
||||
MenuAction* encoderAction = new MenuAction("Encoder", encoderMenu);
|
||||
MenuAction* encoderLeftAction = new MenuAction("Left", encoderLeftMenu);
|
||||
MenuAction* encoderRightAction = new MenuAction("Right", encoderRightMenu);
|
||||
|
||||
MenuAction* lightAction = new MenuAction("Light", lightMenu);
|
||||
MenuAction* lightFlashAction = new MenuAction("Flash", dummy);
|
||||
MenuAction* lightFadeAction = new MenuAction("Fade", dummy);
|
||||
@@ -151,12 +161,16 @@ void MenuTestMode::init() {
|
||||
// Add entrys to the menus
|
||||
this->mainMenu->addEntry(engineAction);
|
||||
this->mainMenu->addEntry(drivingAction);
|
||||
this->mainMenu->addEntry(encoderAction);
|
||||
this->mainMenu->addEntry(lightAction);
|
||||
|
||||
engineMenu->addEntry(engineLeftAction);
|
||||
engineMenu->addEntry(engineRightAction);
|
||||
engineMenu->addEntry(engineBothAction);
|
||||
|
||||
encoderMenu->addEntry(encoderLeftAction);
|
||||
encoderMenu->addEntry(encoderRightAction);
|
||||
|
||||
lightMenu->addEntry(lightFlashAction);
|
||||
lightMenu->addEntry(lightFadeAction);
|
||||
lightMenu->addEntry(lightRedAction);
|
||||
|
||||
Reference in New Issue
Block a user