|
|
@@ -251,8 +251,9 @@ class VacuumGripper(AtomicDEVS):
|
|
|
|
|
|
# Queue some messages for later processing, if we are not IDLE
|
|
|
elif not self.is_idle() and msg.topic in ["f/i/state/dsi", "f/o/order", "fl/sld/ack"]:
|
|
|
- # don't queue if we're waiting on it
|
|
|
- if not self.state.phase == InputRoutine.MOVE_TO_DSI and msg.topic == "f/i/state/dsi":
|
|
|
+ if msg.topic == "f/i/state/dsi" and (self.state.phase == InputRoutine.MOVE_TO_DSI or msg.payload['active'] == 0):
|
|
|
+ pass # we are already moving to DSI, or the DSI is not active, so ignore this message
|
|
|
+ else:
|
|
|
self.state.mqtt_msg_queue.append(msg)
|
|
|
|
|
|
elif msg.topic == "f/i/state/dsi":
|
|
|
@@ -379,7 +380,9 @@ class VacuumGripper(AtomicDEVS):
|
|
|
|
|
|
elif self.state.phase == OutputRoutine.DROP_WP_DSO:
|
|
|
return {self.dso_out: [self.state.workpiece], self.mqtt_out: [self.get_status_message()]}
|
|
|
-
|
|
|
+
|
|
|
+ logger.trace(f"peepo {self.state.phase.value}")
|
|
|
+ logger.trace(f"{self.state.mqtt_msg_queue}")
|
|
|
return {self.mqtt_out: [self.get_status_message()]} # return status
|
|
|
|
|
|
def intTransition(self):
|