Enhance logging in CustomRobot::processOacCmd method. Added informational log statement to display the current switch state before toggling, improving visibility into command processing.

This commit is contained in:
2025-09-09 11:39:34 +08:00
parent b35395e543
commit fb4ea73ec0

View File

@@ -268,7 +268,7 @@ bool CustomRobot::processOacCmd(const std::string& cmd, const nlohmann::json& me
LOG_ERROR("Failed to get current switch state"); LOG_ERROR("Failed to get current switch state");
return false; return false;
} }
LOG_INFO("Current switch state: " + std::string(currentEnable ? "true" : "false"));
// switch to opposite state // switch to opposite state
return controller_->SwitchSet(!currentEnable); return controller_->SwitchSet(!currentEnable);