Skip to content

Commit

Permalink
increased qr version
Browse files Browse the repository at this point in the history
  • Loading branch information
danielcharrua committed May 5, 2024
1 parent 870cce1 commit 839437f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .vscode/arduino.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"board": "esp32:esp32:lilygo_t_display_s3",
"port": "/dev/tty.usbmodem14101",
"port": "/dev/tty.usbmodem14201",
"programmer": "esptool",
"sketch": "satoffee/satoffee.ino",
"output": "build",
Expand Down
2 changes: 1 addition & 1 deletion installer/firmware/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Satoffee",
"version": "1.1.0",
"version": "1.1.1",
"new_install_prompt_erase": false,
"builds": [
{
Expand Down
Binary file modified installer/firmware/satoffee-firmware.bin
Binary file not shown.
15 changes: 8 additions & 7 deletions satoffee/Display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ void startupScreen()
tft.drawString("FF", x + 5, y + 15, GFXFF);
tft.drawString("EE", x + 5, y + 65, GFXFF);
tft.setTextSize(2);
tft.drawString("v1.1.0", x + 3, y + 115, GFXFF);
tft.drawString("v1.1.1", x + 3, y + 115, GFXFF);
tft.drawString("@danielpcostas", x + 1, y + 135, GFXFF);
} else {
tft.setTextSize(6);
tft.drawString("SATOFFEE", x + 5, y - 15, GFXFF);
tft.setTextSize(2);
tft.drawString("v1.1.0", x, y + 40, GFXFF);
tft.drawString("v1.1.1", x, y + 40, GFXFF);
tft.drawString("@danielpcostas", x, y + 60, GFXFF);
}
}
Expand Down Expand Up @@ -226,15 +226,15 @@ void showQRScreen()
tft.setTextColor(TFT_WHITE);

if (orientation == "v"){
tft.fillRect(15, 165, 140, 135, TFT_BLACK);
tft.fillRect(15, 168, 140, 132, TFT_BLACK);
tft.drawString("COFFEE", x - 55, y + 40, GFXFF);
tft.drawString("FOR", x - 55, y + 70, GFXFF);
tft.drawString("SATS", x - 55, y + 100, GFXFF);
tft.setTextSize(2);
tft.setTextColor(TFT_BLACK);
tft.drawString("HELP", x + 35, y + 150, GFXFF);
} else {
tft.fillRect(165, 15, 140, 135, TFT_BLACK);
tft.fillRect(168, 18, 140, 135, TFT_BLACK);
tft.drawString("COFFEE", x + 20, y - 30, GFXFF);
tft.drawString("FOR", x + 20, y, GFXFF);
tft.drawString("SATS", x + 20, y + 30, GFXFF);
Expand All @@ -245,19 +245,20 @@ void showQRScreen()

QRCode qrcoded;
uint8_t qrcodeData[qrcode_getBufferSize(20)];
qrcode_initText(&qrcoded, qrcodeData, 7, 0, lightning);
qrcode_initText(&qrcoded, qrcodeData, 8, 0, lightning);

for (uint8_t y = 0; y < qrcoded.size; y++)
{
// Each horizontal module
for (uint8_t x = 0; x < qrcoded.size; x++)
{
if (qrcode_getModule(&qrcoded, x, y))
{
tft.fillRect(17 + 3 * x, 15 + 3 * y, 3, 3, TFT_BLACK);
tft.fillRect(12 + 3 * x, 12 + 3 * y, 3, 3, TFT_BLACK);
}
else
{
tft.fillRect(17 + 3 * x, 15 + 3 * y, 3, 3, TFT_WHITE);
tft.fillRect(12 + 3 * x, 12 + 3 * y, 3, 3, TFT_WHITE);
}
}
}
Expand Down

0 comments on commit 839437f

Please sign in to comment.