hvxl / otgwmcu

Firmware for the NodeMCU of the Nodo Shop WiFi version of the OTGW.
MIT License
7 stars 2 forks source link

Adding typecasts, write(buf, len) and write(const char* buf) #1

Closed rvdbreemen closed 3 years ago

rvdbreemen commented 3 years ago

I needed some typecases, write(const char*) and write(buf, len) to make it work for me. Could not get my code compiled without this.

rvdbreemen commented 3 years ago

Bugfix: Removed the matchBanner from read(). As it passed a &ch to a matchBanner (const char *buf, int len). Also rewrote read and available in same style...

hvxl commented 3 years ago

The different versions of the write method should be added. Although many of them would only be needed in unrealistic scenarios. But they don't consume any space when not used, so it doesn't hurt.

The other proposed changes are unnecessary, or even incorrect. Removing the call to matchBanner breaks the firmware version detection. Without that, an upgrade will not transfer the EEPROM settings during an upgrade. The metchBanner method can be simplified, though.

hvxl commented 3 years ago

Cherry-picked the correct commits and merged them in commit 6d1ab21.