bætti aftur við lyklaborðinu til þess að geta prófað allt saman

This commit is contained in:
2026-10-16 16:04:29 +00:00
parent 0ee6879f99
commit e9f9a6d15c
11 changed files with 10 additions and 15 deletions
+2 -2
View File
@@ -12,12 +12,12 @@
#include "motor_controller.h"
#include "initialization_state.h"
#include "pre_operational_state.h"
#include "operational_state.h"
#include "stopped_state.h"
#include "node_application.h"
static RotaryEncoderDriver encoder;
static MotorDriver motor;
+1 -3
View File
@@ -24,12 +24,10 @@ void InitializationState::update()
}
}
void InitializationState::command(char c)
{
(void)c;
}
}
void InitializationState::exit()
{
-2
View File
@@ -64,7 +64,6 @@ void MotorController::update()
}
}
void MotorController::command(char c)
{
if (current_state != nullptr)
@@ -73,7 +72,6 @@ void MotorController::command(char c)
}
}
void MotorController::to_initialization()
{
transition_to(initialization_state);
-1
View File
@@ -92,7 +92,6 @@ void OperationalState::command(char c)
}
}
void OperationalState::exit()
{
context->stop_motor();
-2
View File
@@ -49,7 +49,6 @@ void StoppedState::update()
// Commands for Stopped [ r = reset and o for operational]
void StoppedState::command(char c)
{
if (c == 'r' || c == 'R')
@@ -74,7 +73,6 @@ void StoppedState::command(char c)
}
}
void StoppedState::exit()
{
context->led_off();