Part 2 nýjir kóðar, fyrir STOP og Fault kerfi

This commit is contained in:
2026-09-30 11:52:06 +00:00
parent 7ca9c51268
commit d96da75bdf
8 changed files with 154 additions and 4 deletions
+17
View File
@@ -11,9 +11,26 @@ void OperationalState::enter()
digitalWrite(LED_BUILTIN, HIGH);
}
// Part 1
//void OperationalState::update()
//{
// context->run_speed_controller();
//}
// Part 2
void OperationalState::update()
{
if (context->fault_active())
{
Serial.println("Fault detected");
context->to_stopped();
return;
}
context->run_speed_controller();
}