Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
luc-github opened this issue Apr 19, 2022 · 2 comments
Closed

Comments

@luc-github
Copy link
Owner

luc-github commented Apr 19, 2022

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

@stale stale bot added the stale label Jun 12, 2022
Repository owner deleted a comment from stale bot Jun 12, 2022
@stale stale bot removed the stale label Jun 12, 2022
@stale stale bot added the stale label Aug 13, 2022
@luc-github luc-github added Planned and removed stale labels Aug 13, 2022
Repository owner deleted a comment from stale bot Aug 13, 2022
@luc-github
Copy link
Owner Author

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
Copy link
Owner Author

luc-github commented Oct 13, 2024

This feature is now available in grblHAL which is better approach IMHO
In ESP3D 3.0 the lua script interpreter support should cover the needs
In ESP3D-TFT the lua script interpreter is not yet implemented but will be so no need for the moment, unless I missed some user case

So close this topic as won't fix due to existing solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

1 participant