@@ -462,8 +462,7 @@ Status ColorControlServer::stopAllColorTransitions(EndpointId endpoint)
462
462
}
463
463
464
464
bool ColorControlServer::stopMoveStepCommand (app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,
465
- chip::BitMask<OptionsBitmap> optionsMask,
466
- chip::BitMask<OptionsBitmap> optionsOverride)
465
+ chip::BitMask<OptionsBitmap> optionsMask, chip::BitMask<OptionsBitmap> optionsOverride)
467
466
{
468
467
EndpointId endpoint = commandPath.mEndpointId ;
469
468
Status status = Status::Success;
@@ -490,8 +489,7 @@ bool ColorControlServer::stopMoveStepCommand(app::CommandHandler * commandObj, c
490
489
return true ;
491
490
}
492
491
493
- bool ColorControlServer::shouldExecuteIfOff (EndpointId endpoint,
494
- chip::BitMask<OptionsBitmap> optionMask,
492
+ bool ColorControlServer::shouldExecuteIfOff (EndpointId endpoint, chip::BitMask<OptionsBitmap> optionMask,
495
493
chip::BitMask<OptionsBitmap> optionOverride)
496
494
{
497
495
// From 5.2.2.2.1.10 of ZCL7 document 14-0129-15f-zcl-ch-5-lighting.docx:
@@ -1357,10 +1355,8 @@ Status ColorControlServer::moveToHueAndSaturation(uint16_t hue, uint8_t saturati
1357
1355
* @return false Failed
1358
1356
*/
1359
1357
bool ColorControlServer::moveHueCommand (app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,
1360
- MoveModeEnum moveMode, uint16_t rate,
1361
- chip::BitMask<OptionsBitmap> optionsMask,
1362
- chip::BitMask<OptionsBitmap> optionsOverride,
1363
- bool isEnhanced)
1358
+ MoveModeEnum moveMode, uint16_t rate, chip::BitMask<OptionsBitmap> optionsMask,
1359
+ chip::BitMask<OptionsBitmap> optionsOverride, bool isEnhanced)
1364
1360
{
1365
1361
MATTER_TRACE_SCOPE (" moveHue" , " ColorControl" );
1366
1362
EndpointId endpoint = commandPath.mEndpointId ;
@@ -1466,8 +1462,7 @@ bool ColorControlServer::moveHueCommand(app::CommandHandler * commandObj, const
1466
1462
*/
1467
1463
bool ColorControlServer::moveToHueCommand (app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,
1468
1464
uint16_t hue, DirectionEnum moveDirection, uint16_t transitionTime,
1469
- chip::BitMask<OptionsBitmap> optionsMask,
1470
- chip::BitMask<OptionsBitmap> optionsOverride,
1465
+ chip::BitMask<OptionsBitmap> optionsMask, chip::BitMask<OptionsBitmap> optionsOverride,
1471
1466
bool isEnhanced)
1472
1467
{
1473
1468
MATTER_TRACE_SCOPE (" moveToHue" , " ColorControl" );
@@ -1600,10 +1595,11 @@ bool ColorControlServer::moveToHueCommand(app::CommandHandler * commandObj, cons
1600
1595
* @return true Success
1601
1596
* @return false Failed
1602
1597
*/
1603
- bool ColorControlServer::moveToHueAndSaturationCommand (
1604
- app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, uint16_t hue, uint8_t saturation,
1605
- uint16_t transitionTime, chip::BitMask<OptionsBitmap> optionsMask,
1606
- chip::BitMask<OptionsBitmap> optionsOverride, bool isEnhanced)
1598
+ bool ColorControlServer::moveToHueAndSaturationCommand (app::CommandHandler * commandObj,
1599
+ const app::ConcreteCommandPath & commandPath, uint16_t hue,
1600
+ uint8_t saturation, uint16_t transitionTime,
1601
+ chip::BitMask<OptionsBitmap> optionsMask,
1602
+ chip::BitMask<OptionsBitmap> optionsOverride, bool isEnhanced)
1607
1603
{
1608
1604
MATTER_TRACE_SCOPE (" moveToHueAndSaturation" , " ColorControl" );
1609
1605
// limit checking: hue and saturation are 0..254. Spec dictates we ignore
@@ -1643,8 +1639,7 @@ bool ColorControlServer::moveToHueAndSaturationCommand(
1643
1639
*/
1644
1640
bool ColorControlServer::stepHueCommand (app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,
1645
1641
StepModeEnum stepMode, uint16_t stepSize, uint16_t transitionTime,
1646
- chip::BitMask<OptionsBitmap> optionsMask,
1647
- chip::BitMask<OptionsBitmap> optionsOverride,
1642
+ chip::BitMask<OptionsBitmap> optionsMask, chip::BitMask<OptionsBitmap> optionsOverride,
1648
1643
bool isEnhanced)
1649
1644
{
1650
1645
MATTER_TRACE_SCOPE (" stepHue" , " ColorControl" );
@@ -1841,14 +1836,14 @@ bool ColorControlServer::stepSaturationCommand(app::CommandHandler * commandObj,
1841
1836
const Commands::StepSaturation::DecodableType & commandData)
1842
1837
{
1843
1838
MATTER_TRACE_SCOPE (" stepSaturation" , " ColorControl" );
1844
- auto stepMode = commandData.stepMode ;
1845
- uint8_t stepSize = commandData.stepSize ;
1846
- uint8_t transitionTime = commandData.transitionTime ;
1847
- chip::BitMask<OptionsBitmap> optionsMask = commandData.optionsMask ;
1848
- chip::BitMask<OptionsBitmap> optionsOverride = commandData.optionsOverride ;
1849
- EndpointId endpoint = commandPath.mEndpointId ;
1850
- Status status = Status::Success;
1851
- uint8_t currentSaturation = 0 ;
1839
+ auto stepMode = commandData.stepMode ;
1840
+ uint8_t stepSize = commandData.stepSize ;
1841
+ uint8_t transitionTime = commandData.transitionTime ;
1842
+ chip::BitMask<OptionsBitmap> optionsMask = commandData.optionsMask ;
1843
+ chip::BitMask<OptionsBitmap> optionsOverride = commandData.optionsOverride ;
1844
+ EndpointId endpoint = commandPath.mEndpointId ;
1845
+ Status status = Status::Success;
1846
+ uint8_t currentSaturation = 0 ;
1852
1847
1853
1848
Color16uTransitionState * colorSaturationTransitionState = getSaturationTransitionState (endpoint);
1854
1849
VerifyOrExit (colorSaturationTransitionState != nullptr , status = Status::UnsupportedEndpoint);
@@ -1905,17 +1900,17 @@ bool ColorControlServer::colorLoopCommand(app::CommandHandler * commandObj, cons
1905
1900
const Commands::ColorLoopSet::DecodableType & commandData)
1906
1901
{
1907
1902
MATTER_TRACE_SCOPE (" colorLoop" , " ColorControl" );
1908
- auto updateFlags = commandData.updateFlags ;
1909
- auto action = commandData.action ;
1910
- auto direction = commandData.direction ;
1911
- uint16_t time = commandData.time ;
1912
- uint16_t startHue = commandData.startHue ;
1903
+ auto updateFlags = commandData.updateFlags ;
1904
+ auto action = commandData.action ;
1905
+ auto direction = commandData.direction ;
1906
+ uint16_t time = commandData.time ;
1907
+ uint16_t startHue = commandData.startHue ;
1913
1908
chip::BitMask<OptionsBitmap> optionsMask = commandData.optionsMask ;
1914
1909
chip::BitMask<OptionsBitmap> optionsOverride = commandData.optionsOverride ;
1915
- EndpointId endpoint = commandPath.mEndpointId ;
1916
- Status status = Status::Success;
1917
- uint8_t isColorLoopActive = 0 ;
1918
- uint8_t deactiveColorLoop = 0 ;
1910
+ EndpointId endpoint = commandPath.mEndpointId ;
1911
+ Status status = Status::Success;
1912
+ uint8_t isColorLoopActive = 0 ;
1913
+ uint8_t deactiveColorLoop = 0 ;
1919
1914
1920
1915
ColorHueTransitionState * colorHueTransitionState = getColorHueTransitionState (endpoint);
1921
1916
VerifyOrExit (colorHueTransitionState != nullptr , status = Status::UnsupportedEndpoint);
@@ -2236,12 +2231,12 @@ bool ColorControlServer::moveToColorCommand(app::CommandHandler * commandObj, co
2236
2231
bool ColorControlServer::moveColorCommand (app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,
2237
2232
const Commands::MoveColor::DecodableType & commandData)
2238
2233
{
2239
- int16_t rateX = commandData.rateX ;
2240
- int16_t rateY = commandData.rateY ;
2234
+ int16_t rateX = commandData.rateX ;
2235
+ int16_t rateY = commandData.rateY ;
2241
2236
chip::BitMask<OptionsBitmap> optionsMask = commandData.optionsMask ;
2242
2237
chip::BitMask<OptionsBitmap> optionsOverride = commandData.optionsOverride ;
2243
- EndpointId endpoint = commandPath.mEndpointId ;
2244
- Status status = Status::Success;
2238
+ EndpointId endpoint = commandPath.mEndpointId ;
2239
+ Status status = Status::Success;
2245
2240
2246
2241
Color16uTransitionState * colorXTransitionState = getXTransitionState (endpoint);
2247
2242
Color16uTransitionState * colorYTransitionState = getYTransitionState (endpoint);
@@ -2331,16 +2326,16 @@ bool ColorControlServer::moveColorCommand(app::CommandHandler * commandObj, cons
2331
2326
bool ColorControlServer::stepColorCommand (app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,
2332
2327
const Commands::StepColor::DecodableType & commandData)
2333
2328
{
2334
- int16_t stepX = commandData.stepX ;
2335
- int16_t stepY = commandData.stepY ;
2336
- uint16_t transitionTime = commandData.transitionTime ;
2329
+ int16_t stepX = commandData.stepX ;
2330
+ int16_t stepY = commandData.stepY ;
2331
+ uint16_t transitionTime = commandData.transitionTime ;
2337
2332
chip::BitMask<OptionsBitmap> optionsMask = commandData.optionsMask ;
2338
2333
chip::BitMask<OptionsBitmap> optionsOverride = commandData.optionsOverride ;
2339
- EndpointId endpoint = commandPath.mEndpointId ;
2340
- uint16_t currentColorX = 0 ;
2341
- uint16_t currentColorY = 0 ;
2342
- uint16_t colorX = 0 ;
2343
- uint16_t colorY = 0 ;
2334
+ EndpointId endpoint = commandPath.mEndpointId ;
2335
+ uint16_t currentColorX = 0 ;
2336
+ uint16_t currentColorY = 0 ;
2337
+ uint16_t colorX = 0 ;
2338
+ uint16_t colorY = 0 ;
2344
2339
2345
2340
Status status = Status::Success;
2346
2341
@@ -2663,16 +2658,16 @@ void ColorControlServer::updateTempCommand(EndpointId endpoint)
2663
2658
bool ColorControlServer::moveColorTempCommand (app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,
2664
2659
const Commands::MoveColorTemperature::DecodableType & commandData)
2665
2660
{
2666
- auto moveMode = commandData.moveMode ;
2667
- uint16_t rate = commandData.rate ;
2668
- uint16_t colorTemperatureMinimum = commandData.colorTemperatureMinimumMireds ;
2669
- uint16_t colorTemperatureMaximum = commandData.colorTemperatureMaximumMireds ;
2661
+ auto moveMode = commandData.moveMode ;
2662
+ uint16_t rate = commandData.rate ;
2663
+ uint16_t colorTemperatureMinimum = commandData.colorTemperatureMinimumMireds ;
2664
+ uint16_t colorTemperatureMaximum = commandData.colorTemperatureMaximumMireds ;
2670
2665
chip::BitMask<OptionsBitmap> optionsMask = commandData.optionsMask ;
2671
2666
chip::BitMask<OptionsBitmap> optionsOverride = commandData.optionsOverride ;
2672
- EndpointId endpoint = commandPath.mEndpointId ;
2673
- Status status = Status::Success;
2674
- uint16_t tempPhysicalMin = MIN_TEMPERATURE_VALUE;
2675
- uint16_t tempPhysicalMax = MAX_TEMPERATURE_VALUE;
2667
+ EndpointId endpoint = commandPath.mEndpointId ;
2668
+ Status status = Status::Success;
2669
+ uint16_t tempPhysicalMin = MIN_TEMPERATURE_VALUE;
2670
+ uint16_t tempPhysicalMax = MAX_TEMPERATURE_VALUE;
2676
2671
uint16_t transitionTime;
2677
2672
2678
2673
Color16uTransitionState * colorTempTransitionState = getTempTransitionState (endpoint);
@@ -2785,17 +2780,17 @@ bool ColorControlServer::moveToColorTempCommand(app::CommandHandler * commandObj
2785
2780
bool ColorControlServer::stepColorTempCommand (app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,
2786
2781
const Commands::StepColorTemperature::DecodableType & commandData)
2787
2782
{
2788
- auto stepMode = commandData.stepMode ;
2789
- uint16_t stepSize = commandData.stepSize ;
2790
- uint16_t transitionTime = commandData.transitionTime ;
2791
- uint16_t colorTemperatureMinimum = commandData.colorTemperatureMinimumMireds ;
2792
- uint16_t colorTemperatureMaximum = commandData.colorTemperatureMaximumMireds ;
2783
+ auto stepMode = commandData.stepMode ;
2784
+ uint16_t stepSize = commandData.stepSize ;
2785
+ uint16_t transitionTime = commandData.transitionTime ;
2786
+ uint16_t colorTemperatureMinimum = commandData.colorTemperatureMinimumMireds ;
2787
+ uint16_t colorTemperatureMaximum = commandData.colorTemperatureMaximumMireds ;
2793
2788
chip::BitMask<OptionsBitmap> optionsMask = commandData.optionsMask ;
2794
2789
chip::BitMask<OptionsBitmap> optionsOverride = commandData.optionsOverride ;
2795
- EndpointId endpoint = commandPath.mEndpointId ;
2796
- Status status = Status::Success;
2797
- uint16_t tempPhysicalMin = MIN_TEMPERATURE_VALUE;
2798
- uint16_t tempPhysicalMax = MAX_TEMPERATURE_VALUE;
2790
+ EndpointId endpoint = commandPath.mEndpointId ;
2791
+ Status status = Status::Success;
2792
+ uint16_t tempPhysicalMin = MIN_TEMPERATURE_VALUE;
2793
+ uint16_t tempPhysicalMax = MAX_TEMPERATURE_VALUE;
2799
2794
2800
2795
Color16uTransitionState * colorTempTransitionState = getTempTransitionState (endpoint);
2801
2796
VerifyOrExit (colorTempTransitionState != nullptr , status = Status::UnsupportedEndpoint);
0 commit comments