summaryrefslogtreecommitdiff
path: root/host
diff options
context:
space:
mode:
authorNicolas Schodet2011-05-30 11:45:09 +0200
committerNicolas Schodet2011-05-30 11:45:09 +0200
commit5e4f6921f117d650025fee172af7bf4e68b69129 (patch)
tree06a9aa3e0ef5e4e12c157336364811a8f8eafc1b /host
parent0e1b966d3a66518bae9b44d888b3daea918f10f7 (diff)
digital/io-hub, host/simu: add Strat contact
Diffstat (limited to 'host')
-rw-r--r--host/simu/robots/robospierre/model/bag.py3
-rw-r--r--host/simu/robots/robospierre/view/bag.py2
2 files changed, 4 insertions, 1 deletions
diff --git a/host/simu/robots/robospierre/model/bag.py b/host/simu/robots/robospierre/model/bag.py
index 260960f8..b98dafd9 100644
--- a/host/simu/robots/robospierre/model/bag.py
+++ b/host/simu/robots/robospierre/model/bag.py
@@ -34,8 +34,9 @@ class Bag:
def __init__ (self, scheduler, table, link_bag):
self.color_switch = Switch (link_bag.io_hub.contact[0], invert = True)
self.jack = Switch (link_bag.io_hub.contact[1], invert = True)
+ self.strat_switch = Switch (link_bag.io_hub.contact[9], invert = True)
self.contact = [ Switch (contact)
- for contact in link_bag.io_hub.contact[2:] ]
+ for contact in link_bag.io_hub.contact[2:9] ]
self.position = Position (link_bag.asserv.position)
self.clamping_motor = MotorBasic (link_bag.io_hub.pwm[2], scheduler,
8 * pi, 0, pi)
diff --git a/host/simu/robots/robospierre/view/bag.py b/host/simu/robots/robospierre/view/bag.py
index 73aa9fe3..b718f6fe 100644
--- a/host/simu/robots/robospierre/view/bag.py
+++ b/host/simu/robots/robospierre/view/bag.py
@@ -35,6 +35,8 @@ class Bag:
self.jack = Switch (sensor_frame, model_bag.jack, 'Jack')
self.color_switch = Switch (sensor_frame, model_bag.color_switch,
'Color')
+ self.strat_switch = Switch (sensor_frame, model_bag.strat_switch,
+ 'Strat')
self.robot = Robot (table, model_bag.position, model_bag.clamp)
self.clamp = (
ClampTop (actuator_view.add_view (ClampTop.width,