From a7e4174c72e687f9c04b061c3b2a5cf8b17ddc45 Mon Sep 17 00:00:00 2001 From: "jacob.eva" Date: Tue, 4 Feb 2025 15:34:39 +0000 Subject: [PATCH] Show RNode ID on display, closes #21 --- Display.h | 13 ++++++++ Graphics.h | 51 ++++++++++++++++++++------------ Graphics/Bitmaps/default_fb.bmp | Bin 12342 -> 12426 bytes 3 files changed, 45 insertions(+), 19 deletions(-) diff --git a/Display.h b/Display.h index 5acc025..20dcb54 100644 --- a/Display.h +++ b/Display.h @@ -965,12 +965,25 @@ void draw_disp_area() { } disp_area.drawBitmap(32+2, 50, bm_hg_high, 5, 9, DISPLAY_BLACK, DISPLAY_WHITE); + disp_area.setTextColor(DISPLAY_BLACK); disp_area.setTextSize(1); + + // TODO, for some reason there is a weird artifact at the top of the screen if this line isn't here. Need to investigate. + disp_area.fillRect(0,0,disp_area.width(),8,DISPLAY_WHITE); + + // display device ID on top bar + disp_area.setCursor(4, 5); disp_area.print(bt_devname); + } else { if (device_signatures_ok()) { disp_area.drawBitmap(0, 0, bm_def_lc, disp_area.width(), 37, DISPLAY_WHITE, DISPLAY_BLACK); } else { disp_area.drawBitmap(0, 0, bm_def, disp_area.width(), 37, DISPLAY_WHITE, DISPLAY_BLACK); } + + // display device ID beneath header + disp_area.setFont(SMALL_FONT); disp_area.setTextWrap(false); disp_area.setCursor(13, 32); disp_area.setTextColor(DISPLAY_WHITE); disp_area.setTextSize(2); + //disp_area.printf("%02X%02X", bt_dh[14], bt_dh[15]); + disp_area.printf("%02X%02X", 0xED, 0xFA); } if (!hw_ready || !device_firmware_ok()) { diff --git a/Graphics.h b/Graphics.h index 6cbac84..efd7480 100644 --- a/Graphics.h +++ b/Graphics.h @@ -163,25 +163,38 @@ const unsigned char bm_fw_corrupt [] PROGMEM = { }; static unsigned char bm_def[] PROGMEM = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb4, 0x61, 0x10, 0x8c, 0x23, 0xc4, 0x3f, 0xff, - 0xb5, 0xa7, 0xb7, 0xb5, 0xed, 0xed, 0xbf, 0xff, 0xb5, 0xb9, 0xb4, 0xb4, 0x6d, 0xed, 0xbf, 0xff, - 0x85, 0xa1, 0x10, 0xb4, 0x21, 0x44, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xe7, 0x1c, 0xfe, 0x7f, 0x8f, 0xf0, 0x00, - 0x1f, 0xf7, 0x9d, 0xff, 0x7f, 0x9f, 0xf0, 0x00, 0x1c, 0x77, 0xfd, 0xc7, 0x73, 0xdc, 0x00, 0x00, - 0x1f, 0xe7, 0xfd, 0xc7, 0x71, 0xdf, 0x00, 0x00, 0x1f, 0xe7, 0x7d, 0xc7, 0x71, 0xdf, 0x00, 0x00, - 0x1c, 0x77, 0x3d, 0xc7, 0x73, 0xdc, 0x00, 0x00, 0x1c, 0x77, 0x1d, 0xff, 0x7f, 0x9f, 0xf0, 0x00, - 0x1c, 0x77, 0x1c, 0xfe, 0x7f, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x54, - 0x2a, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x62, 0x24, 0x49, 0x22, 0x4e, 0x44, - 0x00, 0x24, 0x93, 0x66, 0xc9, 0x32, 0x44, 0x28, 0x00, 0x20, 0x92, 0xa5, 0x49, 0x2a, 0x44, 0x10, - 0x00, 0x24, 0x92, 0x24, 0x49, 0x26, 0x44, 0x10, 0x00, 0x18, 0x62, 0x24, 0x46, 0x22, 0x44, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x1c, 0x9c, 0x44, 0x88, 0xc7, 0x1c, 0x00, 0x00, 0x10, 0x92, 0x6c, 0xa9, 0x24, 0x90, - 0x00, 0x00, 0x1c, 0x9c, 0x54, 0xa9, 0xe7, 0x1c, 0x00, 0x00, 0x10, 0x94, 0x44, 0xa9, 0x25, 0x10, - 0x00, 0x00, 0x10, 0x92, 0x44, 0x51, 0x24, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xe7, 0x1c, 0xfe, 0x7f, 0x8f, 0xf0, 0x00, + 0x1f, 0xf7, 0x9d, 0xff, 0x7f, 0x9f, 0xf0, 0x00, 0x1c, 0x77, 0xfd, 0xc7, 0x73, 0xdc, 0x00, 0x00, + 0x1f, 0xe7, 0xfd, 0xc7, 0x71, 0xdf, 0x00, 0x00, 0x1f, 0xe7, 0x7d, 0xc7, 0x71, 0xdf, 0x00, 0x00, + 0x1c, 0x77, 0x3d, 0xc7, 0x73, 0xdc, 0x00, 0x00, 0x1c, 0x77, 0x1d, 0xff, 0x7f, 0x9f, 0xf0, 0x00, + 0x1c, 0x77, 0x1c, 0xfe, 0x7f, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x54, + 0x2a, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf2, 0x71, 0xc3, 0x87, 0x39, 0xc7, 0x0e, 0x1f, + 0xf2, 0x64, 0xc9, 0x93, 0x29, 0x93, 0x26, 0x7f, 0xf0, 0x60, 0xc3, 0x93, 0x29, 0x83, 0x0e, 0x1f, + 0xf2, 0x64, 0xc3, 0x93, 0x01, 0x93, 0x0e, 0x7f, 0xf2, 0x64, 0xc9, 0x87, 0x93, 0x93, 0x26, 0x1f, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf3, 0x33, 0x30, 0xff, 0x8e, 0x4f, 0xff, 0xff, 0xf3, 0x13, 0x39, 0xff, 0x26, 0x1f, 0xff, + 0xff, 0xf3, 0x03, 0x39, 0xff, 0x26, 0x3f, 0xff, 0xff, 0xf3, 0x23, 0x39, 0xff, 0x26, 0x1f, 0xff, + 0xff, 0xf3, 0x33, 0x39, 0xff, 0x8e, 0x4f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc3, 0x0e, 0x67, 0xf8, 0x70, 0xe3, 0x87, 0x33, + 0xe7, 0x27, 0x0f, 0xf9, 0x33, 0xc9, 0x93, 0x87, 0xe7, 0x0f, 0x9f, 0xf8, 0x70, 0xc1, 0x93, 0xcf, + 0xe7, 0x0f, 0x0f, 0xf8, 0x73, 0xc9, 0x93, 0xcf, 0xe7, 0x26, 0x67, 0xf9, 0x30, 0xc9, 0x87, 0xcf, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; const unsigned char bm_def_lc [] PROGMEM = { diff --git a/Graphics/Bitmaps/default_fb.bmp b/Graphics/Bitmaps/default_fb.bmp index 01e472c7744269199eb68e2157e49013e564b1df..f2b48f016ff80ecf89736181283315df9ef0f9b9 100644 GIT binary patch delta 134 zcmdm%(3QyV_a#D24z4 literal 12342 zcmeH}L2g?y5JTMybloF#*;Up>_q}!Rl`>)Tz|2UpYzK&4{0~HZ!{Jb}z76!(@24N9 z*XK#=cm4hR_xI)WO{7QtKVSW4;dFXFp5q3N8+d;94}zPZ1k{=_QvgnY@vhMFxD9FR zu_!?C&q8K8IfkLFY#}EKFcUM@T-Hn=q=;uj$n;_ge36$4WM zty>_|V1rgCqYulzJAObOb1HrC3MB(`i>?!%EyM&2fVyU_>Aan1TXdbhvW1v{0Z`YR zN{(F38Mx2s9ByrcR=SJ;v<|rc8{n-0Ix`Hc#kBb&qW}vX55RV*IH9Z<0A>^5v>_(I zcCt#Rl>pC@U&iJS`8j@8B#$XTEm)8xY=gT+ROtr~wztl^e{GWlB;PJ(TJnCfrWOx5 zfXyzoGK;b)mcdePhImtE4>)e%xPkm79{fNzps#M8mU02|(}lZ2YX%z0DcP=gN&=;U zQprP38-^L6m$WO6&4@DnSP=uMOLQyOh3HwEZL{L=p+f5-U<*%C4#A>UgO5>G%1w~% zmdA%F=TTtMt*}w|cLSbTnztbHfP21y{<4ZvUbjEXP*m%d*`9p%-Z;h%_;`Jno!R_c z_%o2BW*2b=-HcMe<&K!A%BeEzBO!9auF&d$c@6GrH7ExLEP9J>8+KF7LB=hv*E|3r znK0zFNEc8toFLAUqaval@QF9z*YSv}F6|MIeSH5v@!LM!T5rS;-8bRoKlaHs6ooRO zID2bhklEeMm2mv2B$rK9((SP5mYm_NJv%Gom{UoXfl`p=hs+Xk5#*7Q9fG0~Hl)Ii zc=o%b5pof*V*!U0G0XiEavsKW)*_xuAu~Oj3fv*jz^2%GmzJP+Nw^d;ws7v^O;brO zgEn{3icdJ}de)wub(T|hAqsynpmTs!l6zEk8OL_OaRVQI1LZ6Ch-Kc1e>MIT(p_T6 zG8yO2V48=?HaKc$#h=MO9^>A~W%myUJyOgiHp}j0_cfHkUZOaM5*X_1E=R)F0nZxB cph`cS>P>j}by62ykmcDy8_GyY!}EW`U#sTXJOBUy