pkerspe / ESP-StepperMotor-Server

Turn your ESP32 into a complete stepper motor control server with web UI, REST API and serial control interface
MIT License
225 stars 39 forks source link

Enhancements to CLI interface #43

Closed houz closed 9 months ago

houz commented 9 months ago

In this PR I added the ability to register user defined functions in the CLI API. Unfortunately I had to introduce a second list of commands in the ESPStepperMotorServer_CLI class, because the internal callbacks are member functions of the class, while external callbacks need to be free functions.

While at it, I also ported the ability to set speed, acceleration and deceleration from the REST API to CLI.

Closes #42.

pkerspe commented 9 months ago

Hi @houz looks fine to me code-wise, could you please also update the readme in the section "Library API documentation" for the new exposed API functions to register user commands? And also the new supported parameters in the CLI "Serial command line interface"?

And optional, but nice to have: provide a example ino file in examples folder that shows usage of user provided CLI function

other than that, thanks a lot for you contribution

houz commented 9 months ago

Done, I pushed the changes to my fork.

houz commented 9 months ago

Thank you very much for the quick and pleasant experience. :-)

pkerspe commented 9 months ago

@houz thanks for contributing.