Closed KurtE closed 2 years ago
I did a simple conversion for example of RED and it converted to 0...
Example of issue Red is 0xF800 which you and with 0xF800 and >> 11 bits So this converts to 0x1F or 31, which you then try to map map(31, 0, 28, 0,7) which overflows...
I fixed this in my own fork/branch: https://github.com/KurtE/RA8875/tree/RA8875_t4_multi
In the header file I updated the conversion
uint8_t _color16To8bpp(uint16_t color) __attribute__((always_inline)) { return ((color & 0xe000) >> 8) | ((color & 0x700) >> 6) | ((color & 0x18) >> 3); // return (map((color & 0xF800) >> 11, 0,28, 0,7)<<5 | map((color & 0x07E0) >> 5, 0,56, 0,7)<<2 | map(color & 0x001F, 0,24, 0,3)); }
I did a simple conversion for example of RED and it converted to 0...
Example of issue Red is 0xF800 which you and with 0xF800 and >> 11 bits So this converts to 0x1F or 31, which you then try to map map(31, 0, 28, 0,7) which overflows...
I fixed this in my own fork/branch: https://github.com/KurtE/RA8875/tree/RA8875_t4_multi
In the header file I updated the conversion