Qtlathe
02 Jul 2020 10:56 - 02 Jul 2020 18:58 #173396
by hottabich
Last edit: 02 Jul 2020 18:58 by hottabich.
Please Log in or Create an account to join the conversation.
03 Jul 2020 09:53 - 03 Jul 2020 10:16 #173502
by hottabich
Last edit: 03 Jul 2020 10:16 by hottabich.
Please Log in or Create an account to join the conversation.
05 Jul 2020 17:19 #173679
by cmorley
yes.
add a hal push button, set checked_state_text option true and set text for true and false state.
call it 'pushbutton_metric'
in the handler under _init_
under initialized__(self):
then add:
add a hal push button, set checked_state_text option true and set text for true and false state.
call it 'pushbutton_metric'
in the handler under _init_
STATUS.connect("metric-mode-changed", lambda w, d: self.mode_changed(d))
STATUS.connect('state-off', lambda w: self.w.pushbutton_metric.setEnabled(False))
STATUS.connect('state-estop', lambda w: self.w.pushbutton_metric.setEnabled(False))
STATUS.connect('interp-idle', lambda w: self.w.pushbutton_metric.setEnabled(self.homed_on_test()))
STATUS.connect('interp-run', lambda w: self.w.pushbutton_metric.setEnabled(False))
STATUS.connect('all-homed', lambda w: self.w.pushbutton_metric.setEnabled(True))
STATUS.connect('not-all-homed', lambda w, data: self.w.pushbutton_metric.setEnabled(False))
self._block_signal = False
under initialized__(self):
self.w.pushbutton_metric.clicked[bool].connect(self.change_mode)
then add:
#####################
# general functions #
#####################
def mode_changed(self,data):
self._block_signal = True
self.w.pushbutton_metric.setChecked(data)
# if using state labels option update the labels
if self.w.pushbutton_metric._state_text:
self.w.pushbutton_metric.setText(None)
self._block_signal = False
def change_mode(self, data):
if self._block_signal: return
if data:
ACTION.CALL_MDI('G21')
else:
ACTION.CALL_MDI('G20')
def homed_on_test(self):
return (STATUS.machine_is_on()
and (STATUS.is_all_homed() or INFO.NO_HOME_REQUIRED))
Please Log in or Create an account to join the conversation.
05 Jul 2020 19:52 - 06 Jul 2020 19:51 #173686
by hottabich
Last edit: 06 Jul 2020 19:51 by hottabich.
Please Log in or Create an account to join the conversation.
08 Jul 2020 04:30 #173953
by cmorley
The following user(s) said Thank You: tommylight, hottabich
Please Log in or Create an account to join the conversation.
09 Jul 2020 13:53 - 09 Jul 2020 14:14 #174092
by hottabich
Thank. I wanted to bi comments and suggestions turners. Did you use the latest edition? I edited several times. Wee removed Active Feed and Mdi Touchy seems so prettier to me. But your right as you wish.How to fix
when switching G21-Coolant on, G20-Coolant off so that it does not change?
when switching G21-Coolant on, G20-Coolant off so that it does not change?
Last edit: 09 Jul 2020 14:14 by hottabich.
Please Log in or Create an account to join the conversation.
10 Jul 2020 05:10 #174187
by hottabich
Thanks and so good. With the pictures it seems to be enough, but with the macros some questions. By default, none work. But I have to learn this. It will take a lot of time. I think the macro should work both in the metric system and in the imperial system. Also be able to edit gcod in the gcode editor or write manually.
Please Log in or Create an account to join the conversation.
Moderators: cmorley
Time to create page: 0.121 seconds