-
Notifications
You must be signed in to change notification settings - Fork 2
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
Separate out EBB library from saxi frontend #112
Comments
Perhaps you already knew about https://github.com/lilkraftwerk/lineboi3000/blob/master/src/plotting/AxidrawAPI.js |
I am hoping first to great a generic encoder/decoder that is independent of transport (http or websocket or cli or anything) - something that makes an okay base for generating the correct EBB commands, then build a javascript api on top of that. Would love opinions on the style of the javascript api, looking at example usage https://github.com/jedahan/ebb.ts/blob/main/tests/test.ts Style APass an object with the function name, and argument names, as in the EBB official API reference stepperAndServoModeConfigure({
parameter: SC.PEN_LIFT_MECHANISM,
integer: PEN_LIFT_MECHANISM.RC_SERVO_OUT
}) Style BRename to simpler commands, that may cover multiple different EBB commands, and use positional parameters config(SC.PEN_LIFT_MECHANISM, PEN_LIFT_MECHANISM.RC_SERVO_OUT)) Style CInfer parameter usage based on enums - in this case, we don't need to set SC.PEN_LIFT_MECHANISM since PEN_LIFT_MECHANISM.RC_SERVER_OUT can only apply to the first. A bit more magic. config(PEN_LIFT_MECHANISM.RC_SERVO_OUT) |
See also https://github.com/techninja/cncserver
Sorry, I don't have expertise to design an API :S |
I'm thinking it might be easier to provide a separate typescript library for the EBB boards, and have saxi work with that.
I started exploring what that might look like here https://github.com/jedahan/ebb.ts/blob/main/test.ts
So far its a bit too verbose, but it provides auto-completion, and parameter safety.
The text was updated successfully, but these errors were encountered: