From 5e4f6921f117d650025fee172af7bf4e68b69129 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Mon, 30 May 2011 11:45:09 +0200 Subject: digital/io-hub, host/simu: add Strat contact --- host/simu/robots/robospierre/model/bag.py | 3 ++- host/simu/robots/robospierre/view/bag.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'host') 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, -- cgit v1.2.3