opener fixes

This commit is contained in:
technyon
2022-05-30 21:24:35 +02:00
parent 875dc34012
commit 836b84b549
7 changed files with 57 additions and 74 deletions

View File

@@ -89,21 +89,6 @@ void Network::initialize()
_preferences->putString(preference_mqtt_lock_path, _mqttPath);
}
String mqttOpenerPath = _preferences->getString(preference_mqtt_opener_path);
if(mqttOpenerPath.length() > 0)
{
size_t len = mqttOpenerPath.length();
for(int i=0; i < len; i++)
{
_mqttOpenerPath[i] = mqttOpenerPath.charAt(i);
}
}
else
{
strcpy(_mqttOpenerPath, "nukiopener");
_preferences->putString(preference_mqtt_opener_path, _mqttOpenerPath);
}
String mqttUser = _preferences->getString(preference_mqtt_user);
if(mqttUser.length() > 0)
{
@@ -448,4 +433,4 @@ bool Network::comparePrefixedPath(const char *fullPath, const char *subPath)
char prefixedPath[500];
buildMqttPath(subPath, prefixedPath);
return strcmp(fullPath, prefixedPath) == 0;
}
}