Closed fourstix closed 3 years ago
Duplicated the error by compiling original code for Sparkfun Thing ESP8266 board. Here is error message:
SerLCD.cpp:349:30: note: deduced conflicting types for parameter 'const _Tp' ('unsigned char' and 'int') row = min(row, MAX_ROWS - 1); //row cannot be greater than max rows ^ Type byte is unsigned char and MAX_ROWS-1 is a numeric literal with implied type int. I will replace the code with: row = min(row, (byte) (MAX_ROWS - 1)); //row cannot be greater than max rows
Fix has been tested locally. Promoting fix to library.
Closing fixed issue.
This issue was opened in Sparkfun's code. Sparkfun issue #6
ESP32/ ESP8266 code won't compile with this library because the min/max functions are described in templates that require explicit type matching.
The fix is to case any numerals in the min/max function calls to byte to match the passed in parameter.