Skip to content

Commit

Permalink
V0.38
Browse files Browse the repository at this point in the history
adds new options in onscreen menu.
- Option to choose between 5 timeformats
- Option to choose between 9 dateformats
- Option to choose the start of the week (monday or sunday)
- Option to switch between °C and °F

https://blueforcer.github.io/awtrix-light/#/onscreen

closes #10
  • Loading branch information
Blueforcer committed Mar 24, 2023
1 parent 889484f commit 9a6fef0
Show file tree
Hide file tree
Showing 15 changed files with 255 additions and 337 deletions.
6 changes: 5 additions & 1 deletion docs/flasher.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@

[filename](/flasher/index.html ':include :type=iframe')
# Online flasher

is available in Google Chrome and Microsoft Edge browsers.

[filename](../flasher/index.html ':include :type=iframe')
Binary file modified docs/flasher/firmware/firmware.bin
Binary file not shown.
14 changes: 13 additions & 1 deletion docs/onscreen.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@ In this menu you can change the transisiton speed between apps.

#### T_SPEED
In this menu, you can adjust the duration for which an app is displayed before switching to the next one.


#### TIME
In this menu, you can change the time format. To change the format, use the left and right buttons to navigate through the available options. When you have found the format you want, press and hold the middle button for 2 seconds to save your setting. This will exit the menu and store your selected format.

#### DATE
In this menu, you can change the date format. To change the format, use the left and right buttons to navigate through the available options. When you have found the format you want, press and hold the middle button for 2 seconds to save your setting. This will exit the menu and store your selected format.

#### WEEKDAY
In this menu, you can change the start of your week. To change the start from Monday to Sunday, use the left and right buttons. Press and hold the middle button for 2 seconds to save your setting. This will exit the menu and store your selected start of the week.

#### TEMP
In this menu, you can change the temperature from °C to °F. Use the left and right buttons to change the system. Press and hold the middle button for 2 seconds to save your setting.

#### UPDATE
Here you can check and download a new firmware if available.
3 changes: 1 addition & 2 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ lib_deps =
evert-arias/EasyButton@^2.0.1
fastled/FastLED@^3.5.0
marcmerlin/FastLED NeoMatrix@^1.2
knolleary/PubSubClient@^2.8
https://github.com/schreibfaul1/ESP32-audioI2S
knolleary/PubSubClient@^2.8
222 changes: 0 additions & 222 deletions src/AudioManager.cpp

This file was deleted.

33 changes: 0 additions & 33 deletions src/AudioManager.h

This file was deleted.

26 changes: 22 additions & 4 deletions src/DisplayManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "PeripheryManager.h"
#include "MQTTManager.h"
#include "GifPlayer.h"
#include "AudioManager.h"
#include <Ticker.h>
#include "Functions.h"
#include "ServerManager.h"
Expand Down Expand Up @@ -155,11 +154,11 @@ void DisplayManager_::printText(int16_t x, int16_t y, const char *text, bool cen
}

upperText[length] = '\0'; // Null terminator
matrix.print(upperText);
matrix.print(utf8ascii(upperText));
}
else
{
matrix.print(text);
matrix.print(utf8ascii(text));
}
}

Expand Down Expand Up @@ -400,7 +399,6 @@ void DisplayManager_::show()
matrix.show();
}


void DisplayManager_::leftButton()
{
if (!MenuManager.inMenu)
Expand Down Expand Up @@ -536,4 +534,24 @@ void DisplayManager_::drawProgressBar(int cur, int total)
matrix.drawFastHLine(0, 7, MATRIX_WIDTH, matrix.Color(100, 100, 100));
matrix.drawFastHLine(0, 7, leds_for_progress / MATRIX_HEIGHT, matrix.Color(0, 255, 0));
matrix.show();
}

void DisplayManager_::drawMenuIndicator(int cur, int total)
{
int menuItemWidth = 2;
int totalWidth = total * menuItemWidth + (total - 2);
int leftMargin = (MATRIX_WIDTH - totalWidth) / 2;
int pixelSpacing = 1;
for (int i = 0; i < total; i++)
{
int x = leftMargin + i * (menuItemWidth + pixelSpacing);
if (i == cur)
{
matrix.drawLine(x, 7, x + menuItemWidth - 1, 7, matrix.Color(255, 0, 0));
}
else
{
matrix.drawLine(x, 7, x + menuItemWidth - 1, 7, matrix.Color(100, 100, 100));
}
}
}
1 change: 1 addition & 0 deletions src/DisplayManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class DisplayManager_
void drawGIF(uint16_t x, uint16_t y, fs::File gifFile);
void drawJPG(uint16_t x, uint16_t y, fs::File jpgFile);
void drawProgressBar(int cur, int total);
void drawMenuIndicator(int cur, int total);
};

extern DisplayManager_ &DisplayManager;
Expand Down
Loading

0 comments on commit 9a6fef0

Please sign in to comment.