From 2fcf71d8ce139aebc37f1320a9813c41f5cc5796 Mon Sep 17 00:00:00 2001 From: Commander1024 Date: Tue, 26 May 2026 17:36:58 +0200 Subject: [PATCH] Added Bluetooth and battery icons instead of text indicators --- esphome/owon_b35t.h | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/esphome/owon_b35t.h b/esphome/owon_b35t.h index 3b01072..9173dd2 100644 --- a/esphome/owon_b35t.h +++ b/esphome/owon_b35t.h @@ -23,6 +23,44 @@ using esphome::display::Display; static const char *const TAG = "owon_b35t"; +static const uint8_t ACCU_BMP[32] = { + 0b00000000, 0b00000000, + 0b00000000, 0b00000000, + 0b00000000, 0b00000000, + 0b11111111, 0b11111110, + 0b10000000, 0b00000010, + 0b10000000, 0b00000011, + 0b10000000, 0b00000011, + 0b10000000, 0b00000011, + 0b10000000, 0b00000011, + 0b10000000, 0b00000011, + 0b10000000, 0b00000011, + 0b10000000, 0b00000010, + 0b11111111, 0b11111110, + 0b00000000, 0b00000000, + 0b00000000, 0b00000000, + 0b00000000, 0b00000000, +}; + +static const uint8_t BLE_BMP[32] = { + 0b00000001, 0b10000000, + 0b00000001, 0b11000000, + 0b00010001, 0b01100000, + 0b00011001, 0b00110000, + 0b00001101, 0b00011000, + 0b00000111, 0b00110000, + 0b00000011, 0b01100000, + 0b00000001, 0b11000000, + 0b00000001, 0b11000000, + 0b00000011, 0b01100000, + 0b00000111, 0b00110000, + 0b00001101, 0b00011000, + 0b00011001, 0b00110000, + 0b00010001, 0b01100000, + 0b00000001, 0b11000000, + 0b00000001, 0b10000000, +}; + static const uint8_t DIODE_BMP[32] = { 0b00001000, 0b00011000, 0b00001100, 0b00011000, @@ -250,8 +288,8 @@ class Meter { const Color orange(255, 165, 0); it.fill(bg); - this->label_(it, font, 12, 8, "BAT", this->low_battery ? red : green); - this->label_(it, font, 46, 8, "BLE", this->connected ? blue : inactive); + this->draw_icon_(it, 12, 8, 16, 16, ACCU_BMP, this->low_battery ? red : green); + this->draw_icon_(it, 46, 8, 16, 16, BLE_BMP, this->connected ? blue : inactive); this->label_(it, font, 86, 8, "AUTO", this->auto_range() ? fg : inactive); this->label_(it, font, 138, 8, "MAX", this->max_mode() ? red : inactive); this->label_(it, font, 178, 8, "MIN", this->min_mode() ? green : inactive);