sparkfun / SparkFun_SerLCD_Arduino_Library

A library to seamlessly control the SparkFun SerLCD over I2C, SPI, and Serial.
MIT License
23 stars 10 forks source link

Missing return value in SerLCD::write() #3

Closed gvansickle closed 4 years ago

gvansickle commented 4 years ago

Note the missing return on SerLCD::write(), which should return a size_t but returns nothing:

https://github.com/sparkfun/SparkFun_SerLCD_Arduino_Library/blob/34d4f1dbd32d8c42e6b85679d1ab3aaae0557272/src/SerLCD.cpp#L395

fourstix commented 4 years ago

Hi, Good catch. It's an error in the original code that Sparkfun harvested.
It should end with "return 1;" since one byte was written.

fourstix commented 4 years ago

I have submitted a pull request with a fix. Thanks for raising this issue. If you want the fixed code now, it's available in the fourstix/QwiicSerLCD repository code.

nseidle commented 4 years ago

Thanks all! Will be rolled into next release.