summaryrefslogtreecommitdiff
path: root/n/es-2006/src/servo_motor.c
diff options
context:
space:
mode:
authordufourj2006-05-25 20:45:21 +0000
committerdufourj2006-05-25 20:45:21 +0000
commitd4a465bb7fc8737df54ba49ea1b65396daecbdd2 (patch)
tree39154be35117772330ea6dad9bee120811763427 /n/es-2006/src/servo_motor.c
parent261eca7b454fffefe3f1a8b639d6789f9942853c (diff)
ES :
- gestion du grub avec le LCD ; - gestion des servo moteurs des totems.
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);
}
}