summaryrefslogtreecommitdiffhomepage
path: root/digital/io-hub/src/apbirthday
diff options
context:
space:
mode:
authorNicolas Schodet2013-05-05 16:17:22 +0200
committerNicolas Schodet2013-05-05 16:17:22 +0200
commit41548bb00fb99c18bc86c6c264a691eb837f85a5 (patch)
tree4e9c34476ecdb1dc7c91c09e08df693916a7f11e /digital/io-hub/src/apbirthday
parent0d36c71ffdf7860fbc2e696c064d3979dc8b4073 (diff)
digital/io-hub/src/apbirthday, eurobot/2013, host/simu/robots: update outputs
Diffstat (limited to 'digital/io-hub/src/apbirthday')
-rw-r--r--digital/io-hub/src/apbirthday/hardware.hh4
-rw-r--r--digital/io-hub/src/apbirthday/hardware.host.cc4
-rw-r--r--digital/io-hub/src/apbirthday/hardware.stm32.cc6
-rw-r--r--digital/io-hub/src/apbirthday/plate.cc17
-rw-r--r--digital/io-hub/src/apbirthday/robot.cc4
5 files changed, 13 insertions, 22 deletions
diff --git a/digital/io-hub/src/apbirthday/hardware.hh b/digital/io-hub/src/apbirthday/hardware.hh
index 2d016587..33d10c0c 100644
--- a/digital/io-hub/src/apbirthday/hardware.hh
+++ b/digital/io-hub/src/apbirthday/hardware.hh
@@ -75,9 +75,9 @@ struct Hardware
cherry_plate_left_contact, cherry_plate_right_contact,
cake_arm_out_contact, cake_arm_in_contact;
ucoo::Gpio
- cherry_bad_out, cherry_bad_in,
+ cherry_bad_out,
cherry_plate_up, cherry_plate_down,
- cherry_plate_clamp,
+ cherry_plate_clamp_close, cherry_plate_clamp_open,
cake_arm_out, cake_arm_in,
cake_push_far_out, cake_push_far_in,
cake_push_near_out, cake_push_near_in,
diff --git a/digital/io-hub/src/apbirthday/hardware.host.cc b/digital/io-hub/src/apbirthday/hardware.host.cc
index 80d55eae..bc9cff18 100644
--- a/digital/io-hub/src/apbirthday/hardware.host.cc
+++ b/digital/io-hub/src/apbirthday/hardware.host.cc
@@ -44,10 +44,10 @@ Hardware::Hardware ()
cake_arm_out_contact (host, "cake_arm_out_contact"),
cake_arm_in_contact (host, "cake_arm_in_contact"),
cherry_bad_out (host, "cherry_bad_out"),
- cherry_bad_in (host, "cherry_bad_in"),
cherry_plate_up (host, "cherry_plate_up"),
cherry_plate_down (host, "cherry_plate_down"),
- cherry_plate_clamp (host, "cherry_plate_clamp"),
+ cherry_plate_clamp_close (host, "cherry_plate_clamp_close"),
+ cherry_plate_clamp_open (host, "cherry_plate_clamp_open"),
cake_arm_out (host, "cake_arm_out"),
cake_arm_in (host, "cake_arm_in"),
cake_push_far_out (host, "cake_push_far_out"),
diff --git a/digital/io-hub/src/apbirthday/hardware.stm32.cc b/digital/io-hub/src/apbirthday/hardware.stm32.cc
index 32ffcffd..b92940ed 100644
--- a/digital/io-hub/src/apbirthday/hardware.stm32.cc
+++ b/digital/io-hub/src/apbirthday/hardware.stm32.cc
@@ -46,13 +46,13 @@ Hardware::Hardware ()
cherry_plate_left_contact (GPIOE, 6),
cherry_plate_right_contact (GPIOC, 13),
cake_arm_out_contact (GPIOC, 5), cake_arm_in_contact (GPIOB, 1),
- cherry_bad_out (GPIOE, 0), cherry_bad_in (GPIOE, 1),
+ cherry_bad_out (GPIOA, 15),
cherry_plate_up (GPIOE, 2), cherry_plate_down (GPIOE, 3),
- cherry_plate_clamp (GPIOE, 4),
+ cherry_plate_clamp_close (GPIOE, 0), cherry_plate_clamp_open (GPIOE, 1),
cake_arm_out (GPIOB, 3), cake_arm_in (GPIOB, 4),
cake_push_far_out (GPIOD, 7), cake_push_far_in (GPIOB, 5),
cake_push_near_out (GPIOD, 6), cake_push_near_in (GPIOB, 6),
- glass_lower_clamp_close (GPIOA, 15), glass_lower_clamp_open (GPIOA, 10),
+ glass_lower_clamp_close (GPIOE, 4), glass_lower_clamp_open (GPIOA, 10),
glass_upper_clamp_close (GPIOD, 0), glass_upper_clamp_open (GPIOD, 1),
glass_upper_clamp_up (GPIOD, 3), glass_upper_clamp_down (GPIOC, 10),
gift_out (GPIOD, 4), gift_in (GPIOC, 11),
diff --git a/digital/io-hub/src/apbirthday/plate.cc b/digital/io-hub/src/apbirthday/plate.cc
index 3d3483c0..094fb50f 100644
--- a/digital/io-hub/src/apbirthday/plate.cc
+++ b/digital/io-hub/src/apbirthday/plate.cc
@@ -60,23 +60,14 @@ inline void Plate::arm_up ()
inline void Plate::clamp_open ()
{
-#ifdef TARGET_host
- robot->hardware.cherry_plate_clamp.set (false);
-#else
- robot->hardware.cherry_bad_out.set (false);
- robot->hardware.cherry_bad_in.set (true);
-#endif
+ robot->hardware.cherry_plate_clamp_close.set (false);
+ robot->hardware.cherry_plate_clamp_open.set (true);
}
inline void Plate::clamp_close ()
{
-#ifdef TARGET_host
- robot->hardware.cherry_plate_clamp.set (true);
-#else
- robot->hardware.cherry_bad_out.set (true);
- robot->hardware.cherry_bad_in.set (false);
-#endif
-
+ robot->hardware.cherry_plate_clamp_close.set (true);
+ robot->hardware.cherry_plate_clamp_open.set (false);
}
FSM_STATES (PLATE_OFF,
diff --git a/digital/io-hub/src/apbirthday/robot.cc b/digital/io-hub/src/apbirthday/robot.cc
index bde89f6f..4b8a4c1f 100644
--- a/digital/io-hub/src/apbirthday/robot.cc
+++ b/digital/io-hub/src/apbirthday/robot.cc
@@ -90,10 +90,10 @@ Robot::Robot ()
ucoo::assert (i == lengthof (inputs_));
i = 0;
outputs_[i++] = &hardware.cherry_bad_out;
- outputs_[i++] = &hardware.cherry_bad_in;
outputs_[i++] = &hardware.cherry_plate_up;
outputs_[i++] = &hardware.cherry_plate_down;
- outputs_[i++] = &hardware.cherry_plate_clamp;
+ outputs_[i++] = &hardware.cherry_plate_clamp_close;
+ outputs_[i++] = &hardware.cherry_plate_clamp_open;
outputs_[i++] = &hardware.cake_arm_out;
outputs_[i++] = &hardware.cake_arm_in;
outputs_[i++] = &hardware.cake_push_far_out;