yozik04 / nextion

Nextion serial client
GNU Lesser General Public License v3.0
25 stars 10 forks source link

Fix ResponseType.PAGE has wrong offset for page id. #25

Closed DanCInOz closed 2 years ago

DanCInOz commented 2 years ago

Hiya,...

I noticed when trying to get the page ID, I was getting an array out of bounds exception after using the 'sendme' command. The response from nextion when you issue this command is:

0x66 0xff 0xff 0xff

After stripping the Response code (0x66) raw[] is left as simply the pageID. The _command function tries to access raw[1] which is not correct.

yozik04 commented 2 years ago

You are right. Thank you for the fix. I have confirmed it with a test as well.

yozik04 commented 2 years ago

Released in 1.8.1