Skip to content

Commit

Permalink
fix stragglers, restyle
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdecenzo committed Jul 26, 2022
1 parent 2282310 commit f158c8e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions src/controller/AutoCommissioner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,10 +545,17 @@ void AutoCommissioner::PauseCommissioning()

CHIP_ERROR AutoCommissioner::ResumeCommissioning()
{
VerifyOrReturnError(mPausedStage != CommissioningStage::kError, CHIP_ERROR_INCORRECT_STATE);
VerifyOrReturnError(mCommissioningPaused, CHIP_ERROR_INCORRECT_STATE);
mCommissioningPaused = false;

// if no new step was attempted
if (mPausedStage == CommissioningStage::kError)
{
return CHIP_NO_ERROR;
}

CommissioningStage nextStage = mPausedStage;
mPausedStage = CommissioningStage::kError;
mCommissioningPaused = false;

return PerformStep(nextStage);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public Builder setControllerVendorId(int controllerVendorId) {
this.controllerVendorId = controllerVendorId;
return this;
}

public Builder setFailsafeTimerSeconds(int failsafeTimerSeconds) {
if (failsafeTimerSeconds < 1 || failsafeTimerSeconds > 900) {
throw new IllegalArgumentException("failsafeTimerSeconds must be between 0 and 900");
Expand Down

0 comments on commit f158c8e

Please sign in to comment.