summaryrefslogtreecommitdiff
path: root/host/simu/robots/robospierre/model
diff options
context:
space:
mode:
authorNicolas Schodet2011-06-03 04:37:35 +0200
committerNicolas Schodet2011-06-03 06:03:49 +0200
commit4eb705e639457a07e6d5e9423ba81f8cede1b979 (patch)
tree62a0af85401c4751b7b5b091d080d6d19f0f027a /host/simu/robots/robospierre/model
parent6ef0e7de88e2c4896ebdbd2ed1617ded5c89c31c (diff)
digital/io-hub: handle element change to head
Diffstat (limited to 'host/simu/robots/robospierre/model')
-rw-r--r--host/simu/robots/robospierre/model/clamp.py6
1 files changed, 3 insertions, 3 deletions
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 ()