chore: removed useless code

This commit is contained in:
MarcoJayUsai
2025-03-22 09:15:48 +01:00
parent a733c98259
commit b7bf89ce2f
4 changed files with 0 additions and 25 deletions

View File

@@ -413,7 +413,6 @@ void Scheduler::handleRequest(string key, json::value value, string username, js
Unit* unit = unitsManager->getGroupLeader(ID);
if (unit != nullptr) {
unsigned char alarmState = value[L"alarmState"].as_integer();
log(username + " is trying to set unit " + unit->getUnitName() + "(" + unit->getName() + ") alarm state to " + to_string(alarmState), true);
unit->commandAlarmState(alarmState);
log(username + " set unit " + unit->getUnitName() + "(" + unit->getName() + ") alarm state to " + to_string(alarmState), true);
} else {

View File

@@ -84,7 +84,6 @@ void Unit::update(json::value json, double dt)
setAlive(json[L"isAlive"].as_bool());
if (json.has_string_field(L"alarmState")) {
// log("Unit " + to_string(json[L"unitName"]) + " has alarmState: " + to_string(json[L"alarmState"]));
setAlarmState(to_string(json[L"alarmState"]));
}