interp: add new ini setting 'DISABLE_AUTO_G54_ON_PROGSTOP'#4093
interp: add new ini setting 'DISABLE_AUTO_G54_ON_PROGSTOP'#4093Sigma1912 wants to merge 1 commit into
Conversation
| int disable_auto_g54_on_progstop; | ||
|
|
There was a problem hiding this comment.
This is a boolean value in a C++ program. Why are you adding it as int and initialize it with 0 (zero) instead of false (in interp_setup.cc)? Wouldn't it be more appropriate to use bool?
There was a problem hiding this comment.
Indeed, changed.
(I was following the existing setting 'disable_g92_persistence')
| * `DISABLE_AUTO_G54_ON_PROGSTOP = 0` (Default: 0) + | ||
| When set, M2,M30 and M99 will no longer automatically reset the active WCS to 'G54'. |
There was a problem hiding this comment.
This is a boolean value. You should note that it is a boolean value here.
(also the other boolean values should be marked as such, but one things at a time)
Also, you should also add it to the list of boolean values to check in src/emc/ini/linuxcnc_check_ini.py in the list of the check_bools() function.
There was a problem hiding this comment.
-
Changed to '(bool, Default: 0)'. Happy to change that to another format if preferred.
-
Added to the list in check_bools()
|
Can I ask you add it in to pncconf? here: add: |
|
I tested main functionality of this PR in Gmoccapy. It works. |
5ca515e to
42c29ac
Compare
Adding this to the ini file will disable the automatic resetting of the current WCS to G54 on program stop (M2/M30/M99): [RS274NGC] DISABLE_AUTO_G54_ON_PROGSTOP = 1 Note: DISABLE_AUTO_G54_ON_PROGSTOP defaults to '0' so this modification of M2,M30 and M99 behavior is opt-in and default behavior is unchanged.
42c29ac to
93791ad
Compare
|
@zz912 |
As requested here:
https://forum.linuxcnc.org/38-general-linuxcnc-questions/58821-how-to-remove-automatic-g54-after-m2-m30#346816
Adds a new ini file setting to disable the automatic resetting of the current WCS to G54 on program stop (M2/M30/M99):
[RS274NGC]
DISABLE_AUTO_G54_ON_PROGSTOP = 1
Note:
DISABLE_AUTO_G54_ON_PROGSTOP defaults to '0' so this modification of M2,M30 and M99 behavior is opt-in and default behavior is unchanged.