atc1441 / ZBS_Flasher

Arduino C++ Library and interface to flash the ZBS243 / SEM9110 8051 Microcontroller
137 stars 24 forks source link

CLI rework #24

Closed hibatos closed 1 year ago

hibatos commented 1 year ago

Hi, at first, great project, love it.

I found the help page to be missing a bit of key info, so I rewrote the help page in the Linux cd command help page style.

I tried to make the (error) messages look more alike and refactor the corresponding code mainly by using format strings in place of concatenations.

Along the way I noticed that the program always exits with code 0, despite running into an error. This lead to problems in integrating this into bash scripts and may lead to confusion down the line, so i added a condition for this in the script init.

Also I added a check for wether argument 2 (COM port) was provided and if not, will print the help page and exit gracefully, because it will currently just crash

Best Regards from Germany

atc1441 commented 1 year ago

Thank you very much for this