@@ -462,8 +462,8 @@ Status ColorControlServer::stopAllColorTransitions(EndpointId endpoint)
462
462
}
463
463
464
464
bool ColorControlServer::stopMoveStepCommand (app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,
465
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsMask,
466
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsOverride)
465
+ chip::BitMask<OptionsBitmap> optionsMask,
466
+ chip::BitMask<OptionsBitmap> optionsOverride)
467
467
{
468
468
EndpointId endpoint = commandPath.mEndpointId ;
469
469
Status status = Status::Success;
@@ -491,8 +491,8 @@ bool ColorControlServer::stopMoveStepCommand(app::CommandHandler * commandObj, c
491
491
}
492
492
493
493
bool ColorControlServer::shouldExecuteIfOff (EndpointId endpoint,
494
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionMask,
495
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionOverride)
494
+ chip::BitMask<OptionsBitmap> optionMask,
495
+ chip::BitMask<OptionsBitmap> optionOverride)
496
496
{
497
497
// From 5.2.2.2.1.10 of ZCL7 document 14-0129-15f-zcl-ch-5-lighting.docx:
498
498
// "Command execution SHALL NOT continue beyond the Options processing if
@@ -507,7 +507,7 @@ bool ColorControlServer::shouldExecuteIfOff(EndpointId endpoint,
507
507
return true ;
508
508
}
509
509
510
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> options = 0x00 ;
510
+ chip::BitMask<OptionsBitmap> options = 0x00 ;
511
511
Attributes::Options::Get (endpoint, &options);
512
512
513
513
bool on = true ;
@@ -540,14 +540,14 @@ bool ColorControlServer::shouldExecuteIfOff(EndpointId endpoint,
540
540
// 0xFF are the default values passed to the command handler when
541
541
// the payload is not present - in that case there is use of option
542
542
// attribute to decide execution of the command
543
- return options.GetField (ColorControl::OptionsBitmap::kExecuteIfOff );
543
+ return options.Has (ColorControl::OptionsBitmap::kExecuteIfOff );
544
544
}
545
545
// ---------- The above is to distinguish if the payload is present or not
546
546
547
547
if (optionMask.Has (ColorControl::OptionsBitmap::kExecuteIfOff ))
548
548
{
549
549
// Mask is present and set in the command payload, this indicates
550
- // use the over ride as temporary option
550
+ // use the override as temporary option
551
551
return optionOverride.Has (ColorControl::OptionsBitmap::kExecuteIfOff );
552
552
}
553
553
// if we are here - use the option bits
@@ -1358,8 +1358,8 @@ Status ColorControlServer::moveToHueAndSaturation(uint16_t hue, uint8_t saturati
1358
1358
*/
1359
1359
bool ColorControlServer::moveHueCommand (app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,
1360
1360
MoveModeEnum moveMode, uint16_t rate,
1361
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsMask,
1362
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsOverride,
1361
+ chip::BitMask<OptionsBitmap> optionsMask,
1362
+ chip::BitMask<OptionsBitmap> optionsOverride,
1363
1363
bool isEnhanced)
1364
1364
{
1365
1365
MATTER_TRACE_SCOPE (" moveHue" , " ColorControl" );
@@ -1466,8 +1466,8 @@ bool ColorControlServer::moveHueCommand(app::CommandHandler * commandObj, const
1466
1466
*/
1467
1467
bool ColorControlServer::moveToHueCommand (app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,
1468
1468
uint16_t hue, DirectionEnum moveDirection, uint16_t transitionTime,
1469
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsMask,
1470
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsOverride,
1469
+ chip::BitMask<OptionsBitmap> optionsMask,
1470
+ chip::BitMask<OptionsBitmap> optionsOverride,
1471
1471
bool isEnhanced)
1472
1472
{
1473
1473
MATTER_TRACE_SCOPE (" moveToHue" , " ColorControl" );
@@ -1602,8 +1602,8 @@ bool ColorControlServer::moveToHueCommand(app::CommandHandler * commandObj, cons
1602
1602
*/
1603
1603
bool ColorControlServer::moveToHueAndSaturationCommand (
1604
1604
app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, uint16_t hue, uint8_t saturation,
1605
- uint16_t transitionTime, chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsMask,
1606
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsOverride, bool isEnhanced)
1605
+ uint16_t transitionTime, chip::BitMask<OptionsBitmap> optionsMask,
1606
+ chip::BitMask<OptionsBitmap> optionsOverride, bool isEnhanced)
1607
1607
{
1608
1608
MATTER_TRACE_SCOPE (" moveToHueAndSaturation" , " ColorControl" );
1609
1609
// limit checking: hue and saturation are 0..254. Spec dictates we ignore
@@ -1643,8 +1643,8 @@ bool ColorControlServer::moveToHueAndSaturationCommand(
1643
1643
*/
1644
1644
bool ColorControlServer::stepHueCommand (app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,
1645
1645
StepModeEnum stepMode, uint16_t stepSize, uint16_t transitionTime,
1646
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsMask,
1647
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsOverride,
1646
+ chip::BitMask<OptionsBitmap> optionsMask,
1647
+ chip::BitMask<OptionsBitmap> optionsOverride,
1648
1648
bool isEnhanced)
1649
1649
{
1650
1650
MATTER_TRACE_SCOPE (" stepHue" , " ColorControl" );
@@ -1844,8 +1844,8 @@ bool ColorControlServer::stepSaturationCommand(app::CommandHandler * commandObj,
1844
1844
auto stepMode = commandData.stepMode ;
1845
1845
uint8_t stepSize = commandData.stepSize ;
1846
1846
uint8_t transitionTime = commandData.transitionTime ;
1847
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsMask = commandData.optionsMask ;
1848
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsOverride = commandData.optionsOverride ;
1847
+ chip::BitMask<OptionsBitmap> optionsMask = commandData.optionsMask ;
1848
+ chip::BitMask<OptionsBitmap> optionsOverride = commandData.optionsOverride ;
1849
1849
EndpointId endpoint = commandPath.mEndpointId ;
1850
1850
Status status = Status::Success;
1851
1851
uint8_t currentSaturation = 0 ;
@@ -1910,8 +1910,8 @@ bool ColorControlServer::colorLoopCommand(app::CommandHandler * commandObj, cons
1910
1910
auto direction = commandData.direction ;
1911
1911
uint16_t time = commandData.time ;
1912
1912
uint16_t startHue = commandData.startHue ;
1913
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsMask = commandData.optionsMask ;
1914
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsOverride = commandData.optionsOverride ;
1913
+ chip::BitMask<OptionsBitmap> optionsMask = commandData.optionsMask ;
1914
+ chip::BitMask<OptionsBitmap> optionsOverride = commandData.optionsOverride ;
1915
1915
EndpointId endpoint = commandPath.mEndpointId ;
1916
1916
Status status = Status::Success;
1917
1917
uint8_t isColorLoopActive = 0 ;
@@ -2238,8 +2238,8 @@ bool ColorControlServer::moveColorCommand(app::CommandHandler * commandObj, cons
2238
2238
{
2239
2239
int16_t rateX = commandData.rateX ;
2240
2240
int16_t rateY = commandData.rateY ;
2241
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsMask = commandData.optionsMask ;
2242
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsOverride = commandData.optionsOverride ;
2241
+ chip::BitMask<OptionsBitmap> optionsMask = commandData.optionsMask ;
2242
+ chip::BitMask<OptionsBitmap> optionsOverride = commandData.optionsOverride ;
2243
2243
EndpointId endpoint = commandPath.mEndpointId ;
2244
2244
Status status = Status::Success;
2245
2245
@@ -2334,8 +2334,8 @@ bool ColorControlServer::stepColorCommand(app::CommandHandler * commandObj, cons
2334
2334
int16_t stepX = commandData.stepX ;
2335
2335
int16_t stepY = commandData.stepY ;
2336
2336
uint16_t transitionTime = commandData.transitionTime ;
2337
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsMask = commandData.optionsMask ;
2338
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsOverride = commandData.optionsOverride ;
2337
+ chip::BitMask<OptionsBitmap> optionsMask = commandData.optionsMask ;
2338
+ chip::BitMask<OptionsBitmap> optionsOverride = commandData.optionsOverride ;
2339
2339
EndpointId endpoint = commandPath.mEndpointId ;
2340
2340
uint16_t currentColorX = 0 ;
2341
2341
uint16_t currentColorY = 0 ;
@@ -2590,7 +2590,7 @@ void ColorControlServer::startUpColorTempCommand(EndpointId endpoint)
2590
2590
if (status == Status::Success)
2591
2591
{
2592
2592
// Set ColorMode attributes to reflect ColorTemperature.
2593
- ColorControl::ColorModeEnum updateColorMode = ColorControl::ColorModeEnum::kColorTemperatureMireds ;
2593
+ auto updateColorMode = ColorControl::ColorModeEnum::kColorTemperatureMireds ;
2594
2594
Attributes::ColorMode::Set (endpoint, updateColorMode);
2595
2595
2596
2596
Attributes::EnhancedColorMode::Set (endpoint, static_cast <ColorControl::EnhancedColorModeEnum>(updateColorMode));
@@ -2667,8 +2667,8 @@ bool ColorControlServer::moveColorTempCommand(app::CommandHandler * commandObj,
2667
2667
uint16_t rate = commandData.rate ;
2668
2668
uint16_t colorTemperatureMinimum = commandData.colorTemperatureMinimumMireds ;
2669
2669
uint16_t colorTemperatureMaximum = commandData.colorTemperatureMaximumMireds ;
2670
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsMask = commandData.optionsMask ;
2671
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsOverride = commandData.optionsOverride ;
2670
+ chip::BitMask<OptionsBitmap> optionsMask = commandData.optionsMask ;
2671
+ chip::BitMask<OptionsBitmap> optionsOverride = commandData.optionsOverride ;
2672
2672
EndpointId endpoint = commandPath.mEndpointId ;
2673
2673
Status status = Status::Success;
2674
2674
uint16_t tempPhysicalMin = MIN_TEMPERATURE_VALUE;
@@ -2790,8 +2790,8 @@ bool ColorControlServer::stepColorTempCommand(app::CommandHandler * commandObj,
2790
2790
uint16_t transitionTime = commandData.transitionTime ;
2791
2791
uint16_t colorTemperatureMinimum = commandData.colorTemperatureMinimumMireds ;
2792
2792
uint16_t colorTemperatureMaximum = commandData.colorTemperatureMaximumMireds ;
2793
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsMask = commandData.optionsMask ;
2794
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsOverride = commandData.optionsOverride ;
2793
+ chip::BitMask<OptionsBitmap> optionsMask = commandData.optionsMask ;
2794
+ chip::BitMask<OptionsBitmap> optionsOverride = commandData.optionsOverride ;
2795
2795
EndpointId endpoint = commandPath.mEndpointId ;
2796
2796
Status status = Status::Success;
2797
2797
uint16_t tempPhysicalMin = MIN_TEMPERATURE_VALUE;
@@ -2920,7 +2920,7 @@ void ColorControlServer::levelControlColorTempChangeCommand(EndpointId endpoint)
2920
2920
return ;
2921
2921
}
2922
2922
2923
- ColorControl::ColorModeEnum colorMode = ColorControl::ColorModeEnum::kCurrentHueAndCurrentSaturation ;
2923
+ auto colorMode = ColorControl::ColorModeEnum::kCurrentHueAndCurrentSaturation ;
2924
2924
Attributes::ColorMode::Get (endpoint, &colorMode);
2925
2925
2926
2926
if (static_cast <ColorControl::EnhancedColorModeEnum>(colorMode) == ColorControl::EnhancedColorModeEnum::kColorTemperatureMireds )
0 commit comments