Skip to content

Commit e5c5d37

Browse files
authored
usermod_fseq.h aktualisieren
1 parent 076912a commit e5c5d37

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

usermods/FSEQ/usermod_fseq.h

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,25 @@ class UsermodFseq : public Usermod {
8888
// Unique ID for the usermod
8989
uint16_t getId() override { return USERMOD_ID_SD_CARD; }
9090

91-
// Add a link in the Info tab to your SD UI
91+
// Add a link in the Info tab to your SD
9292
void addToJsonInfo(JsonObject &root) override {
9393
JsonObject user = root["u"];
9494
if (user.isNull()) {
9595
user = root.createNestedObject("u");
9696
}
97-
// Create an array with two items: label and value
97+
9898
JsonArray arr = user.createNestedArray("Usermod FSEQ UI");
9999

100-
String ip = WiFi.localIP().toString();
101-
arr.add("http://" + ip + "/fsequi"); // value
100+
if (WiFi.status() == WL_CONNECTED) {
101+
String ip = WiFi.localIP().toString();
102+
String url = "http://" + ip + "/fsequi";
103+
104+
arr.add("Open FSEQ UI"); // angezeigter Text
105+
arr.add(url); // URL → macht klickbar
106+
} else {
107+
arr.add("FSEQ UI");
108+
arr.add("(WiFi not connected)");
109+
}
102110
}
103111

104112
// Save your SPI pins to WLED config JSON

0 commit comments

Comments
 (0)