@@ -394,32 +394,32 @@ void ClosureManager::HandleClosureActionComplete(Action_t action)
394394 instance.mClosurePanelEndpoint3 .OnCalibrateActionComplete ();
395395
396396 DeviceLayer::PlatformMgr ().LockChipStack ();
397- isCalibrationInProgress = false ;
397+ mIsCalibrationInProgress = false ;
398398 DeviceLayer::PlatformMgr ().UnlockChipStack ();
399399
400400 break ;
401401 }
402402 case Action_t::STOP_ACTION: {
403- if (isCalibrationInProgress )
403+ if (mIsCalibrationInProgress )
404404 {
405405 ChipLogDetail (AppServer, " Stopping calibration action" );
406406 instance.mClosureEndpoint1 .OnStopCalibrateActionComplete ();
407407 instance.mClosurePanelEndpoint2 .OnStopCalibrateActionComplete ();
408408 instance.mClosurePanelEndpoint3 .OnStopCalibrateActionComplete ();
409409
410410 DeviceLayer::PlatformMgr ().LockChipStack ();
411- isCalibrationInProgress = false ;
411+ mIsCalibrationInProgress = false ;
412412 DeviceLayer::PlatformMgr ().UnlockChipStack ();
413413 }
414- else if (isMoveToInProgress )
414+ else if (mIsMoveToInProgress )
415415 {
416416 ChipLogDetail (AppServer, " Stopping move to action" );
417417 instance.mClosureEndpoint1 .OnStopMotionActionComplete ();
418418 instance.mClosurePanelEndpoint2 .OnStopMotionActionComplete ();
419419 instance.mClosurePanelEndpoint3 .OnStopMotionActionComplete ();
420420
421421 DeviceLayer::PlatformMgr ().LockChipStack ();
422- isMoveToInProgress = false ;
422+ mIsMoveToInProgress = false ;
423423 DeviceLayer::PlatformMgr ().UnlockChipStack ();
424424 }
425425 else
@@ -435,7 +435,7 @@ void ClosureManager::HandleClosureActionComplete(Action_t action)
435435 instance.mClosurePanelEndpoint3 .OnMoveToActionComplete ();
436436
437437 DeviceLayer::PlatformMgr ().LockChipStack ();
438- instance.isMoveToInProgress = false ;
438+ instance.mIsMoveToInProgress = false ;
439439 DeviceLayer::PlatformMgr ().UnlockChipStack ();
440440 ChipLogDetail (AppServer, " MoveTo action completed" );
441441 break ;
@@ -451,7 +451,7 @@ void ClosureManager::HandleClosureActionComplete(Action_t action)
451451 }
452452
453453 DeviceLayer::PlatformMgr ().LockChipStack ();
454- instance.isSetTargetInProgress = false ;
454+ instance.mIsSetTargetInProgress = false ;
455455 DeviceLayer::PlatformMgr ().UnlockChipStack ();
456456 break ;
457457 case Action_t::PANEL_STEP_ACTION:
@@ -466,7 +466,7 @@ void ClosureManager::HandleClosureActionComplete(Action_t action)
466466 }
467467
468468 DeviceLayer::PlatformMgr ().LockChipStack ();
469- instance.isStepActionInProgress = false ;
469+ instance.mIsStepActionInProgress = false ;
470470 DeviceLayer::PlatformMgr ().UnlockChipStack ();
471471 break ;
472472 default :
@@ -489,7 +489,7 @@ chip::Protocols::InteractionModel::Status ClosureManager::OnCalibrateCommand()
489489 DeviceLayer::PlatformMgr ().LockChipStack ();
490490 SetCurrentAction (Action_t::CALIBRATE_ACTION);
491491 mCurrentActionEndpointId = mClosureEndpoint1 .GetEndpointId ();
492- isCalibrationInProgress = true ;
492+ mIsCalibrationInProgress = true ;
493493 DeviceLayer::PlatformMgr ().UnlockChipStack ();
494494
495495 // Post an event to initiate the calibration action asynchronously.
@@ -654,7 +654,7 @@ chip::Protocols::InteractionModel::Status ClosureManager::OnMoveToCommand(const
654654 {
655655 SetCurrentAction (MOVE_TO_ACTION);
656656 }
657- isMoveToInProgress = true ;
657+ mIsMoveToInProgress = true ;
658658 DeviceLayer::PlatformMgr ().UnlockChipStack ();
659659
660660 // Post an event to initiate the move to action asynchronously.
@@ -816,7 +816,7 @@ chip::Protocols::InteractionModel::Status ClosureManager::OnSetTargetCommand(con
816816{
817817 MainStateEnum mClosureEndpoint1MainState ;
818818 VerifyOrReturnError (mClosureEndpoint1 .GetLogic ().GetMainState (mClosureEndpoint1MainState ) == CHIP_NO_ERROR, Status::Failure,
819- ChipLogError (AppServer, " Failed to get main state for Step command on Endpoint 1" ));
819+ ChipLogError (AppServer, " Failed to get main state for SetTarget command on Endpoint 1" ));
820820
821821 // If this command is received while the MainState attribute is currently either in Disengaged, Protected, Calibrating,
822822 // SetupRequired or Error, then a status code of INVALID_IN_STATE shall be returned.
@@ -827,7 +827,7 @@ chip::Protocols::InteractionModel::Status ClosureManager::OnSetTargetCommand(con
827827 Status::InvalidInState,
828828 ChipLogError (AppServer, " Step command not allowed in current state: %d" , static_cast <int >(mClosureEndpoint1MainState )));
829829
830- if (isSetTargetInProgress && mCurrentActionEndpointId != endpointId)
830+ if (mIsSetTargetInProgress && mCurrentActionEndpointId != endpointId)
831831 {
832832 ChipLogError (AppServer, " SetTarget action is already in progress on Endpoint %d" , mCurrentActionEndpointId );
833833 return Status::Failure;
@@ -886,7 +886,7 @@ chip::Protocols::InteractionModel::Status ClosureManager::OnSetTargetCommand(con
886886 SetCurrentAction (Action_t::SET_TARGET_ACTION);
887887 }
888888 mCurrentActionEndpointId = endpointId;
889- isSetTargetInProgress = true ;
889+ mIsSetTargetInProgress = true ;
890890 DeviceLayer::PlatformMgr ().UnlockChipStack ();
891891
892892 AppEvent event;
@@ -1113,7 +1113,7 @@ chip::Protocols::InteractionModel::Status ClosureManager::OnStepCommand(const St
11131113 Status::InvalidInState,
11141114 ChipLogError (AppServer, " Step command not allowed in current state: %d" , static_cast <int >(mClosureEndpoint1MainState )));
11151115
1116- if (isStepActionInProgress && mCurrentActionEndpointId != endpointId)
1116+ if (mIsStepActionInProgress && mCurrentActionEndpointId != endpointId)
11171117 {
11181118 ChipLogError (AppServer, " Step action is already in progress on Endpoint %d" , mCurrentActionEndpointId );
11191119 return Status::Failure;
@@ -1145,7 +1145,7 @@ chip::Protocols::InteractionModel::Status ClosureManager::OnStepCommand(const St
11451145 DeviceLayer::PlatformMgr ().LockChipStack ();
11461146 SetCurrentAction (PANEL_STEP_ACTION);
11471147 mCurrentActionEndpointId = endpointId;
1148- isStepActionInProgress = true ;
1148+ mIsStepActionInProgress = true ;
11491149 DeviceLayer::PlatformMgr ().UnlockChipStack ();
11501150
11511151 AppEvent event;
@@ -1284,3 +1284,7 @@ bool ClosureManager::GetPanelNextPosition(const GenericDimensionStateStruct & cu
12841284 }
12851285 return true ;
12861286}
1287+ bool ClosureManager::IsClosureControlMotionInProgress () const
1288+ {
1289+ return mIsMoveToInProgress ;
1290+ }
0 commit comments