diff --git a/ESP32_AP-Flasher/data/tagtypes/2E.json b/ESP32_AP-Flasher/data/tagtypes/2E.json new file mode 100644 index 00000000..be66cd34 --- /dev/null +++ b/ESP32_AP-Flasher/data/tagtypes/2E.json @@ -0,0 +1,18 @@ +{ + "name": "EL097H2WRN 9.7\"", + "width": 960, + "height": 672, + "rotatebuffer": 0, + "bpp": 2, + "colors": 3, + "colortable": { + "white": [255, 255, 255], + "black": [0, 0, 0], + "red": [255, 0, 0], + "gray": [150, 150, 150] + }, + "shortlut": 0, + "options": ["button"], + "contentids": [ 0, 1, 2, 3, 4, 8, 16, 9, 7, 19, 10, 11, 21 ], + "usetemplate": 1 +} \ No newline at end of file diff --git a/ESP32_AP-Flasher/src/makeimage.cpp b/ESP32_AP-Flasher/src/makeimage.cpp index 0cf66844..dc2b5322 100644 --- a/ESP32_AP-Flasher/src/makeimage.cpp +++ b/ESP32_AP-Flasher/src/makeimage.cpp @@ -142,7 +142,7 @@ void spr2color(TFT_eSprite &spr, imgParam &imageParams, uint8_t *buffer, size_t } uint8_t bitIndex = 7 - (x % 8); - uint16_t byteIndex = (y * bufw + x) / 8; + uint32_t byteIndex = (y * bufw + x) / 8; // this looks a bit ugly, but it's performing better than shorter notations switch (best_color_index) {