summaryrefslogtreecommitdiff
path: root/host/simu
diff options
context:
space:
mode:
authorNicolas Schodet2013-03-28 20:18:36 +0100
committerNicolas Schodet2013-03-28 23:32:49 +0100
commit09c941cd2d30d07ef2dfe779bff2c934ce7cd718 (patch)
treea551f3b2585e925d3303c9a9cd8a2ea17d5596f2 /host/simu
parent82b27a84cda3fea96efb4e9adbb17cc503ccbac9 (diff)
digital/io-hub/tools, host/simu/robots: move gpios definitions
Diffstat (limited to 'host/simu')
-rw-r--r--host/simu/robots/apbirthday/link/bag.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/host/simu/robots/apbirthday/link/bag.py b/host/simu/robots/apbirthday/link/bag.py
index f2401a21..49f6fe82 100644
--- a/host/simu/robots/apbirthday/link/bag.py
+++ b/host/simu/robots/apbirthday/link/bag.py
@@ -23,6 +23,7 @@
# }}}
"""APBirthday bag of links."""
import io_hub.mex
+import io_hub.apbirthday
import asserv.mex
from simu.link.mex_gpio import MexGpio
from simu.link.mex_adc_channel import MexAdcChannel
@@ -34,18 +35,7 @@ class Bag:
aux_nb = 0)
self.io_hub = io_hub.mex.Mex (node, '%s:io0' % instance, gpios = True,
adc_channels = True)
- gpios = ('raw_jack', 'ihm_color', 'ihm_strat', 'ihm_robot_nb',
- 'ihm_lol', 'ihm_emerg_stop', 'glass_contact',
- 'cherry_plate_left_contact', 'cherry_plate_right_contact',
- 'cherry_bad_out', 'cherry_bad_in', 'cherry_plate_up',
- 'cherry_plate_down', 'cherry_plate_clamp', 'cake_arm_out',
- 'cake_arm_in', 'cake_push_far_out', 'cake_push_far_in',
- 'cake_push_near_out', 'cake_push_near_in',
- 'glass_lower_clamp_close', 'glass_lower_clamp_open',
- 'glass_upper_clamp_close', 'glass_upper_clamp_open',
- 'glass_upper_clamp_up', 'glass_upper_clamp_down', 'gift_out',
- 'gift_in', 'ballon_funny_action', 'pneum_open')
- for gpio in gpios:
+ for gpio in io_hub.apbirthday.gpios:
setattr (self, gpio, MexGpio (self.io_hub.gpios, gpio))
self.adc_dist = [
MexAdcChannel (self.io_hub.adc_channels, 'dist0'),