@@ -438,8 +438,8 @@ Status ColorControlServer::stopAllColorTransitions(EndpointId endpoint)
438
438
}
439
439
440
440
bool ColorControlServer::stopMoveStepCommand (app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,
441
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsMask,
442
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsOverride)
441
+ chip::BitMask<OptionsBitmap> optionsMask,
442
+ chip::BitMask<OptionsBitmap> optionsOverride)
443
443
{
444
444
EndpointId endpoint = commandPath.mEndpointId ;
445
445
Status status = Status::Success;
@@ -467,8 +467,8 @@ bool ColorControlServer::stopMoveStepCommand(app::CommandHandler * commandObj, c
467
467
}
468
468
469
469
bool ColorControlServer::shouldExecuteIfOff (EndpointId endpoint,
470
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionMask,
471
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionOverride)
470
+ chip::BitMask<OptionsBitmap> optionMask,
471
+ chip::BitMask<OptionsBitmap> optionOverride)
472
472
{
473
473
// From 5.2.2.2.1.10 of ZCL7 document 14-0129-15f-zcl-ch-5-lighting.docx:
474
474
// "Command execution SHALL NOT continue beyond the Options processing if
@@ -483,7 +483,7 @@ bool ColorControlServer::shouldExecuteIfOff(EndpointId endpoint,
483
483
return true ;
484
484
}
485
485
486
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> options = 0x00 ;
486
+ chip::BitMask<OptionsBitmap> options = 0x00 ;
487
487
Attributes::Options::Get (endpoint, &options);
488
488
489
489
bool on = true ;
@@ -516,14 +516,14 @@ bool ColorControlServer::shouldExecuteIfOff(EndpointId endpoint,
516
516
// 0xFF are the default values passed to the command handler when
517
517
// the payload is not present - in that case there is use of option
518
518
// attribute to decide execution of the command
519
- return options.GetField (ColorControl::OptionsBitmap::kExecuteIfOff );
519
+ return options.Has (ColorControl::OptionsBitmap::kExecuteIfOff );
520
520
}
521
521
// ---------- The above is to distinguish if the payload is present or not
522
522
523
523
if (optionMask.Has (ColorControl::OptionsBitmap::kExecuteIfOff ))
524
524
{
525
525
// Mask is present and set in the command payload, this indicates
526
- // use the over ride as temporary option
526
+ // use the override as temporary option
527
527
return optionOverride.Has (ColorControl::OptionsBitmap::kExecuteIfOff );
528
528
}
529
529
// if we are here - use the option bits
@@ -1334,8 +1334,8 @@ Status ColorControlServer::moveToHueAndSaturation(uint16_t hue, uint8_t saturati
1334
1334
*/
1335
1335
bool ColorControlServer::moveHueCommand (app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,
1336
1336
MoveModeEnum moveMode, uint16_t rate,
1337
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsMask,
1338
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsOverride,
1337
+ chip::BitMask<OptionsBitmap> optionsMask,
1338
+ chip::BitMask<OptionsBitmap> optionsOverride,
1339
1339
bool isEnhanced)
1340
1340
{
1341
1341
MATTER_TRACE_SCOPE (" moveHue" , " ColorControl" );
@@ -1442,8 +1442,8 @@ bool ColorControlServer::moveHueCommand(app::CommandHandler * commandObj, const
1442
1442
*/
1443
1443
bool ColorControlServer::moveToHueCommand (app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,
1444
1444
uint16_t hue, DirectionEnum moveDirection, uint16_t transitionTime,
1445
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsMask,
1446
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsOverride,
1445
+ chip::BitMask<OptionsBitmap> optionsMask,
1446
+ chip::BitMask<OptionsBitmap> optionsOverride,
1447
1447
bool isEnhanced)
1448
1448
{
1449
1449
MATTER_TRACE_SCOPE (" moveToHue" , " ColorControl" );
@@ -1578,8 +1578,8 @@ bool ColorControlServer::moveToHueCommand(app::CommandHandler * commandObj, cons
1578
1578
*/
1579
1579
bool ColorControlServer::moveToHueAndSaturationCommand (
1580
1580
app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, uint16_t hue, uint8_t saturation,
1581
- uint16_t transitionTime, chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsMask,
1582
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsOverride, bool isEnhanced)
1581
+ uint16_t transitionTime, chip::BitMask<OptionsBitmap> optionsMask,
1582
+ chip::BitMask<OptionsBitmap> optionsOverride, bool isEnhanced)
1583
1583
{
1584
1584
MATTER_TRACE_SCOPE (" moveToHueAndSaturation" , " ColorControl" );
1585
1585
// limit checking: hue and saturation are 0..254. Spec dictates we ignore
@@ -1619,8 +1619,8 @@ bool ColorControlServer::moveToHueAndSaturationCommand(
1619
1619
*/
1620
1620
bool ColorControlServer::stepHueCommand (app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,
1621
1621
StepModeEnum stepMode, uint16_t stepSize, uint16_t transitionTime,
1622
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsMask,
1623
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsOverride,
1622
+ chip::BitMask<OptionsBitmap> optionsMask,
1623
+ chip::BitMask<OptionsBitmap> optionsOverride,
1624
1624
bool isEnhanced)
1625
1625
{
1626
1626
MATTER_TRACE_SCOPE (" stepHue" , " ColorControl" );
@@ -1820,8 +1820,8 @@ bool ColorControlServer::stepSaturationCommand(app::CommandHandler * commandObj,
1820
1820
auto stepMode = commandData.stepMode ;
1821
1821
uint8_t stepSize = commandData.stepSize ;
1822
1822
uint8_t transitionTime = commandData.transitionTime ;
1823
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsMask = commandData.optionsMask ;
1824
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsOverride = commandData.optionsOverride ;
1823
+ chip::BitMask<OptionsBitmap> optionsMask = commandData.optionsMask ;
1824
+ chip::BitMask<OptionsBitmap> optionsOverride = commandData.optionsOverride ;
1825
1825
EndpointId endpoint = commandPath.mEndpointId ;
1826
1826
Status status = Status::Success;
1827
1827
uint8_t currentSaturation = 0 ;
@@ -1886,8 +1886,8 @@ bool ColorControlServer::colorLoopCommand(app::CommandHandler * commandObj, cons
1886
1886
auto direction = commandData.direction ;
1887
1887
uint16_t time = commandData.time ;
1888
1888
uint16_t startHue = commandData.startHue ;
1889
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsMask = commandData.optionsMask ;
1890
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsOverride = commandData.optionsOverride ;
1889
+ chip::BitMask<OptionsBitmap> optionsMask = commandData.optionsMask ;
1890
+ chip::BitMask<OptionsBitmap> optionsOverride = commandData.optionsOverride ;
1891
1891
EndpointId endpoint = commandPath.mEndpointId ;
1892
1892
Status status = Status::Success;
1893
1893
uint8_t isColorLoopActive = 0 ;
@@ -2214,8 +2214,8 @@ bool ColorControlServer::moveColorCommand(app::CommandHandler * commandObj, cons
2214
2214
{
2215
2215
int16_t rateX = commandData.rateX ;
2216
2216
int16_t rateY = commandData.rateY ;
2217
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsMask = commandData.optionsMask ;
2218
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsOverride = commandData.optionsOverride ;
2217
+ chip::BitMask<OptionsBitmap> optionsMask = commandData.optionsMask ;
2218
+ chip::BitMask<OptionsBitmap> optionsOverride = commandData.optionsOverride ;
2219
2219
EndpointId endpoint = commandPath.mEndpointId ;
2220
2220
Status status = Status::Success;
2221
2221
@@ -2310,8 +2310,8 @@ bool ColorControlServer::stepColorCommand(app::CommandHandler * commandObj, cons
2310
2310
int16_t stepX = commandData.stepX ;
2311
2311
int16_t stepY = commandData.stepY ;
2312
2312
uint16_t transitionTime = commandData.transitionTime ;
2313
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsMask = commandData.optionsMask ;
2314
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsOverride = commandData.optionsOverride ;
2313
+ chip::BitMask<OptionsBitmap> optionsMask = commandData.optionsMask ;
2314
+ chip::BitMask<OptionsBitmap> optionsOverride = commandData.optionsOverride ;
2315
2315
EndpointId endpoint = commandPath.mEndpointId ;
2316
2316
uint16_t currentColorX = 0 ;
2317
2317
uint16_t currentColorY = 0 ;
@@ -2566,7 +2566,7 @@ void ColorControlServer::startUpColorTempCommand(EndpointId endpoint)
2566
2566
if (status == Status::Success)
2567
2567
{
2568
2568
// Set ColorMode attributes to reflect ColorTemperature.
2569
- ColorControl::ColorModeEnum updateColorMode = ColorControl::ColorModeEnum::kColorTemperatureMireds ;
2569
+ auto updateColorMode = ColorControl::ColorModeEnum::kColorTemperatureMireds ;
2570
2570
Attributes::ColorMode::Set (endpoint, updateColorMode);
2571
2571
2572
2572
Attributes::EnhancedColorMode::Set (endpoint, static_cast <ColorControl::EnhancedColorModeEnum>(updateColorMode));
@@ -2643,8 +2643,8 @@ bool ColorControlServer::moveColorTempCommand(app::CommandHandler * commandObj,
2643
2643
uint16_t rate = commandData.rate ;
2644
2644
uint16_t colorTemperatureMinimum = commandData.colorTemperatureMinimumMireds ;
2645
2645
uint16_t colorTemperatureMaximum = commandData.colorTemperatureMaximumMireds ;
2646
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsMask = commandData.optionsMask ;
2647
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsOverride = commandData.optionsOverride ;
2646
+ chip::BitMask<OptionsBitmap> optionsMask = commandData.optionsMask ;
2647
+ chip::BitMask<OptionsBitmap> optionsOverride = commandData.optionsOverride ;
2648
2648
EndpointId endpoint = commandPath.mEndpointId ;
2649
2649
Status status = Status::Success;
2650
2650
uint16_t tempPhysicalMin = MIN_TEMPERATURE_VALUE;
@@ -2766,8 +2766,8 @@ bool ColorControlServer::stepColorTempCommand(app::CommandHandler * commandObj,
2766
2766
uint16_t transitionTime = commandData.transitionTime ;
2767
2767
uint16_t colorTemperatureMinimum = commandData.colorTemperatureMinimumMireds ;
2768
2768
uint16_t colorTemperatureMaximum = commandData.colorTemperatureMaximumMireds ;
2769
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsMask = commandData.optionsMask ;
2770
- chip::BitMask<chip::app::Clusters::ColorControl:: OptionsBitmap> optionsOverride = commandData.optionsOverride ;
2769
+ chip::BitMask<OptionsBitmap> optionsMask = commandData.optionsMask ;
2770
+ chip::BitMask<OptionsBitmap> optionsOverride = commandData.optionsOverride ;
2771
2771
EndpointId endpoint = commandPath.mEndpointId ;
2772
2772
Status status = Status::Success;
2773
2773
uint16_t tempPhysicalMin = MIN_TEMPERATURE_VALUE;
@@ -2896,7 +2896,7 @@ void ColorControlServer::levelControlColorTempChangeCommand(EndpointId endpoint)
2896
2896
return ;
2897
2897
}
2898
2898
2899
- ColorControl::ColorModeEnum colorMode = ColorControl::ColorModeEnum::kCurrentHueAndCurrentSaturation ;
2899
+ auto colorMode = ColorControl::ColorModeEnum::kCurrentHueAndCurrentSaturation ;
2900
2900
Attributes::ColorMode::Get (endpoint, &colorMode);
2901
2901
2902
2902
if (static_cast <ColorControl::EnhancedColorModeEnum>(colorMode) == ColorControl::EnhancedColorModeEnum::kColorTemperatureMireds )
0 commit comments