Match color radio for the RGB565 hookup

Uses upper bits for the display of lower bits of RGB565, that are not 0 on physical radio. Matches better the color display of radio.
This commit is contained in:
Risto
2021-06-13 11:17:41 +02:00
committed by GitHub
parent e0c0cc1f95
commit 3d0fd18e52
+1 -1
View File
@@ -527,7 +527,7 @@ void OpenTxSim::refreshDisplay()
setPixel(x, y, FXRGB(255, 255, 255));
}
else {
FXColor color = FXRGB(255*((z&0xF800)>>11)/0x1f, 255*((z&0x07E0)>>5)/0x3F, 255*(z&0x001F)/0x01F);
FXColor color = FXRGB(((z & 0xF800) >> 8) + ((z & 0xE000) >> 13), ((z & 0x07E0) >> 3) + ((z & 0x0600) >> 9), (((z & 0x001F) << 3) & 0x00F8) + ((z & 0x001C) >> 2));
setPixel(x, y, color);
}
}