Fix #548: The first device profile within the json file was not correctly applied
This commit is contained in:
parent
b9824c052d
commit
d948439beb
@ -83,7 +83,7 @@ bool PinMappingClass::init(const String& deviceMapping)
|
||||
MessageOutput.println(F("Failed to read file, using default configuration"));
|
||||
}
|
||||
|
||||
for (uint8_t i = 1; i <= doc.size(); i++) {
|
||||
for (uint8_t i = 0; i < doc.size(); i++) {
|
||||
String devName = doc[i]["name"] | "";
|
||||
if (devName == deviceMapping) {
|
||||
strlcpy(_pinMapping.name, devName.c_str(), sizeof(_pinMapping.name));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user