ESP3D-WEBUI icon indicating copy to clipboard operation
ESP3D-WEBUI copied to clipboard

[FEATURE REQUEST]Add variable support and math calculation in scripting

Open luc-github opened this issue 3 years ago • 1 comments
trafficstars

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

luc-github avatar Apr 19 '22 00:04 luc-github

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

luc-github avatar Dec 11 '22 00:12 luc-github