@@ -438,8 +438,7 @@ Status ColorControlServer::stopAllColorTransitions(EndpointId endpoint)
438
438
}
439
439
440
440
bool ColorControlServer::stopMoveStepCommand (app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,
441
- chip::BitMask<OptionsBitmap> optionsMask,
442
- chip::BitMask<OptionsBitmap> optionsOverride)
441
+ chip::BitMask<OptionsBitmap> optionsMask, chip::BitMask<OptionsBitmap> optionsOverride)
443
442
{
444
443
EndpointId endpoint = commandPath.mEndpointId ;
445
444
Status status = Status::Success;
@@ -466,8 +465,7 @@ bool ColorControlServer::stopMoveStepCommand(app::CommandHandler * commandObj, c
466
465
return true ;
467
466
}
468
467
469
- bool ColorControlServer::shouldExecuteIfOff (EndpointId endpoint,
470
- chip::BitMask<OptionsBitmap> optionMask,
468
+ bool ColorControlServer::shouldExecuteIfOff (EndpointId endpoint, chip::BitMask<OptionsBitmap> optionMask,
471
469
chip::BitMask<OptionsBitmap> optionOverride)
472
470
{
473
471
// From 5.2.2.2.1.10 of ZCL7 document 14-0129-15f-zcl-ch-5-lighting.docx:
@@ -1333,10 +1331,8 @@ Status ColorControlServer::moveToHueAndSaturation(uint16_t hue, uint8_t saturati
1333
1331
* @return false Failed
1334
1332
*/
1335
1333
bool ColorControlServer::moveHueCommand (app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,
1336
- MoveModeEnum moveMode, uint16_t rate,
1337
- chip::BitMask<OptionsBitmap> optionsMask,
1338
- chip::BitMask<OptionsBitmap> optionsOverride,
1339
- bool isEnhanced)
1334
+ MoveModeEnum moveMode, uint16_t rate, chip::BitMask<OptionsBitmap> optionsMask,
1335
+ chip::BitMask<OptionsBitmap> optionsOverride, bool isEnhanced)
1340
1336
{
1341
1337
MATTER_TRACE_SCOPE (" moveHue" , " ColorControl" );
1342
1338
EndpointId endpoint = commandPath.mEndpointId ;
@@ -1442,8 +1438,7 @@ bool ColorControlServer::moveHueCommand(app::CommandHandler * commandObj, const
1442
1438
*/
1443
1439
bool ColorControlServer::moveToHueCommand (app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,
1444
1440
uint16_t hue, DirectionEnum moveDirection, uint16_t transitionTime,
1445
- chip::BitMask<OptionsBitmap> optionsMask,
1446
- chip::BitMask<OptionsBitmap> optionsOverride,
1441
+ chip::BitMask<OptionsBitmap> optionsMask, chip::BitMask<OptionsBitmap> optionsOverride,
1447
1442
bool isEnhanced)
1448
1443
{
1449
1444
MATTER_TRACE_SCOPE (" moveToHue" , " ColorControl" );
@@ -1576,10 +1571,11 @@ bool ColorControlServer::moveToHueCommand(app::CommandHandler * commandObj, cons
1576
1571
* @return true Success
1577
1572
* @return false Failed
1578
1573
*/
1579
- bool ColorControlServer::moveToHueAndSaturationCommand (
1580
- app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, uint16_t hue, uint8_t saturation,
1581
- uint16_t transitionTime, chip::BitMask<OptionsBitmap> optionsMask,
1582
- chip::BitMask<OptionsBitmap> optionsOverride, bool isEnhanced)
1574
+ bool ColorControlServer::moveToHueAndSaturationCommand (app::CommandHandler * commandObj,
1575
+ const app::ConcreteCommandPath & commandPath, uint16_t hue,
1576
+ uint8_t saturation, uint16_t transitionTime,
1577
+ chip::BitMask<OptionsBitmap> optionsMask,
1578
+ chip::BitMask<OptionsBitmap> optionsOverride, bool isEnhanced)
1583
1579
{
1584
1580
MATTER_TRACE_SCOPE (" moveToHueAndSaturation" , " ColorControl" );
1585
1581
// limit checking: hue and saturation are 0..254. Spec dictates we ignore
@@ -1619,8 +1615,7 @@ bool ColorControlServer::moveToHueAndSaturationCommand(
1619
1615
*/
1620
1616
bool ColorControlServer::stepHueCommand (app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,
1621
1617
StepModeEnum stepMode, uint16_t stepSize, uint16_t transitionTime,
1622
- chip::BitMask<OptionsBitmap> optionsMask,
1623
- chip::BitMask<OptionsBitmap> optionsOverride,
1618
+ chip::BitMask<OptionsBitmap> optionsMask, chip::BitMask<OptionsBitmap> optionsOverride,
1624
1619
bool isEnhanced)
1625
1620
{
1626
1621
MATTER_TRACE_SCOPE (" stepHue" , " ColorControl" );
@@ -1817,14 +1812,14 @@ bool ColorControlServer::stepSaturationCommand(app::CommandHandler * commandObj,
1817
1812
const Commands::StepSaturation::DecodableType & commandData)
1818
1813
{
1819
1814
MATTER_TRACE_SCOPE (" stepSaturation" , " ColorControl" );
1820
- auto stepMode = commandData.stepMode ;
1821
- uint8_t stepSize = commandData.stepSize ;
1822
- uint8_t transitionTime = commandData.transitionTime ;
1823
- chip::BitMask<OptionsBitmap> optionsMask = commandData.optionsMask ;
1824
- chip::BitMask<OptionsBitmap> optionsOverride = commandData.optionsOverride ;
1825
- EndpointId endpoint = commandPath.mEndpointId ;
1826
- Status status = Status::Success;
1827
- uint8_t currentSaturation = 0 ;
1815
+ auto stepMode = commandData.stepMode ;
1816
+ uint8_t stepSize = commandData.stepSize ;
1817
+ uint8_t transitionTime = commandData.transitionTime ;
1818
+ chip::BitMask<OptionsBitmap> optionsMask = commandData.optionsMask ;
1819
+ chip::BitMask<OptionsBitmap> optionsOverride = commandData.optionsOverride ;
1820
+ EndpointId endpoint = commandPath.mEndpointId ;
1821
+ Status status = Status::Success;
1822
+ uint8_t currentSaturation = 0 ;
1828
1823
1829
1824
Color16uTransitionState * colorSaturationTransitionState = getSaturationTransitionState (endpoint);
1830
1825
VerifyOrExit (colorSaturationTransitionState != nullptr , status = Status::UnsupportedEndpoint);
@@ -1881,17 +1876,17 @@ bool ColorControlServer::colorLoopCommand(app::CommandHandler * commandObj, cons
1881
1876
const Commands::ColorLoopSet::DecodableType & commandData)
1882
1877
{
1883
1878
MATTER_TRACE_SCOPE (" colorLoop" , " ColorControl" );
1884
- auto updateFlags = commandData.updateFlags ;
1885
- auto action = commandData.action ;
1886
- auto direction = commandData.direction ;
1887
- uint16_t time = commandData.time ;
1888
- uint16_t startHue = commandData.startHue ;
1879
+ auto updateFlags = commandData.updateFlags ;
1880
+ auto action = commandData.action ;
1881
+ auto direction = commandData.direction ;
1882
+ uint16_t time = commandData.time ;
1883
+ uint16_t startHue = commandData.startHue ;
1889
1884
chip::BitMask<OptionsBitmap> optionsMask = commandData.optionsMask ;
1890
1885
chip::BitMask<OptionsBitmap> optionsOverride = commandData.optionsOverride ;
1891
- EndpointId endpoint = commandPath.mEndpointId ;
1892
- Status status = Status::Success;
1893
- uint8_t isColorLoopActive = 0 ;
1894
- uint8_t deactiveColorLoop = 0 ;
1886
+ EndpointId endpoint = commandPath.mEndpointId ;
1887
+ Status status = Status::Success;
1888
+ uint8_t isColorLoopActive = 0 ;
1889
+ uint8_t deactiveColorLoop = 0 ;
1895
1890
1896
1891
ColorHueTransitionState * colorHueTransitionState = getColorHueTransitionState (endpoint);
1897
1892
VerifyOrExit (colorHueTransitionState != nullptr , status = Status::UnsupportedEndpoint);
@@ -2212,12 +2207,12 @@ bool ColorControlServer::moveToColorCommand(app::CommandHandler * commandObj, co
2212
2207
bool ColorControlServer::moveColorCommand (app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,
2213
2208
const Commands::MoveColor::DecodableType & commandData)
2214
2209
{
2215
- int16_t rateX = commandData.rateX ;
2216
- int16_t rateY = commandData.rateY ;
2210
+ int16_t rateX = commandData.rateX ;
2211
+ int16_t rateY = commandData.rateY ;
2217
2212
chip::BitMask<OptionsBitmap> optionsMask = commandData.optionsMask ;
2218
2213
chip::BitMask<OptionsBitmap> optionsOverride = commandData.optionsOverride ;
2219
- EndpointId endpoint = commandPath.mEndpointId ;
2220
- Status status = Status::Success;
2214
+ EndpointId endpoint = commandPath.mEndpointId ;
2215
+ Status status = Status::Success;
2221
2216
2222
2217
Color16uTransitionState * colorXTransitionState = getXTransitionState (endpoint);
2223
2218
Color16uTransitionState * colorYTransitionState = getYTransitionState (endpoint);
@@ -2307,16 +2302,16 @@ bool ColorControlServer::moveColorCommand(app::CommandHandler * commandObj, cons
2307
2302
bool ColorControlServer::stepColorCommand (app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,
2308
2303
const Commands::StepColor::DecodableType & commandData)
2309
2304
{
2310
- int16_t stepX = commandData.stepX ;
2311
- int16_t stepY = commandData.stepY ;
2312
- uint16_t transitionTime = commandData.transitionTime ;
2305
+ int16_t stepX = commandData.stepX ;
2306
+ int16_t stepY = commandData.stepY ;
2307
+ uint16_t transitionTime = commandData.transitionTime ;
2313
2308
chip::BitMask<OptionsBitmap> optionsMask = commandData.optionsMask ;
2314
2309
chip::BitMask<OptionsBitmap> optionsOverride = commandData.optionsOverride ;
2315
- EndpointId endpoint = commandPath.mEndpointId ;
2316
- uint16_t currentColorX = 0 ;
2317
- uint16_t currentColorY = 0 ;
2318
- uint16_t colorX = 0 ;
2319
- uint16_t colorY = 0 ;
2310
+ EndpointId endpoint = commandPath.mEndpointId ;
2311
+ uint16_t currentColorX = 0 ;
2312
+ uint16_t currentColorY = 0 ;
2313
+ uint16_t colorX = 0 ;
2314
+ uint16_t colorY = 0 ;
2320
2315
2321
2316
Status status = Status::Success;
2322
2317
@@ -2639,16 +2634,16 @@ void ColorControlServer::updateTempCommand(EndpointId endpoint)
2639
2634
bool ColorControlServer::moveColorTempCommand (app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,
2640
2635
const Commands::MoveColorTemperature::DecodableType & commandData)
2641
2636
{
2642
- auto moveMode = commandData.moveMode ;
2643
- uint16_t rate = commandData.rate ;
2644
- uint16_t colorTemperatureMinimum = commandData.colorTemperatureMinimumMireds ;
2645
- uint16_t colorTemperatureMaximum = commandData.colorTemperatureMaximumMireds ;
2637
+ auto moveMode = commandData.moveMode ;
2638
+ uint16_t rate = commandData.rate ;
2639
+ uint16_t colorTemperatureMinimum = commandData.colorTemperatureMinimumMireds ;
2640
+ uint16_t colorTemperatureMaximum = commandData.colorTemperatureMaximumMireds ;
2646
2641
chip::BitMask<OptionsBitmap> optionsMask = commandData.optionsMask ;
2647
2642
chip::BitMask<OptionsBitmap> optionsOverride = commandData.optionsOverride ;
2648
- EndpointId endpoint = commandPath.mEndpointId ;
2649
- Status status = Status::Success;
2650
- uint16_t tempPhysicalMin = MIN_TEMPERATURE_VALUE;
2651
- uint16_t tempPhysicalMax = MAX_TEMPERATURE_VALUE;
2643
+ EndpointId endpoint = commandPath.mEndpointId ;
2644
+ Status status = Status::Success;
2645
+ uint16_t tempPhysicalMin = MIN_TEMPERATURE_VALUE;
2646
+ uint16_t tempPhysicalMax = MAX_TEMPERATURE_VALUE;
2652
2647
uint16_t transitionTime;
2653
2648
2654
2649
Color16uTransitionState * colorTempTransitionState = getTempTransitionState (endpoint);
@@ -2761,17 +2756,17 @@ bool ColorControlServer::moveToColorTempCommand(app::CommandHandler * commandObj
2761
2756
bool ColorControlServer::stepColorTempCommand (app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,
2762
2757
const Commands::StepColorTemperature::DecodableType & commandData)
2763
2758
{
2764
- auto stepMode = commandData.stepMode ;
2765
- uint16_t stepSize = commandData.stepSize ;
2766
- uint16_t transitionTime = commandData.transitionTime ;
2767
- uint16_t colorTemperatureMinimum = commandData.colorTemperatureMinimumMireds ;
2768
- uint16_t colorTemperatureMaximum = commandData.colorTemperatureMaximumMireds ;
2759
+ auto stepMode = commandData.stepMode ;
2760
+ uint16_t stepSize = commandData.stepSize ;
2761
+ uint16_t transitionTime = commandData.transitionTime ;
2762
+ uint16_t colorTemperatureMinimum = commandData.colorTemperatureMinimumMireds ;
2763
+ uint16_t colorTemperatureMaximum = commandData.colorTemperatureMaximumMireds ;
2769
2764
chip::BitMask<OptionsBitmap> optionsMask = commandData.optionsMask ;
2770
2765
chip::BitMask<OptionsBitmap> optionsOverride = commandData.optionsOverride ;
2771
- EndpointId endpoint = commandPath.mEndpointId ;
2772
- Status status = Status::Success;
2773
- uint16_t tempPhysicalMin = MIN_TEMPERATURE_VALUE;
2774
- uint16_t tempPhysicalMax = MAX_TEMPERATURE_VALUE;
2766
+ EndpointId endpoint = commandPath.mEndpointId ;
2767
+ Status status = Status::Success;
2768
+ uint16_t tempPhysicalMin = MIN_TEMPERATURE_VALUE;
2769
+ uint16_t tempPhysicalMax = MAX_TEMPERATURE_VALUE;
2775
2770
2776
2771
Color16uTransitionState * colorTempTransitionState = getTempTransitionState (endpoint);
2777
2772
VerifyOrExit (colorTempTransitionState != nullptr , status = Status::UnsupportedEndpoint);
0 commit comments