feature/event-customization-2024 #2
@@ -3,7 +3,7 @@ import os
|
||||
import badger_os
|
||||
from widgets import draw_window, pprint, ptitle, plength, button, draw_ui
|
||||
|
||||
IMAGE_WIDTH = 96
|
||||
IMAGE_WIDTH = 86
|
||||
IMAGE_HEIGHT = 96
|
||||
DELTA = 0
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Kirill Timofeev
|
||||
Engineering Team
|
||||
Census
|
||||
oneearedrabbit
|
||||
badge.bin
|
||||
Mariano Sciacco
|
||||
IoT & Cloud Engineer
|
||||
Vimar S.p.A.
|
||||
git.marianosciacco.it
|
||||
badge.bin
|
||||
BIN
src/images/loghetto.bin
Normal file
BIN
src/images/loghetto.bin
Normal file
Binary file not shown.
BIN
src/images/loghetto.png
Normal file
BIN
src/images/loghetto.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
@@ -4,4 +4,5 @@ Mariano Sciacco
|
||||
* Vimar S.p.A.
|
||||
* (AWS Summit 2024)
|
||||
|
||||
If You’re Scanning This, It’s Too Late!
|
||||
If You Are Scanning This,
|
||||
It Is Too Late!
|
||||
@@ -192,18 +192,23 @@ def draw_menu(display, selected):
|
||||
# logo
|
||||
display.pen(0)
|
||||
display.thickness(1)
|
||||
|
||||
x = 12
|
||||
y = 6
|
||||
display.line(x + 2, y, x + 8, y)
|
||||
display.line(x + 6, y + 1, x + 9, y + 1)
|
||||
display.line(x + 1, y + 2, x + 10, y + 2)
|
||||
display.line(x + 5, y + 3, x + 10, y + 3)
|
||||
display.line(x, y + 4, x + 10, y + 4)
|
||||
display.line(x + 5, y + 5, x + 10, y + 5)
|
||||
display.line(x + 1, y + 6, x + 10, y + 6)
|
||||
display.line(x + 6, y + 7, x + 9, y + 7)
|
||||
display.line(x + 2, y + 8, x + 8, y + 8)
|
||||
|
||||
loghetto = bytearray(int(16 * 18 / 8))
|
||||
open("images/{}".format("loghetto.bin"), "r").readinto(loghetto)
|
||||
display.image(loghetto, 16, 18, 10, 2)
|
||||
|
||||
# old logo
|
||||
# x = 12
|
||||
# y = 6
|
||||
# display.line(x + 2, y, x + 8, y)
|
||||
# display.line(x + 6, y + 1, x + 9, y + 1)
|
||||
# display.line(x + 1, y + 2, x + 10, y + 2)
|
||||
# display.line(x + 5, y + 3, x + 10, y + 3)
|
||||
# display.line(x, y + 4, x + 10, y + 4)
|
||||
# display.line(x + 5, y + 5, x + 10, y + 5)
|
||||
# display.line(x + 1, y + 6, x + 10, y + 6)
|
||||
# display.line(x + 6, y + 7, x + 9, y + 7)
|
||||
# display.line(x + 2, y + 8, x + 8, y + 8)
|
||||
|
||||
x = 40
|
||||
pprint(display, menu, x, 6, 0)
|
||||
@@ -226,10 +231,11 @@ def draw_border(display):
|
||||
display.line(1, 1, 1, 127)
|
||||
display.line(1, 127, 295, 127)
|
||||
display.line(295, 1, 295, 127)
|
||||
display.image(bytearray((0xff, 0xff, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0xc0)), 2, 2, 0, 0)
|
||||
|
||||
display.image(bytearray((0xff, 0xff, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0xc0)), 8, 8, 0, 0)
|
||||
display.image(bytearray((0xff, 0xff, 0x3f, 0x1f, 0x0f, 0x07, 0x03, 0x03)), 8, 8, 288, 0)
|
||||
display.image(bytearray((0x03, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0xff, 0xff)), 8, 8, 288, 120)
|
||||
display.image(bytearray((0xc0, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xff, 0xff)), 2, 2, 0, 120)
|
||||
display.image(bytearray((0xc0, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xff, 0xff)), 8, 8, 0, 120)
|
||||
|
||||
def map_value(input, in_min, in_max, out_min, out_max):
|
||||
return (((input - in_min) * (out_max - out_min)) / (in_max - in_min)) + out_min
|
||||
|
||||
Reference in New Issue
Block a user