From 57f0ba7edc8f79aab1767001ddc3965a500f969c Mon Sep 17 00:00:00 2001 From: atc1441 Date: Wed, 13 Mar 2024 00:29:21 +0100 Subject: [PATCH] Added definition for Silabs BLE Display --- ESP32_AP-Flasher/data/tagtypes/BD.json | 65 ++++++++++++++++++++++++++ ESP32_AP-Flasher/src/ble_filter.cpp | 7 +++ oepl-definitions.h | 1 + 3 files changed, 73 insertions(+) create mode 100644 ESP32_AP-Flasher/data/tagtypes/BD.json diff --git a/ESP32_AP-Flasher/data/tagtypes/BD.json b/ESP32_AP-Flasher/data/tagtypes/BD.json new file mode 100644 index 00000000..be7eaf39 --- /dev/null +++ b/ESP32_AP-Flasher/data/tagtypes/BD.json @@ -0,0 +1,65 @@ +{ + "name": "BLE EPD BWR 2.9\" Silabs", + "width": 384, + "height": 168, + "rotatebuffer": 1, + "bpp": 2, + "colors": 3, + "colortable": { + "white": [255, 255, 255], + "black": [0, 0, 0], + "red": [255, 0, 0], + "gray": [150, 150, 150] + }, + "contentids": [ 22, 23, 1, 4, 5, 7, 8, 9, 10, 11, 17, 18, 19, 20], + "usetemplate": 1, + "template": { + "1": { + "weekday": [ 192, 0, "Signika-SB.ttf", 70 ], + "date": [ 192, 85, "Signika-SB.ttf", 60 ] + }, + "2": { + "fonts": [ "Signika-SB.ttf", 150, 150, 110, 80, 60, 50 ], + "xy": [ 192, 72 ] + }, + "16": { + "location": [ 5, 5, "fonts/bahnschrift30" ], + "title": [ 335, 11, "glasstown_nbp_tf" ], + "cols": [ 1, 157, 16, "glasstown_nbp_tf" ], + "bars": [ 5, 141, 14 ] + }, + "8": { + "location": [ 5, 12, "t0_14b_tf" ], + "column": [ 5, 76 ], + "day": [ 39, 23, "bahnschrift20.vlw", 48, 140 ], + "icon": [ 39, 65, 45 ], + "wind": [ 23, 26 ], + "line": [ 20, 168 ] + }, + "9": { + "title": [ 5, 4, "bahnschrift20.vlw", 25 ], + "items": 8, + "line": [ 4, 25, "REFSAN12.vlw" ], + "desc": [ 0, 5, "", 1 ] + }, + "10": { + "title": [ 192, 5, "fonts/bahnschrift20" ], + "pos": [ 192, 30 ] + }, + "11": { + "mode": 0, + "days": 1, + "title": [ 5, 2, "fonts/bahnschrift20" ], + "date": [ 378, 2 ], + "items": 10, + "red": [ 0, 21, 384, 16 ], + "line": [ 5, 23, 18, "calibrib16.vlw", 55 ] + }, + "27": { + "bars": [ 12, 360, 110, 20 ], + "time": [ "calibrib16.vlw" ], + "yaxis": [ "BellCent10.vlw", 1, 6 ], + "head": [ "calibrib30.vlw" ] + } + } +} diff --git a/ESP32_AP-Flasher/src/ble_filter.cpp b/ESP32_AP-Flasher/src/ble_filter.cpp index c5d32baf..61a5aa57 100644 --- a/ESP32_AP-Flasher/src/ble_filter.cpp +++ b/ESP32_AP-Flasher/src/ble_filter.cpp @@ -50,6 +50,9 @@ uint8_t gicToOEPLtype(uint8_t gicType) { case 0x6A: return GICI_BLE_EPD_BWR_74; break; + case 0xEB: + return GICI_BLE_EPD_BWR_29_SILABS; + break; default: return GICI_BLE_UNKNOWN; // Should never happen, return 1.54" break; @@ -189,6 +192,10 @@ uint32_t compress_image(uint8_t address[8], uint8_t* buffer, uint32_t max_len) { width_display = 384; height_display = 640; break; + case 7: + width_display = 168; + height_display = 384; + break; } switch ((giciType >> 1) & 3) // Extra color { diff --git a/oepl-definitions.h b/oepl-definitions.h index 60961f4b..ad6f030f 100755 --- a/oepl-definitions.h +++ b/oepl-definitions.h @@ -73,6 +73,7 @@ #define GICI_BLE_TFT_BWR_42 0xB7 #define GICI_BLE_EPD_BW_74 0xB8 #define GICI_BLE_EPD_BWR_74 0xB9 +#define GICI_BLE_EPD_BWR_29_SILABS 0xBD #define GICI_BLE_UNKNOWN 0xBF #define ATC_MI_THERMOMETER 0xBE