@hlwerschner said in Using macro calls in config.g:
So my question: Is there some limitation in rel 3.50 to disallow macro calls in early execution of config.g ? Please note, that I use several macro calls later (around lines 100ff including a large comment-lines block) and these have been OK and are OK in 3.50 also.
Its a bit weird but I am worried about macro aborting (!?) without any messages on the console. Just end-of-execution and no messages on the console. Such runs were reproducible!
Calling macros I don't know, but I found an odd behavior with local variables in config.g in 3.4.6 (as I described here: https://forum.duet3d.com/topic/34505/possible-bug-with-local-variables-use-in-config-g ), so maybe it's a similar situation and at this point I'd say: initialize variables only at the end of config.g...
EDIT: no, that was due to an error by me: I forgot to use var.var_name
So at this point I'd say: no problem as long as they are declared correctly. π
BTW: I'm with you with the uglyness but safe(tiness) of if !exists and I'm a bit more extreme
var val = <var value>
; val
if !exists(global.value)
global value = {var.val}
else
set global.value = {var.val}
First I have the values declaration block in local variables only, then the global creation/changing for global values, so that I don't have to put the same value twice for every global variable (and scroll to find it when I want to modify it, and remember to modify it twice and not making typos...); the if !exists block is just crtl+c - ctrl+v and, once made (and made sure it's correct), it doesn't have to be touched ever again.
@hlwerschner said in Using macro calls in config.g:
switched later to the MB6HC which is great and promises to allow 3-Z-axes expansion more easibly and now I sit on that board and wait for some features that I would like to use π
Thatis relatively easy: there are macros here on this forum for 3-Z autolevel. π