Skip to content

Commit

Permalink
fix level control logs
Browse files Browse the repository at this point in the history
  • Loading branch information
mkardous-silabs committed Feb 9, 2023
1 parent 9c631df commit a11a6d3
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/app/clusters/level-control/level-control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ static void setOnOffValue(EndpointId endpoint, bool onOff)
#ifdef EMBER_AF_PLUGIN_ON_OFF
if (emberAfContainsServer(endpoint, OnOff::Id))
{
emberAfLevelControlClusterPrintln("Setting on/off to %p due to level change", onOff ? "ON" : "OFF");
emberAfLevelControlClusterPrintln("Setting on/off to %s due to level change", onOff ? "ON" : "OFF");
OnOffServer::Instance().setOnOffValue(endpoint, (onOff ? OnOff::Commands::On::Id : OnOff::Commands::Off::Id), true);
}
#endif // EMBER_AF_PLUGIN_ON_OFF
Expand Down Expand Up @@ -450,12 +450,12 @@ bool emberAfLevelControlClusterMoveToLevelCallback(app::CommandHandler * command

if (transitionTime.IsNull())
{
emberAfLevelControlClusterPrintln("%pMOVE_TO_LEVEL %x null %x %x", "RX level-control:", level, optionsMask.Raw(),
emberAfLevelControlClusterPrintln("%s MOVE_TO_LEVEL %x null %x %x", "RX level-control:", level, optionsMask.Raw(),
optionsOverride.Raw());
}
else
{
emberAfLevelControlClusterPrintln("%pMOVE_TO_LEVEL %x %2x %x %x", "RX level-control:", level, transitionTime.Value(),
emberAfLevelControlClusterPrintln("%s MOVE_TO_LEVEL %x %2x %x %x", "RX level-control:", level, transitionTime.Value(),
optionsMask.Raw(), optionsOverride.Raw());
}

Expand All @@ -480,12 +480,12 @@ bool emberAfLevelControlClusterMoveToLevelWithOnOffCallback(app::CommandHandler

if (transitionTime.IsNull())
{
emberAfLevelControlClusterPrintln("%pMOVE_TO_LEVEL_WITH_ON_OFF %x null %x %x", "RX level-control:", level,
emberAfLevelControlClusterPrintln("%s MOVE_TO_LEVEL_WITH_ON_OFF %x null %x %x", "RX level-control:", level,
optionsMask.Raw(), optionsOverride.Raw());
}
else
{
emberAfLevelControlClusterPrintln("%pMOVE_TO_LEVEL_WITH_ON_OFF %x %2x %x %x", "RX level-control:", level,
emberAfLevelControlClusterPrintln("%s MOVE_TO_LEVEL_WITH_ON_OFF %x %2x %x %x", "RX level-control:", level,
transitionTime.Value(), optionsMask.Raw(), optionsOverride.Raw());
}

Expand All @@ -509,12 +509,12 @@ bool emberAfLevelControlClusterMoveCallback(app::CommandHandler * commandObj, co

if (rate.IsNull())
{
emberAfLevelControlClusterPrintln("%pMOVE %x null %x %x", "RX level-control:", moveMode, optionsMask.Raw(),
emberAfLevelControlClusterPrintln("%s MOVE %x null %x %x", "RX level-control:", moveMode, optionsMask.Raw(),
optionsOverride.Raw());
}
else
{
emberAfLevelControlClusterPrintln("%pMOVE %x %u %x %x", "RX level-control:", moveMode, rate.Value(), optionsMask.Raw(),
emberAfLevelControlClusterPrintln("%s MOVE %x %u %x %x", "RX level-control:", moveMode, rate.Value(), optionsMask.Raw(),
optionsOverride.Raw());
}

Expand All @@ -533,12 +533,12 @@ bool emberAfLevelControlClusterMoveWithOnOffCallback(app::CommandHandler * comma

if (rate.IsNull())
{
emberAfLevelControlClusterPrintln("%pMOVE_WITH_ON_OFF %x null %x %x", "RX level-control:", moveMode, optionsMask.Raw(),
emberAfLevelControlClusterPrintln("%s MOVE_WITH_ON_OFF %x null %x %x", "RX level-control:", moveMode, optionsMask.Raw(),
optionsOverride.Raw());
}
else
{
emberAfLevelControlClusterPrintln("%pMOVE_WITH_ON_OFF %u %2x %x %x", "RX level-control:", moveMode, rate.Value(),
emberAfLevelControlClusterPrintln("%s MOVE_WITH_ON_OFF %u %2x %x %x", "RX level-control:", moveMode, rate.Value(),
optionsMask.Raw(), optionsOverride.Raw());
}

Expand All @@ -558,12 +558,12 @@ bool emberAfLevelControlClusterStepCallback(app::CommandHandler * commandObj, co

if (transitionTime.IsNull())
{
emberAfLevelControlClusterPrintln("%pSTEP %x %x null %x %x", "RX level-control:", stepMode, stepSize, optionsMask.Raw(),
emberAfLevelControlClusterPrintln("%s STEP %x %x null %x %x", "RX level-control:", stepMode, stepSize, optionsMask.Raw(),
optionsOverride.Raw());
}
else
{
emberAfLevelControlClusterPrintln("%pSTEP %x %x %2x %x %x", "RX level-control:", stepMode, stepSize, transitionTime.Value(),
emberAfLevelControlClusterPrintln("%s STEP %x %x %2x %x %x", "RX level-control:", stepMode, stepSize, transitionTime.Value(),
optionsMask.Raw(), optionsOverride.Raw());
}

Expand All @@ -583,12 +583,12 @@ bool emberAfLevelControlClusterStepWithOnOffCallback(app::CommandHandler * comma

if (transitionTime.IsNull())
{
emberAfLevelControlClusterPrintln("%pSTEP_WITH_ON_OFF %x %x null %x %x", "RX level-control:", stepMode, stepSize,
emberAfLevelControlClusterPrintln("%s STEP_WITH_ON_OFF %x %x null %x %x", "RX level-control:", stepMode, stepSize,
optionsMask.Raw(), optionsOverride.Raw());
}
else
{
emberAfLevelControlClusterPrintln("%pSTEP_WITH_ON_OFF %x %x %2x %x %x", "RX level-control:", stepMode, stepSize,
emberAfLevelControlClusterPrintln("%s STEP_WITH_ON_OFF %x %x %2x %x %x", "RX level-control:", stepMode, stepSize,
transitionTime.Value(), optionsMask.Raw(), optionsOverride.Raw());
}

Expand All @@ -603,7 +603,7 @@ bool emberAfLevelControlClusterStopCallback(app::CommandHandler * commandObj, co
auto & optionsMask = commandData.optionsMask;
auto & optionsOverride = commandData.optionsOverride;

emberAfLevelControlClusterPrintln("%pSTOP", "RX level-control:");
emberAfLevelControlClusterPrintln("%s STOP", "RX level-control:");
stopHandler(commandPath.mEndpointId, Commands::Stop::Id, Optional<BitMask<LevelControlOptions>>(optionsMask),
Optional<BitMask<LevelControlOptions>>(optionsOverride));
return true;
Expand All @@ -614,7 +614,7 @@ bool emberAfLevelControlClusterStopWithOnOffCallback(app::CommandHandler * comma
{
auto & optionsMask = commandData.optionsMask;
auto & optionsOverride = commandData.optionsOverride;
emberAfLevelControlClusterPrintln("%pSTOP_WITH_ON_OFF", "RX level-control:");
emberAfLevelControlClusterPrintln("%s STOP_WITH_ON_OFF", "RX level-control:");
stopHandler(commandPath.mEndpointId, Commands::StopWithOnOff::Id, Optional<BitMask<LevelControlOptions>>(optionsMask),
Optional<BitMask<LevelControlOptions>>(optionsOverride));
return true;
Expand Down

0 comments on commit a11a6d3

Please sign in to comment.