Kaynağa Gözat

Refactor: rename interrupt workpiece event

anfeny 1 ay önce
ebeveyn
işleme
c3b5a17f6f
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  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)