Fix getLEDCurrentCommand after rebase, cleanup todos, add current monitoring to setup script

This commit is contained in:
Lorow
2025-10-19 19:29:04 +02:00
parent 16c5906841
commit dbcee66fa8
3 changed files with 26 additions and 14 deletions

View File

@@ -212,12 +212,7 @@ CommandResult getLEDCurrentCommand(std::shared_ptr<DependencyRegistry> registry)
return CommandResult::getErrorResult("MonitoringManager unavailable");
}
float ma = mon->getCurrentMilliAmps();
const auto json = nlohmann::json
{
{
"led_current_ma", std::format("{:.3f}", static_cast<double>(ma))
}
}
const auto json = nlohmann::json{{"led_current_ma", std::format("{:.3f}", static_cast<double>(ma))}};
return CommandResult::getSuccessResult(json);
#else
return CommandResult::getErrorResult("Monitoring disabled");