summaryrefslogtreecommitdiff
path: root/digital/io-hub/src
diff options
context:
space:
mode:
authorNicolas Schodet2012-03-30 23:26:42 +0200
committerNicolas Schodet2012-04-02 00:51:51 +0200
commitecfa80f598c954e2c4b8d70279ae6371cd4187cf (patch)
treeb88a968b6bdc22e35e5cf1eef61d2a773980d05a /digital/io-hub/src
parentd66664cde28a490759fd6f3a11791b9f20c1933d (diff)
eurobot/2012, digital/io-hub/src/guybrush: change cabling
Add lower clamps sensors and move outputs.
Diffstat (limited to 'digital/io-hub/src')
-rw-r--r--digital/io-hub/src/guybrush/contact_defs.h10
-rw-r--r--digital/io-hub/src/guybrush/output_defs.h6
-rw-r--r--digital/io-hub/src/guybrush/simu.host.c4
-rw-r--r--digital/io-hub/src/guybrush/simu.host.h4
4 files changed, 18 insertions, 6 deletions
diff --git a/digital/io-hub/src/guybrush/contact_defs.h b/digital/io-hub/src/guybrush/contact_defs.h
index 55773d78..471c88e5 100644
--- a/digital/io-hub/src/guybrush/contact_defs.h
+++ b/digital/io-hub/src/guybrush/contact_defs.h
@@ -28,8 +28,16 @@
#define CONTACT_COLOR E, 3
#define CONTACT_JACK E, 5
#define CONTACT_STRAT E, 1
+#define CONTACT_LOWER_CLAMP_SENSOR_1 D, 5
+#define CONTACT_LOWER_CLAMP_SENSOR_2 B, 6
+#define CONTACT_LOWER_CLAMP_SENSOR_3 D, 6
+#define CONTACT_LOWER_CLAMP_SENSOR_4 B, 7
#define CONTACT_LIST \
- CONTACT (CONTACT_STRAT)
+ CONTACT (CONTACT_STRAT) \
+ CONTACT (CONTACT_LOWER_CLAMP_SENSOR_1) \
+ CONTACT (CONTACT_LOWER_CLAMP_SENSOR_2) \
+ CONTACT (CONTACT_LOWER_CLAMP_SENSOR_3) \
+ CONTACT (CONTACT_LOWER_CLAMP_SENSOR_4)
#endif /* contact_defs_h */
diff --git a/digital/io-hub/src/guybrush/output_defs.h b/digital/io-hub/src/guybrush/output_defs.h
index c24bbd9c..4a481b8e 100644
--- a/digital/io-hub/src/guybrush/output_defs.h
+++ b/digital/io-hub/src/guybrush/output_defs.h
@@ -25,7 +25,7 @@
*
* }}} */
-#define OUTPUT_PNEUM_OPEN A, 6
+#define OUTPUT_PNEUM_OPEN A, 5
#define OUTPUT_UPPER_CLAMP_OPEN C, 1
#define OUTPUT_UPPER_CLAMP_OUT C, 3
#define OUTPUT_UPPER_CLAMP_IN C, 5
@@ -33,8 +33,8 @@
#define OUTPUT_UPPER_CLAMP_UP C, 4
#define OUTPUT_DOOR_OPEN C, 7
#define OUTPUT_DOOR_CLOSE C, 6
-#define OUTPUT_LOWER_CLAMP_1_OPEN A, 5
-#define OUTPUT_LOWER_CLAMP_2_OPEN F, 5
+#define OUTPUT_LOWER_CLAMP_1_OPEN D, 4
+#define OUTPUT_LOWER_CLAMP_2_OPEN B, 5
#define OUTPUT_LIST \
OUTPUT (OUTPUT_PNEUM_OPEN, 0) \
diff --git a/digital/io-hub/src/guybrush/simu.host.c b/digital/io-hub/src/guybrush/simu.host.c
index 46c2a8fd..d9830575 100644
--- a/digital/io-hub/src/guybrush/simu.host.c
+++ b/digital/io-hub/src/guybrush/simu.host.c
@@ -34,7 +34,9 @@
#include "io.h"
/** AVR registers. */
-uint8_t PORTA, PORTC, PORTF, DDRA, DDRC, DDRF, PINA, PINE, PINF;
+uint8_t PORTA, PORTB, PORTC, PORTD, PORTF;
+uint8_t DDRA, DDRB, DDRC, DDRD, DDRF;
+uint8_t PINA, PINB, PINC, PIND, PINE, PINF;
/** Message types. */
uint8_t simu_mex_pos_report;
diff --git a/digital/io-hub/src/guybrush/simu.host.h b/digital/io-hub/src/guybrush/simu.host.h
index d2b0da91..9b38ee93 100644
--- a/digital/io-hub/src/guybrush/simu.host.h
+++ b/digital/io-hub/src/guybrush/simu.host.h
@@ -28,7 +28,9 @@
#ifdef HOST
-extern uint8_t PORTA, PORTC, PORTF, DDRA, DDRC, DDRF, PINA, PINE, PINF;
+extern uint8_t PORTA, PORTB, PORTC, PORTD, PORTF;
+extern uint8_t DDRA, DDRB, DDRC, DDRD, DDRF;
+extern uint8_t PINA, PINB, PINC, PIND, PINE, PINF;
/** Send general purpose positions to indicate computation results.
* - pos: array of positions to report.