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:
@@ -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);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user