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

Make it possible to register additional cli commands #42

Closed houz closed 9 months ago

houz commented 9 months ago

I need to add additional commands to the serial interface for some custom functions.

It would be great if you could expose ESPStepperMotorServer_CLI::registerNewCommand and make it possible to access ESPStepperMotorServer::cliHandler. Alternatively you could add a wrapper if you prefer to not expose the class directly.

That way I could avoid forking the code base just for my own project and never getting around to merging in your updates.

I suppose something similar fore REST and web server would be handy, but I didn't look into that part of the code yet and won't need it for the time being.

pkerspe commented 9 months ago

Hi @houz, of course we can make functions public, would you be able to prepare a Pull Request with the suggested changes? I will review and merge