@@ -56,6 +56,13 @@ def calculate_brightness(current_lsv):
56
56
return brightness_val
57
57
58
58
59
+ # draws percentage icon
60
+ def draw_percentage (x , y ):
61
+ graphics .rectangle (x + 1 , y + 1 , 2 , 2 )
62
+ graphics .line (x , y + 6 , x + 6 , y )
63
+ graphics .rectangle (x + 4 , y + 4 , 2 , 2 )
64
+
65
+
59
66
# sets up a handy function we can call to clear the screen
60
67
def clear ():
61
68
graphics .set_pen (BLACK )
@@ -105,7 +112,8 @@ def clear():
105
112
graphics .text ("BRT: " , 0 , 1 , scale = 1 )
106
113
# measure the rest of the text before drawing to right align it
107
114
text_width = graphics .measure_text (f"{ bp :.0f} /°" , scale = 1 )
108
- graphics .text (f"{ bp :.0f} %" , WIDTH - text_width , 1 , scale = 1 )
115
+ graphics .text (f"{ bp :.0f} " , WIDTH - text_width , 1 , scale = 1 )
116
+ draw_percentage ((WIDTH - text_width ) + 10 , 1 )
109
117
110
118
# draw a bar for the background
111
119
graphics .set_pen (GREY )
@@ -118,4 +126,3 @@ def clear():
118
126
119
127
# time to update the display
120
128
gu .update (graphics )
121
- # time.sleep(1)
0 commit comments