From ea6ebc995fa412ae3985c83f89365fb59b54728d Mon Sep 17 00:00:00 2001 From: Jerome Jutteau Date: Sat, 6 Apr 2013 15:22:41 +0200 Subject: digital/io-hub/src/apbirthday: add 2 GPIO for arm contact in / out --- digital/io-hub/src/apbirthday/hardware.hh | 3 ++- digital/io-hub/src/apbirthday/hardware.host.cc | 2 ++ digital/io-hub/src/apbirthday/hardware.stm32.cc | 1 + digital/io-hub/src/apbirthday/robot.cc | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) (limited to 'digital/io-hub') diff --git a/digital/io-hub/src/apbirthday/hardware.hh b/digital/io-hub/src/apbirthday/hardware.hh index 49ed9077..eeb00545 100644 --- a/digital/io-hub/src/apbirthday/hardware.hh +++ b/digital/io-hub/src/apbirthday/hardware.hh @@ -78,6 +78,7 @@ struct Hardware cherry_plate_up, cherry_plate_down, cherry_plate_clamp, cake_arm_out, cake_arm_in, + cake_arm_out_contact, cake_arm_in_contact, cake_push_far_out, cake_push_far_in, cake_push_near_out, cake_push_near_in, glass_lower_clamp_close, glass_lower_clamp_open, @@ -88,7 +89,7 @@ struct Hardware pneum_open; ucoo::Gpio dist0_sync, dist1_sync, dist2_sync, dist3_sync; - static const int inputs_nb = 9; + static const int inputs_nb = 11; static const int outputs_nb = 21; #ifdef TARGET_stm32 ucoo::AdcHard adc; diff --git a/digital/io-hub/src/apbirthday/hardware.host.cc b/digital/io-hub/src/apbirthday/hardware.host.cc index b9af78fe..35172d38 100644 --- a/digital/io-hub/src/apbirthday/hardware.host.cc +++ b/digital/io-hub/src/apbirthday/hardware.host.cc @@ -48,6 +48,8 @@ Hardware::Hardware () cherry_plate_clamp (host, "cherry_plate_clamp"), cake_arm_out (host, "cake_arm_out"), cake_arm_in (host, "cake_arm_in"), + cake_arm_out_contact (host, "cake_arm_out_contact"), + cake_arm_in_contact (host, "cake_arm_in_contact"), cake_push_far_out (host, "cake_push_far_out"), cake_push_far_in (host, "cake_push_far_in"), cake_push_near_out (host, "cake_push_near_out"), diff --git a/digital/io-hub/src/apbirthday/hardware.stm32.cc b/digital/io-hub/src/apbirthday/hardware.stm32.cc index 48b69c2b..9c70a1ad 100644 --- a/digital/io-hub/src/apbirthday/hardware.stm32.cc +++ b/digital/io-hub/src/apbirthday/hardware.stm32.cc @@ -47,6 +47,7 @@ Hardware::Hardware () cherry_plate_up (GPIOE, 2), cherry_plate_down (GPIOE, 3), cherry_plate_clamp (GPIOE, 4), cake_arm_out (GPIOB, 3), cake_arm_in (GPIOB, 4), + cake_arm_out_contact (GPIOB, 7), cake_arm_in_contact (GPIOB, 6), 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), diff --git a/digital/io-hub/src/apbirthday/robot.cc b/digital/io-hub/src/apbirthday/robot.cc index ca9d6a64..806d5aae 100644 --- a/digital/io-hub/src/apbirthday/robot.cc +++ b/digital/io-hub/src/apbirthday/robot.cc @@ -67,6 +67,8 @@ Robot::Robot () inputs_[i++] = &hardware.glass_contact; inputs_[i++] = &hardware.cherry_plate_left_contact; inputs_[i++] = &hardware.cherry_plate_right_contact; + inputs_[i++] = &hardware.cake_arm_out_contact; + inputs_[i++] = &hardware.cake_arm_in_contact; ucoo::assert (i == lengthof (inputs_)); i = 0; outputs_[i++] = &hardware.cherry_bad_out; -- cgit v1.2.3