diff --git a/docs/apps.md b/docs/apps.md
index 1d3317e1..f9c146e6 100644
--- a/docs/apps.md
+++ b/docs/apps.md
@@ -30,7 +30,7 @@ Here is a demo, please press the triangle to unfold.
Example for adding a Youtube App as NodeRED flow
-```json
+```json
[
{
"id": "2a59d30d07abe14f",
@@ -200,8 +200,8 @@ Here is a demo, please press the triangle to unfold.
"userProps": "",
"sessionExpiry": ""
}
-]
-```
+]
+```
This Node-RED flow retrieves and displays the subscriber count of a specified YouTube channel on an AWTRIX light device. The flow consists of the following nodes:
diff --git a/src/Apps.cpp b/src/Apps.cpp
index b5d2dc03..1ec92c96 100644
--- a/src/Apps.cpp
+++ b/src/Apps.cpp
@@ -608,7 +608,7 @@ void ShowCustomApp(String name, FastLED_NeoMatrix *matrix, MatrixDisplayUiState
DisplayManager.getInstance().resetTextColor();
}
-// Unattractive to have a function for every customapp which does the same, but currently still no other option found TODO
+// Unattractive to have a function for every customapp wich does the same, but currently still no other option found TODO
void CApp1(FastLED_NeoMatrix *matrix, MatrixDisplayUiState *state, int16_t x, int16_t y, GifPlayer *gifPlayer)
{
diff --git a/src/ArtnetWifi.h b/src/ArtnetWifi.h
index 9b39aa63..384ecf37 100644
--- a/src/ArtnetWifi.h
+++ b/src/ArtnetWifi.h
@@ -105,12 +105,6 @@ class ArtnetWifi
physical = port;
}
- [[deprecated]]
- inline void setPhysical(uint8_t port)
- {
- setPhysical(port);
- }
-
inline uint16_t getLength(void)
{
return dmxDataLength;
diff --git a/src/DisplayManager.cpp b/src/DisplayManager.cpp
index 1e893cf0..4d9cd4b4 100644
--- a/src/DisplayManager.cpp
+++ b/src/DisplayManager.cpp
@@ -126,6 +126,11 @@ void DisplayManager_::applyAllSettings()
setAutoTransition(AUTO_TRANSITION);
}
+void DisplayManager_::setAppTime(long duration)
+{
+ ui->setTimePerApp(duration);
+}
+
void DisplayManager_::resetTextColor()
{
setTextColor(TEXTCOLOR_888);
@@ -385,6 +390,7 @@ void removeCustomAppFromApps(const String &name, bool setApps)
ui->setApps(Apps);
DisplayManager.getInstance().setAutoTransition(true);
deleteCustomAppFile(name);
+ DisplayManager.setAppTime(TIME_PER_APP);
}
bool parseFragmentsText(const JsonArray &fragmentArray, std::vector &colors, std::vector &fragments, uint32_t standardColor)
@@ -613,35 +619,24 @@ bool DisplayManager_::generateCustomPage(const String &name, JsonObject doc, boo
if (doc.containsKey("icon"))
{
- String iconValue = doc["icon"].as();
+ String newIconName = doc["icon"].as();
- if (iconValue.endsWith("="))
+ if (newIconName.endsWith("="))
{
- customApp.jpegDataSize = decode_base64((const unsigned char *)iconValue.c_str(), customApp.jpegDataBuffer);
+ customApp.jpegDataSize = decode_base64((const unsigned char *)newIconName.c_str(), customApp.jpegDataBuffer);
customApp.isGif = false;
customApp.icon.close();
customApp.iconName = "";
customApp.iconPosition = 0;
customApp.currentFrame = 0;
}
- else
+ else if (customApp.iconName != newIconName)
{
customApp.jpegDataSize = 0;
- if (customApp.iconName != iconValue)
- {
- customApp.iconName = iconValue;
- customApp.icon.close();
- customApp.iconPosition = 0;
- customApp.currentFrame = 0;
- }
-
- else
- {
- customApp.icon.close();
- customApp.iconName = "";
- customApp.iconPosition = 0;
- customApp.currentFrame = 0;
- }
+ customApp.iconName = newIconName;
+ customApp.icon.close();
+ customApp.iconPosition = 0;
+ customApp.currentFrame = 0;
}
}
else
@@ -906,7 +901,6 @@ bool DisplayManager_::generateNotification(uint8_t source, const char *json)
{
String iconValue = doc["icon"].as();
-
if (iconValue.endsWith("="))
{
newNotification.jpegDataSize = decode_base64((const unsigned char *)iconValue.c_str(), newNotification.jpegDataBuffer);
@@ -1222,7 +1216,7 @@ void DisplayManager_::tick()
void onDmxFrame(uint16_t universe, uint16_t length, uint8_t sequence, uint8_t *data)
{
sendFrame = 1;
- // set brightness of the whole strip
+ // set brightness of the whole matrix
if (universe == 10)
{
matrix->setBrightness(data[0]);
@@ -1595,11 +1589,6 @@ String DisplayManager_::getStats()
return jsonString;
}
-void DisplayManager_::setAppTime(long duration)
-{
- ui->setTimePerApp(duration);
-}
-
void DisplayManager_::setMatrixLayout(int layout)
{
delete matrix; // Free memory from the current matrix object