summaryrefslogtreecommitdiff
path: root/digital/beacon/src/motor.c
diff options
context:
space:
mode:
Diffstat (limited to 'digital/beacon/src/motor.c')
-rw-r--r--digital/beacon/src/motor.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/digital/beacon/src/motor.c b/digital/beacon/src/motor.c
index 907559ea..330a861c 100644
--- a/digital/beacon/src/motor.c
+++ b/digital/beacon/src/motor.c
@@ -50,3 +50,13 @@ TMotor_state motor_get_state(void)
else
return MOTOR_STOPPED;
}
+
+/* This function starts or stops the motor according to the current state */
+void motor_start_stop_control(void)
+{
+
+ if(motor_get_state == MOTOR_IN_ROTATION)
+ motor_stop();
+ else
+ motor_start();
+}