mirror of
https://gitlab.com/zwirbel/illucat.git
synced 2025-12-16 01:58:47 +01:00
remove dns server and newConn cb
This commit is contained in:
@@ -32,20 +32,20 @@ struct NeoPixelConfig : public JsonStruct {
|
||||
}
|
||||
};
|
||||
|
||||
struct NeoPatternMsg : public JsonStruct {
|
||||
String pattern;
|
||||
String payload;
|
||||
String topic;
|
||||
uint color;
|
||||
uint color2;
|
||||
uint totalSteps;
|
||||
struct NeoPatternState : public JsonStruct {
|
||||
uint pattern = 0;
|
||||
uint color= 0;
|
||||
uint color2= 0;
|
||||
uint totalSteps = 255;
|
||||
uint brightness = 100;
|
||||
|
||||
void mapJsonObject(JsonObject& root) {
|
||||
root["topic"] = topic;
|
||||
root["pattern"] = pattern;
|
||||
root["payload"] = payload;
|
||||
root["color"] = color;
|
||||
root["color2"] = color2;
|
||||
root["totalSteps"] = totalSteps;
|
||||
root["brightness"] = brightness;
|
||||
|
||||
}
|
||||
// Map a json object to this struct.
|
||||
void fromJsonObject(JsonObject& json){
|
||||
@@ -54,12 +54,11 @@ struct NeoPatternMsg : public JsonStruct {
|
||||
valid = 0;
|
||||
return;
|
||||
}
|
||||
topic = getAttrFromJson(json, "topic");
|
||||
color = getIntAttrFromJson(json, "color");
|
||||
color2 = getIntAttrFromJson(json, "color2");
|
||||
pattern = getAttrFromJson(json, "pattern");
|
||||
payload = getAttrFromJson(json, "payload");
|
||||
totalSteps = getIntAttrFromJson(json, "totalSteps", 255);
|
||||
color = getIntAttrFromJson(json, "color", color);
|
||||
color2 = getIntAttrFromJson(json, "color2", color2);
|
||||
pattern = getIntAttrFromJson(json, "pattern", pattern);
|
||||
brightness = getIntAttrFromJson(json, "brightness", brightness);
|
||||
totalSteps = getIntAttrFromJson(json, "totalSteps", totalSteps);
|
||||
valid = 1;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user