From 4eb705e639457a07e6d5e9423ba81f8cede1b979 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Fri, 3 Jun 2011 04:37:35 +0200 Subject: digital/io-hub: handle element change to head --- host/simu/robots/robospierre/model/clamp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'host') diff --git a/host/simu/robots/robospierre/model/clamp.py b/host/simu/robots/robospierre/model/clamp.py index dbcab5f2..c199259e 100644 --- a/host/simu/robots/robospierre/model/clamp.py +++ b/host/simu/robots/robospierre/model/clamp.py @@ -203,8 +203,7 @@ class Clamp (Observable): slots[1].pawn is not None or (slots[0].pawn is not None and slots[0].pawn.kind == 'tower')) - # This one is really high. - slots[2].contact.state = not (slots[2].pawn is not None) + slots[2].contact.state = True if slots[0].pawn: slots[0].codebar.element_type = slots[0].pawn.kind else: @@ -213,7 +212,8 @@ class Clamp (Observable): slot_side = self.slots[self.SLOT_SIDE] slot_side.contact.state = slot_side.pawn is None clamp_slot = self.__get_clamp_slot () - if clamp_slot is not None: + if clamp_slot is not None and clamp_slot != self.SLOT_FRONT_TOP \ + and clamp_slot != self.SLOT_BACK_TOP: clamp_slot.contact.state = False for slot in self.slots: slot.contact.notify () -- cgit v1.2.3