satspares / DWIN_DGUS_HMI

Arduino Libabry for DWIN DGUS T5L HMI Displays
15 stars 3 forks source link

checkHex(byte currentNo error #2

Closed shura-2 closed 11 months ago

shura-2 commented 11 months ago

ошибка в функции

String DWIN::checkHex(byte currentNo){

if (currentNo < 10){
    return "0"+String(currentNo, HEX);   
}

return String(currentNo, HEX);

}

Вместо if (currentNo < 10){ должно быть if (currentNo < 16){

В противном случае

void onHMIEvent(String address, int lastByte, String message, String response)

response вместо 0А выдает А

satspares commented 11 months ago

Hello checkHex already has 0x10 in it which is 16 dec if (currentNo < 0x10) This is one of the problems I fixed from the dwin version. Are you using my version?

Looking back this was fixed by commit 5a924d8 on the 7th July. If you are using an old version you should upgrade.