summaryrefslogtreecommitdiff
path: root/n/es-2006/src/servo_motor.c
diff options
context:
space:
mode:
Diffstat (limited to 'n/es-2006/src/servo_motor.c')
-rw-r--r--n/es-2006/src/servo_motor.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/n/es-2006/src/servo_motor.c b/n/es-2006/src/servo_motor.c
index 9112067..84e4d80 100644
--- a/n/es-2006/src/servo_motor.c
+++ b/n/es-2006/src/servo_motor.c
@@ -41,7 +41,7 @@
#define SRVM_TOTEML_PIN 3 /* first totem */
#define SRVM_TOTEMR_PIN 2 /* second totem */
/** Table for the time spend by each servo in high position. */
-volatile uint8_t servo_time[3] = { SRVM_TRASH_POS_CLOSE, SRVM_LEFT_POS_IN, SRVM_RIGHT_POS_IN };
+volatile uint8_t servo_time[3] = { SRVM_TRASH_POS_CLOSE, SRVM_RIGHT_POS_IN, SRVM_LEFT_POS_IN };
/** Different states of this module. */
#define SRVM_STATE_SLEEP 0
@@ -89,11 +89,12 @@ servo_motor_set_pos (uint8_t servo_mask, uint8_t servo_pos)
SRVM_TRASH_POS_CLOSE);
/* Totem1 */
else if (num == 1)
+ UTILS_BOUND (servo_time[num], SRVM_RIGHT_POS_OUT,
+ SRVM_RIGHT_POS_IN);
+ /* Totem Left */
+ else if (num == 2)
UTILS_BOUND (servo_time[num], SRVM_LEFT_POS_IN,
SRVM_LEFT_POS_OUT);
- else if (num == 2)
- UTILS_BOUND (servo_time[num], SRVM_RIGHT_POS_IN,
- SRVM_RIGHT_POS_OUT);
}
}