Skip to content

Commit

Permalink
v0.90
Browse files Browse the repository at this point in the history
- adds name and uniqueID to MDNS
- fixes a bug in "curtain" transition
- discard last changes to the effect api call
  • Loading branch information
Blueforcer committed Oct 15, 2023
1 parent 4c3beaf commit c3a14b8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ IPAddress gateway;
IPAddress subnet;
IPAddress primaryDNS;
IPAddress secondaryDNS;
const char *VERSION = "0.89";
const char *VERSION = "0.90";

String MQTT_HOST = "";
uint16_t MQTT_PORT = 1883;
Expand Down Expand Up @@ -404,7 +404,7 @@ bool MOODLIGHT_MODE;
long STATS_INTERVAL = 10000;
bool DEBUG_MODE = false;
uint8_t MIN_BRIGHTNESS = 2;
uint8_t MAX_BRIGHTNESS = 210;
uint8_t MAX_BRIGHTNESS = 160;
double movementFactor = 0.5;
int8_t TRANS_EFFECT = 1;
String AUTH_USER = "";
Expand Down
2 changes: 1 addition & 1 deletion src/MatrixDisplayUi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ void MatrixDisplayUi::curtainTransition()
float progress = (float)this->state.ticksSinceLastStateSwitch / (float)this->ticksPerTransition;
int curtainWidth = (int)(16 * progress); // 16 ist die Hälfte der Matrix-Breite

if (this->state.ticksSinceLastStateSwitch == 1)
if (this->state.ticksSinceLastStateSwitch == 1 || this->state.ticksSinceLastStateSwitch == 0)
{
// Kopieren Sie die aktuelle App-Ansicht in ledsCopy
(this->AppFunctions[this->state.currentApp])(this->matrix, &this->state, 0, 0, &gif1);
Expand Down
3 changes: 2 additions & 1 deletion src/ServerManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ void ServerManager_::setup()
{
MDNS.addService("http", "tcp", 80);
MDNS.addService("awtrix", "tcp", 80);
MDNS.addServiceTxt("awtrix", "tcp", "id", MQTT_PREFIX);
MDNS.addServiceTxt("awtrix", "tcp", "id", uniqueID);
MDNS.addServiceTxt("awtrix", "tcp", "name", MQTT_PREFIX);
MDNS.addServiceTxt("awtrix", "tcp", "type", "awtrix_light");
}

Expand Down
4 changes: 2 additions & 2 deletions src/effects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ int getEffectIndex(String name)
return i;
}
}
return 0;
return -1;
}

// Loads a palette from the LittleFS filesystem
Expand All @@ -1100,7 +1100,7 @@ CRGBPalette16 loadPaletteFromLittleFS(String paletteName)
return RainbowColors_p; // default palette
}

CRGBPalette16 palette;
CRGBPalette16 palette = RainbowColors_p;
String colorString;
int i = 0;
while (paletteFile.available() && i < 16)
Expand Down

0 comments on commit c3a14b8

Please sign in to comment.