Skip to content

Commit

Permalink
V0.74
Browse files Browse the repository at this point in the history
!!! BREAKING CHANGES TO AWTRIX LIGHT APP!!!
- This version changes the autodiscovery for the mobile app. PlayStore review is pending!
Dont update if you dont want to wait for the App update.. Otherwise keep goin ;)

- Fixes Fireworks animation
- Add debug messages for parser errors
- Increase the boot delay to 5 seconds for a better chance to erase/flash it in case of an bootloop error.
  • Loading branch information
Blueforcer committed Aug 13, 2023
1 parent bbec5a0 commit d156779
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion docs/effects.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Standard values:
| PingPong | 8 | Rainbow | - |
| Radar | 1 | Rainbow | true |
| Checkerboard | 1 | Rainbow | true |
| Fireworks | 0.8 | Rainbow | true |
| Fireworks | 1 | Rainbow | true |
| PlasmaCloud | 3 | Rainbow | true |
| Ripple | 3 | Rainbow | true |
| Snake | 3 | Rainbow | - |
Expand Down
3 changes: 3 additions & 0 deletions src/DisplayManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ bool parseFragmentsText(const String &jsonText, std::vector<uint16_t> &colors, s
DeserializationError error = deserializeJson(doc, jsonText);
if (error)
{
DEBUG_PRINTLN(error.c_str());
doc.clear();
return false;
}
Expand Down Expand Up @@ -379,6 +380,7 @@ bool DisplayManager_::parseCustomPage(const String &name, const char *json)
DeserializationError error = deserializeJson(doc, json);
if (error)
{
DEBUG_PRINTLN(error.c_str());
doc.clear();
return false;
}
Expand Down Expand Up @@ -668,6 +670,7 @@ bool DisplayManager_::generateNotification(uint8_t source, const char *json)
DeserializationError error = deserializeJson(doc, json);
if (error)
{
DEBUG_PRINTLN(error.c_str());
doc.clear();
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ IPAddress gateway;
IPAddress subnet;
IPAddress primaryDNS;
IPAddress secondaryDNS;
const char *VERSION = "0.73";
const char *VERSION = "0.74";

String MQTT_HOST = "";
uint16_t MQTT_PORT = 1883;
Expand Down
4 changes: 2 additions & 2 deletions src/ServerManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ void ServerManager_::tick()
DEBUG_PRINTF("UDP-Paket: %s\n", incomingPacket);
if (strcmp(incomingPacket, "FIND_AWTRIX") == 0)
{
udp.beginPacket(udp.remoteIP(), udp.remotePort());
udp.printf("%s|%s", uniqueID, WiFi.localIP().toString().c_str());
udp.beginPacket(udp.remoteIP(),4211);
udp.printf(MQTT_PREFIX.c_str());
udp.endPacket();
}
}
Expand Down
14 changes: 2 additions & 12 deletions src/effects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@ void Pacifica(FastLED_NeoMatrix *matrix, int16_t x, int16_t y, EffectSettings *s
for (uint16_t j = 0; j < 8; j++)
{
uint16_t ulx, uly;

// Richtung berücksichtigen

ulx = (sPacificaTime / 8) - (i * 16); // Für UP und DOWN, verändert sich die x-Position
ulx = (sPacificaTime / 8) - (i * 16);
uly = (sPacificaTime / 4) + (j * 16);

uint16_t v = 0;
v += sin16(ulx * 6 + sPacificaTime / 2) / 8 + 127;
v += sin16(uly * 9 + sPacificaTime / 2) / 8 + 127;
Expand All @@ -34,8 +30,6 @@ void TheaterChase(FastLED_NeoMatrix *matrix, int16_t x, int16_t y, EffectSetting

static uint16_t j = 0;
static uint32_t lastUpdate = 0;
// Hier verwenden wir settings->speed um die Geschwindigkeit der Animation zu steuern.
// Die Geschwindigkeitseinstellung wird verwendet, um die Anzahl der Animationsschritte zu steuern, die übersprungen werden.
if (millis() - lastUpdate > 100 - settings->speed * 10)
{
lastUpdate = millis();
Expand Down Expand Up @@ -1061,7 +1055,7 @@ Effect effects[] = {
{"PingPong", PingPongEffect, EffectSettings(8, RainbowColors_p, true)},
{"Radar", RadarEffect, EffectSettings(1, RainbowColors_p, true)},
{"Checkerboard", CheckerboardEffect, EffectSettings(1, RainbowColors_p, true)},
{"Fireworks", Fireworks, EffectSettings(0, RainbowColors_p)},
{"Fireworks", Fireworks, EffectSettings(1, RainbowColors_p)},
{"PlasmaCloud", PlasmaCloudEffect, EffectSettings(3, RainbowColors_p, true)},
{"Ripple", RippleEffect, EffectSettings(3, RainbowColors_p, true)},
{"Snake", SnakeGame, EffectSettings(3, RainbowColors_p, true)},
Expand Down Expand Up @@ -1100,11 +1094,9 @@ int getEffectIndex(String name)
// Loads a palette from the LittleFS filesystem
CRGBPalette16 loadPaletteFromLittleFS(String paletteName)
{
Serial.println("Loading palette: " + paletteName);
File paletteFile = LittleFS.open("/PALETTES/" + paletteName + ".txt", "r");
if (!paletteFile)
{
Serial.println("Failed to open palette file " + paletteName);
return RainbowColors_p; // default palette
}

Expand All @@ -1120,8 +1112,6 @@ CRGBPalette16 loadPaletteFromLittleFS(String paletteName)
i++;
}
paletteFile.close();

Serial.println("Palette loaded: " + paletteName);
return palette;
}

Expand Down
27 changes: 17 additions & 10 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,18 @@
#include "ServerManager.h"
#include "Globals.h"
#include "UpdateManager.h"
#ifdef ULANZI
// Pinouts für das ULANZI-Environment

#define BUTTON_SELECT_PIN 27
#else
// Pinouts für das WEMOS_D1_MINI32-Environment
#define BUTTON_SELECT_PIN D4

#endif
TaskHandle_t taskHandle;
volatile bool StopTask = false;

bool stopBoot;
void BootAnimation(void *parameter)
{
const TickType_t xDelay = 1 / portTICK_PERIOD_MS;
Expand All @@ -60,9 +68,8 @@ void setup()
{
pinMode(15, OUTPUT);
digitalWrite(15, LOW);
delay(2000);
delay(5000);
loadSettings();
Serial.begin(115200);
PeripheryManager.setup();
ServerManager.loadSettings();
DisplayManager.setup();
Expand Down Expand Up @@ -102,11 +109,11 @@ void setup()

void loop()
{
ServerManager.tick();
DisplayManager.tick();
PeripheryManager.tick();
if (ServerManager.isConnected)
{
MQTTManager.tick();
}
ServerManager.tick();
DisplayManager.tick();
PeripheryManager.tick();
if (ServerManager.isConnected)
{
MQTTManager.tick();
}
}

0 comments on commit d156779

Please sign in to comment.