Closed pbeyl closed 8 years ago
Good catch.
Could you give the proposed change a test as I haven't got any hardware to test with to hand right now.
Thanks Dan
Took me a little while to track this issue down... Works perfectly, I downloaded the updated file and tested on my current project using Arduino Uno + Nextion 2.8.
Serial monitor confirms it's working as expected.
d5.bco=1024���ref d5���d6.bco=1024���ref d6���d7.bco=1024���ref d7���
/P
Cool. thanks for reporting this!
Hi Dan
Thanks for the awesome library! Picked up a small issue with the bool Nextion::refresh(const char *objectName) function in Nextion.cpp
size_t commandLen = 4 + strlen(objectName);
Should be changed to
size_t commandLen = 5 + strlen(objectName);
4 does not leave enough room in the buffer for ("ref ") plus NULL character in array and so the command is truncated. Call this function after changing the background colour of a text object to ensure the colour change is displayed.
P