summaryrefslogtreecommitdiffhomepage
path: root/digital
diff options
context:
space:
mode:
authorJérémy Dufour2008-04-30 01:37:39 +0200
committerJérémy Dufour2008-04-30 01:37:39 +0200
commit5045b6bf70f60c1a663f37688f2d8df2c00bdca0 (patch)
tree2ec6561032aaed957825da20759a04406fe22428 /digital
parentd1970dba0d168fdf9b89f3f7446ea2300fac9d30 (diff)
* digital/io/src
- initialize sharp module during io main init ; - add a fifth sharp and correct their numbering ; - update eeprom key value.
Diffstat (limited to 'digital')
-rw-r--r--digital/io/src/eeprom.avr.c2
-rw-r--r--digital/io/src/main.c2
-rw-r--r--digital/io/src/sharp.h14
3 files changed, 13 insertions, 5 deletions
diff --git a/digital/io/src/eeprom.avr.c b/digital/io/src/eeprom.avr.c
index b16130c6..f3db3932 100644
--- a/digital/io/src/eeprom.avr.c
+++ b/digital/io/src/eeprom.avr.c
@@ -46,7 +46,7 @@
/**
* Current version of the parameters organization.
*/
-#define EEPROM_PARAM_KEY 0x03
+#define EEPROM_PARAM_KEY 0x04
/** @} */
diff --git a/digital/io/src/main.c b/digital/io/src/main.c
index 6a709d0c..580ba883 100644
--- a/digital/io/src/main.c
+++ b/digital/io/src/main.c
@@ -109,6 +109,8 @@ main_init (void)
switch_init ();
/* Start the top FSM */
top_start ();
+ /* Sharp module */
+ sharp_init ();
/* io initialization done */
proto_send0 ('z');
diff --git a/digital/io/src/sharp.h b/digital/io/src/sharp.h
index fa6682cb..2417856e 100644
--- a/digital/io/src/sharp.h
+++ b/digital/io/src/sharp.h
@@ -36,8 +36,9 @@
/**
* Number of sharps.
+ * If you change it, you _must_ update the key of the eeprom module!
*/
-#define SHARP_NUMBER 4
+#define SHARP_NUMBER 5
/**
* Front left sharp.
@@ -45,19 +46,24 @@
#define SHARP_FRONT_LEFT 0
/**
+ * Front middle sharp.
+ */
+#define SHARP_FRONT_MIDDLE 1
+
+/**
* Front right sharp.
*/
-#define SHARP_FRONT_RIGHT 1
+#define SHARP_FRONT_RIGHT 2
/**
* Back left sharp.
*/
-#define SHARP_BACK_LEFT 2
+#define SHARP_BACK_LEFT 3
/**
* Back right sharp.
*/
-#define SHARP_BACK_RIGHT 3
+#define SHARP_BACK_RIGHT 4
/**
* Low (0 index) and high (1 index) thresholds for interpreted sharp values.