Browse Source

Refactor: rename interrupt workpiece event

anfeny 1 month ago
parent
commit
c3b5a17f6f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      simulator/realtime_simulation.py

+ 2 - 2
simulator/realtime_simulation.py

@@ -149,8 +149,8 @@ class MQTTSimulationBridge:
         self.sim.realtime_interrupt(f"REALTIME_INTERRUPT {json_string}")
 
     def _inject_wp_in_sim(self, wp: Workpiece):
-        sys.modules["pypdevs.basesimulator"].wp = wp  # Sadly this is needed...
-        self.sim.realtime_interrupt("WP_INTERRUPT (wp)")  # This will call the WP_INTERRUPT function in the simulator
+        sys.modules["pypdevs.basesimulator"].interrupt_workpiece = wp  # Sadly this is needed...
+        self.sim.realtime_interrupt("WP_INTERRUPT (interrupt_workpiece)")  # This will call the WP_INTERRUPT function in the simulator
 
     def start_clients(self):
         self.sim_client.connect(CFG.MQTT_SIM.HOST, CFG.MQTT_SIM.PORT)