You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suppose that a given type of 2-axis XY machine normally has one or both of its axes oriented in the opposite direction than "conventional". It would be nice if the machine definition could encapsulate this.
A straightforward approach might be to specify the command in the machine definition (.ini) file as: movexy = "SM,%d,-%x,-%y".
However, this will not actually work because this block is interpreted by cmdstr as serialCommand(cmdstr('movexy', change));where that function is defined as
This function works well for many types of possible tweaks to the command strings. For example, it allows the X and Y coordinates to be swapped easily. However, this particular tweaked command string won't work with it: When the change values are negative, it would be interpreted somewhat like "SM,<duration>,--<abs(x change)>,--<abs(y change)>".
One approach would be to detect the "double negative" there and remove it. Another would be to forbid this "-%s" syntax, and add a separate option in the settings for default orientation.
The text was updated successfully, but these errors were encountered:
Suppose that a given type of 2-axis XY machine normally has one or both of its axes oriented in the opposite direction than "conventional". It would be nice if the machine definition could encapsulate this.
A straightforward approach might be to specify the command in the machine definition (.ini) file as:
movexy = "SM,%d,-%x,-%y"
.However, this will not actually work because this block is interpreted by cmdstr as
serialCommand(cmdstr('movexy', change));
where that function is defined asThis function works well for many types of possible tweaks to the command strings. For example, it allows the X and Y coordinates to be swapped easily. However, this particular tweaked command string won't work with it: When the change values are negative, it would be interpreted somewhat like
"SM,<duration>,--<abs(x change)>,--<abs(y change)>"
.One approach would be to detect the "double negative" there and remove it. Another would be to forbid this "-%s" syntax, and add a separate option in the settings for default orientation.
The text was updated successfully, but these errors were encountered: