diff --git a/src/badge_app.py b/src/badge_app.py index 3c1d2ae..5328440 100644 --- a/src/badge_app.py +++ b/src/badge_app.py @@ -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 diff --git a/src/badges/badge.txt b/src/badges/badge.txt index 42d8f7e..554aade 100644 --- a/src/badges/badge.txt +++ b/src/badges/badge.txt @@ -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 \ No newline at end of file diff --git a/src/images/loghetto.bin b/src/images/loghetto.bin new file mode 100644 index 0000000..0d88303 Binary files /dev/null and b/src/images/loghetto.bin differ diff --git a/src/images/loghetto.png b/src/images/loghetto.png new file mode 100644 index 0000000..b97026f Binary files /dev/null and b/src/images/loghetto.png differ diff --git a/src/qrcodes/qrcode.txt b/src/qrcodes/qrcode.txt index d69e622..f2b00b6 100644 --- a/src/qrcodes/qrcode.txt +++ b/src/qrcodes/qrcode.txt @@ -4,4 +4,5 @@ Mariano Sciacco * Vimar S.p.A. * (AWS Summit 2024) -If You’re Scanning This, It’s Too Late! \ No newline at end of file +If You Are Scanning This, +It Is Too Late! \ No newline at end of file diff --git a/src/widgets.py b/src/widgets.py index e5b73c7..a249315 100644 --- a/src/widgets.py +++ b/src/widgets.py @@ -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