bætti aftur við lyklaborðinu til þess að geta prófað allt saman
This commit is contained in:
+2
-2
@@ -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;
|
||||
|
||||
@@ -24,12 +24,10 @@ void InitializationState::update()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void InitializationState::command(char c)
|
||||
{
|
||||
(void)c;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void InitializationState::exit()
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -92,7 +92,6 @@ void OperationalState::command(char c)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void OperationalState::exit()
|
||||
{
|
||||
context->stop_motor();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user