ESP3D-WEBUI
ESP3D-WEBUI copied to clipboard
[FEATURE REQUEST]Add variable support and math calculation in scripting
Got several request for variable support but cannot find the issue - so recreate it got a clear user case for cnc purpose which expose the needs and some way to use it macro_-_home_XY_to_center_of_hole.gcode.txt
It will be streamed from WebUI and it is WebUI which is charge to collect the variable on time , do the calculation and send the command on time, it cannot be a Macro as defined as today which is actually managed by ESP3D Fw or 3DPrinter Fw or GRBL/grblHALFw it should be considered more as an automation script than a GCODE file
Thanks to @tgm02281961 for bringing back the sample of usage so clear
the variable API is implemented : https://github.com/luc-github/ESP3D-WEBUI/blob/3.0/Memo/variablesList.md the command/API to assign value to new variable is not yet implemented - I did not thinked yet how to do that the scripting part then will need a script processor that also need to be implemented :
- load file
- process line by line
- process line to change variable if any
- stream line and wait for ack to stream next
add method in macro UI to use this new scripting method
Optional: Add a recovery mode in case the webui is closed by mistake when processing script to continue it when reopen it =>TBD