Skip to content

Commit 3a22ba6

Browse files
committed
feat: do not check device_settings secondaryText and useInspection null status
1 parent 7001fa4 commit 3a22ba6

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

firmware/src/radio/websocket.cpp

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -133,18 +133,10 @@ void parseDeviceSettings(JsonObject doc) {
133133
return;
134134
}
135135

136-
if (doc.containsKey("use_inspection")) {
137-
bool useInspection = doc["use_inspection"];
138-
state.useInspection = useInspection;
139-
}
140-
141-
if (doc.containsKey("secondary_text")) {
142-
String secondaryText = doc["secondary_text"];
143-
strncpy(state.secondaryText, secondaryText.c_str(), 32);
144-
}
145-
146-
bool added = doc["added"];
147-
state.added = added;
136+
String secondaryText = doc["secondary_text"];
137+
strncpy(state.secondaryText, secondaryText.c_str(), 32);
138+
state.useInspection = doc["use_inspection"];
139+
state.added = doc["added"];
148140

149141
stateHasChanged = true;
150142
}

0 commit comments

Comments
 (0)