Breytt í main system --> motor_controller

This commit is contained in:
2026-09-28 10:33:27 +00:00
parent 937ca7df1b
commit 52f0d2052a
+5 -5
View File
@@ -18,7 +18,7 @@ MotorDriver motor;
P_controller controller(12.5); P_controller controller(12.5);
MotorController system( MotorController motor_controller(
encoder, encoder,
motor, motor,
controller controller
@@ -51,13 +51,13 @@ int main()
sei(); sei();
system.set_states( motor_controller.set_states(
&initialization_state, &initialization_state,
&operational_state &operational_state
); );
system.begin(); motor_controller.begin();
while (true) while (true)
@@ -68,12 +68,12 @@ int main()
if (c != '\n' && c != '\r') if (c != '\n' && c != '\r')
{ {
system.command(c); motor_controller.command(c);
} }
} }
system.update(); motor_controller.update();
} }