mirror of
https://github.com/MrUnknownDE/OpenIris-ESPIDF.git
synced 2026-04-19 22:43:45 +02:00
cleanup project config from unused observer code
This commit is contained in:
@@ -44,8 +44,7 @@ CommandResult updateCameraCommand::execute(std::string_view jsonPayload)
|
||||
updatedConfig.framesize.has_value() ? updatedConfig.framesize.value() : oldConfig.framesize,
|
||||
updatedConfig.href.has_value() ? updatedConfig.href.value() : oldConfig.href,
|
||||
updatedConfig.quality.has_value() ? updatedConfig.quality.value() : oldConfig.quality,
|
||||
updatedConfig.brightness.has_value() ? updatedConfig.brightness.value() : oldConfig.brightness,
|
||||
true);
|
||||
updatedConfig.brightness.has_value() ? updatedConfig.brightness.value() : oldConfig.brightness);
|
||||
|
||||
return CommandResult::getSuccessResult("Config updated");
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ CommandResult setMDNSCommand::execute(std::string_view jsonPayload)
|
||||
if (!payload.has_value())
|
||||
return CommandResult::getErrorResult("Invalid payload");
|
||||
|
||||
projectConfig->setMDNSConfig(payload.value().hostname, true);
|
||||
projectConfig->setMDNSConfig(payload.value().hostname);
|
||||
|
||||
return CommandResult::getSuccessResult("Config updated");
|
||||
}
|
||||
|
||||
@@ -60,8 +60,7 @@ CommandResult setWiFiCommand::execute(std::string_view jsonPayload)
|
||||
wifiConfig.ssid,
|
||||
wifiConfig.password,
|
||||
wifiConfig.channel,
|
||||
wifiConfig.power,
|
||||
true);
|
||||
wifiConfig.power);
|
||||
|
||||
return CommandResult::getSuccessResult("Config updated");
|
||||
}
|
||||
@@ -93,7 +92,7 @@ CommandResult deleteWifiCommand::execute(std::string_view jsonPayload)
|
||||
if (!payload.has_value())
|
||||
return CommandResult::getErrorResult("Invalid payload");
|
||||
|
||||
projectConfig->deleteWifiConfig(payload.value().networkName, false);
|
||||
projectConfig->deleteWifiConfig(payload.value().networkName);
|
||||
return CommandResult::getSuccessResult("Config updated");
|
||||
}
|
||||
|
||||
@@ -164,8 +163,7 @@ CommandResult updateWifiCommand::execute(std::string_view jsonPayload)
|
||||
updatedConfig.ssid.has_value() ? updatedConfig.ssid.value() : networkToUpdate->ssid,
|
||||
updatedConfig.password.has_value() ? updatedConfig.password.value() : networkToUpdate->password,
|
||||
updatedConfig.channel.has_value() ? updatedConfig.channel.value() : networkToUpdate->channel,
|
||||
updatedConfig.power.has_value() ? updatedConfig.power.value() : networkToUpdate->power,
|
||||
false);
|
||||
updatedConfig.power.has_value() ? updatedConfig.power.value() : networkToUpdate->power);
|
||||
|
||||
return CommandResult::getSuccessResult("Config updated");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user