summaryrefslogtreecommitdiff
path: root/n/es-2006/src/main.c
diff options
context:
space:
mode:
authordufourj2006-05-16 23:58:09 +0000
committerdufourj2006-05-16 23:58:09 +0000
commite8634493098188f1a33dfa491a8bfa4b6e5dbd35 (patch)
tree672469a313b11275c38265ec370ae91302d2b8ad /n/es-2006/src/main.c
parentbc5944190b7ae0af55caa84f86d63bf95e40712f (diff)
ES :
- ajout du support des servo moteurs ; - import d'une partie des modifications d'Olivier à la pré-coupe sur l'analyse des capteurs rvb ; - import de la gestion de l'eeprom. TODO : - terminer les imports de la pré-coupe ; - mettre eeprom avec un .h ; - corriger l'interruption qui dure 1.4ms.
Diffstat (limited to 'n/es-2006/src/main.c')
-rw-r--r--n/es-2006/src/main.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/n/es-2006/src/main.c b/n/es-2006/src/main.c
index 8edfb78..c65fd55 100644
--- a/n/es-2006/src/main.c
+++ b/n/es-2006/src/main.c
@@ -35,7 +35,9 @@
#include "sniff_rvb.h" /* RVB sensors analysis */
#include "timer_1.h" /* timer/counter 1 */
#include "others.h" /* define game color mode + jack + frontal sensor */
+#include "sensor_eeprom.c"
#include "barillet.h"
+#include "servo_motor.h"
/* Statistics for RVB sensors */
@@ -103,6 +105,18 @@ proto_callback (uint8_t cmd, uint8_t size, uint8_t *args)
case c ('c', 0 ):
proto_send1b('c', others_selectcoul());
break;
+ /* Load sniff values from eeprom */
+ case c ('l', 0):
+ sensor_eeprom_read_params ();
+ break;
+ /* saVe sniff values from eeprom */
+ case c ('v', 0):
+ sensor_eeprom_write_params ();
+ break;
+ /* Communication with the servo motor */
+ case c ('m', 2):
+ servo_motor_set_pos (args[0], args[1]);
+ break;
// /* contact */
// case c ('TTTTTTTTTTt', 0 ):
// proto_send1b('t', others_contact());
@@ -175,6 +189,8 @@ main (void)
others_init();
/* barillet init */
barillet_init();
+ /* Servo motor init */
+ servo_motor_init ();
/* Enable interrupts */
sei ();