From 39e1b0b0dd285265269cad0c6fcf2e23940cbf71 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stephan=20M=C3=BChl?=
<31169771+Blueforcer@users.noreply.github.com>
Date: Fri, 31 Mar 2023 00:18:32 +0200
Subject: [PATCH] v0.45
- Introduces an function that allows users to add, remove, and rearrange multiple apps on the device at once via MQTT. This provides greater flexibility and customization options. Please note that this function is experimental and should be used with caution.
https://blueforcer.github.io/awtrix-light/#/mqtt?id=addremove-and-rearange-apps
---
docs/_sidebar.md | 2 +-
docs/custom.md | 2 +-
docs/index.html | 2 +
docs/mqtt.md | 70 +++++++++++
lib/MatrixUI/MatrixDisplayUi.cpp | 3 -
platformio.ini | 4 +-
src/DisplayManager.cpp | 191 ++++++++++++++++++++++++++++---
src/DisplayManager.h | 11 +-
src/Globals.cpp | 2 +-
src/MQTTManager.cpp | 57 +++++----
10 files changed, 295 insertions(+), 49 deletions(-)
diff --git a/docs/_sidebar.md b/docs/_sidebar.md
index 5e50f93..bf68571 100644
--- a/docs/_sidebar.md
+++ b/docs/_sidebar.md
@@ -10,11 +10,11 @@
- Features
- [Apps](apps.md)
- - [Custom Pages & Notifications](custom.md)
- [Alarm clock](alarm.md)
- [Timer](timer.md)
- [Icons](icons.md)
- [Sounds](sounds.md)
- MQTT
+ - [Custom Pages & Notifications](custom.md)
- [Commands](mqtt.md)
diff --git a/docs/custom.md b/docs/custom.md
index f4c7f8f..2564b5a 100644
--- a/docs/custom.md
+++ b/docs/custom.md
@@ -9,7 +9,7 @@ The JSON object has the following properties:
| Key | Type | Description | Default |
| --- | ---- | ----------- | ------- |
-| `pos` | number | defines the position of your custompage in the loop, starting at 1 for the first position. This will only apply with your first push. You cant change the position afterwards. For that you need to delete it and add it again. | At the end of the loop |
+| `pos` | number | defines the position of your custompage in the loop, starting at 0 for the first position. This will only apply with your first push. You cant change the position afterwards with [this function](mqtt?id=addremove-and-rearange-apps) |
| `text` | string | The text to display on the page. | |
| `icon` | string | The icon ID or filename (without extension) to display on the page. | |
| `repeat` | number | Sets how many times the text should be scrolled through the matrix before the display ends. | 1 |
diff --git a/docs/index.html b/docs/index.html
index 8d4b5e0..ef0664c 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -35,6 +35,8 @@
+
+