kcjengr / qtpyvcp

QtPyVCP - Qt and Python based Virtual Control Panel framework for LinuxCNC.
https://www.qtpyvcp.com
Other
91 stars 51 forks source link

machine_actions.py estop #131

Open dpslwk opened 1 year ago

dpslwk commented 1 year ago

_estop_bindOk

https://github.com/kcjengr/qtpyvcp/blob/57f5c7931f9f9f711824d01d4b92998644677f68/src/qtpyvcp/actions/machine_actions.py#L78

I think the above should be

widget.setChecked(STAT.task_state == linuxcnc.STATE_ESTOP)
dpslwk commented 1 year ago

oh http://linuxcnc.org/docs/2.9/html/config/python-interface.html

estop
(returns integer) - Returns either STATE_ESTOP or not.

hmm maybe its is_active that should be changed,

// types for EMC_TASK state
enum EMC_TASK_STATE_ENUM {
    EMC_TASK_STATE_ESTOP = 1,
    EMC_TASK_STATE_ESTOP_RESET = 2,
    EMC_TASK_STATE_OFF = 3,
    EMC_TASK_STATE_ON = 4
};