From 032cdc6525dad927c2f19d4b027588afe1bc0e27 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Wed, 16 May 2012 22:26:06 +0200 Subject: digital/io-hub/src/guybrush: add nb robots switch --- host/simu/robots/guybrush/link/bag.py | 2 +- host/simu/robots/guybrush/model/bag.py | 3 ++- host/simu/robots/guybrush/view/bag.py | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'host') diff --git a/host/simu/robots/guybrush/link/bag.py b/host/simu/robots/guybrush/link/bag.py index f47317bd..0603e2d9 100644 --- a/host/simu/robots/guybrush/link/bag.py +++ b/host/simu/robots/guybrush/link/bag.py @@ -33,7 +33,7 @@ class Bag: self.asserv = asserv.mex.Mex (node, '%s:asserv0' % instance, aux_nb = 0) self.io_hub = io_hub.mex.Mex (node, '%s:io0' % instance, - contact_nb = 12, output_nb = 10) + contact_nb = 13, output_nb = 10) self.mimot = mimot.mex.Mex (node, '%s:mimot0' % instance) self.beacon = beacon.mex.Mex (node, '%s:beacon0' % instance) diff --git a/host/simu/robots/guybrush/model/bag.py b/host/simu/robots/guybrush/model/bag.py index c1e66290..91bfedfa 100644 --- a/host/simu/robots/guybrush/model/bag.py +++ b/host/simu/robots/guybrush/model/bag.py @@ -49,11 +49,12 @@ class Bag: self.color_switch.notify () self.jack = Switch (link_bag.io_hub.contact[1], invert = True) self.strat_switch = Switch (link_bag.io_hub.contact[2], invert = True) + self.nb_robots_switch = Switch (link_bag.io_hub.contact[12], invert = True) self.beacon = RoundObstacle (40, 5) table.obstacles.append (self.beacon) self.position = Position (link_bag.asserv.position, [ self.beacon ]) output = link_bag.io_hub.output - contact = [ Switch (c) for c in link_bag.io_hub.contact[3:] ] + contact = [ Switch (c) for c in link_bag.io_hub.contact[3:12] ] self.clamps = Clamps (table, self.position, link_bag.mimot.aux[0], (PneumaticCylinder (output[self.OUTPUT_LOWER_CLAMP_1_CLOSE], None, scheduler, 0., 30., 150., 75., 30.), diff --git a/host/simu/robots/guybrush/view/bag.py b/host/simu/robots/guybrush/view/bag.py index a2eadf7f..8b89272b 100644 --- a/host/simu/robots/guybrush/view/bag.py +++ b/host/simu/robots/guybrush/view/bag.py @@ -38,6 +38,8 @@ class Bag: 'Color') self.strat_switch = Switch (sensor_frame, model_bag.strat_switch, 'Strat') + self.nb_robots_switch = Switch (sensor_frame, + model_bag.nb_robots_switch, 'Nb robots') self.robot = Robot (table, model_bag.position, model_bag.clamps) self.clamps = ClampsSide (actuator_view.add_view (ClampsSide.width, ClampsSide.height), model_bag.clamps) -- cgit v1.2.3