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.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/n/es-2006/src/servo_motor.c b/n/es-2006/src/servo_motor.c
index 288f78f..9112067 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_POS_IN, SRVM_POS_IN };
+volatile uint8_t servo_time[3] = { SRVM_TRASH_POS_CLOSE, SRVM_LEFT_POS_IN, SRVM_RIGHT_POS_IN };
/** Different states of this module. */
#define SRVM_STATE_SLEEP 0
@@ -87,10 +87,13 @@ servo_motor_set_pos (uint8_t servo_mask, uint8_t servo_pos)
if (num == 0)
UTILS_BOUND (servo_time[num], SRVM_TRASH_POS_OPEN,
SRVM_TRASH_POS_CLOSE);
- /* Totem* */
- else
- UTILS_BOUND (servo_time[num], SRVM_POS_IN,
- SRVM_POS_OUT);
+ /* Totem1 */
+ else if (num == 1)
+ 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);
}
}