Skip to content

Commit 137e2f3

Browse files
committed
hal_glib -fix a sometimes error reading linuxcnc state
i don;t think this was a real error but this is better code anyways
1 parent 46e7d1b commit 137e2f3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/python/hal_glib.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,8 @@ def is_homing(self):
11291129
return False
11301130

11311131
def machine_is_on(self):
1132-
return self.old['state'] > linuxcnc.STATE_OFF
1132+
self.stat.poll()
1133+
return self.stat.task_state > linuxcnc.STATE_OFF
11331134

11341135
def estop_is_clear(self):
11351136
self.stat.poll()

0 commit comments

Comments
 (0)