mirror of
https://github.com/tbnobody/OpenDTU.git
synced 2025-12-13 02:09:58 +01:00
Fix #548: The first device profile within the json file was not correctly applied
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user