summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorburg2004-09-15 22:28:15 +0000
committerburg2004-09-15 22:28:15 +0000
commit9011dd0d186e393c1a9e4d07801689fdcfc04a91 (patch)
treeb58ffa0f21821b40e4e01b35426b7ae50729d9a1
parentf8fa5002fea56bf7b8a95ca0c184808604cee0ac (diff)
Ajout de la commande Reset
-rw-r--r--n/accel/Makefile2
-rw-r--r--n/accel/accel.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/n/accel/Makefile b/n/accel/Makefile
index 618ee22..fe8d6ea 100644
--- a/n/accel/Makefile
+++ b/n/accel/Makefile
@@ -2,7 +2,7 @@ PROGS =accel
SOURCES = accel.c calcul.c
DOC = howto-avr.html
EXTRACTDOC =
-MODULES = n/avr/proto n/avr/rs232
+MODULES = n/avr/proto n/avr/rs232 n/avr/utils
CONFIGFILE = avrconfig.h
# atmega8, atmega8535, atmega128...
MCU_TARGET = atmega8
diff --git a/n/accel/accel.c b/n/accel/accel.c
index 3598272..eaa848a 100644
--- a/n/accel/accel.c
+++ b/n/accel/accel.c
@@ -36,6 +36,7 @@
#include <string.h>
#include <n/avr/rs232/rs232.h>
#include <n/avr/proto/proto.h>
+#include <n/avr/utils/utils.h>
#include "calcul.h"
#include "avrconfig.h"
@@ -64,8 +65,6 @@ uint8_t command;
/* Variable Globale
*/
-//volatile enum T_etat etat;
-
/* Interruption input_capture */
SIGNAL(SIG_INPUT_CAPTURE1)
@@ -143,6 +142,7 @@ test_callback (uint8_t c, uint8_t argc, proto_arg_t argv[])
rs232_putc('V');
proto_send2('y',Vy >> 8,Vy);
break;
+ case 'z' : reset;
default : proto_send1('E',2); //erreur 2 Command incorrect
}
}
@@ -195,7 +195,7 @@ main (void)
Vy += (Gy) >> 8;
Timer1 = TCNT1;
//remise dans l'état de capture
- //Todo : remettre dans cette état plutôt
+ //Todo : remettre dans cet état plutôt
etat = strt_at_Ta;
if (command !=0)