Skip to content

Commit

Permalink
Update logic
Browse files Browse the repository at this point in the history
  • Loading branch information
lazarkov committed Jul 25, 2024
1 parent 3db96d3 commit b47e947
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,9 @@ class DLL_EXPORT CommissionerDeclaration
void SetQRCodeDisplayed(bool newValue) { mQRCodeDisplayed = newValue; };
bool GetQRCodeDisplayed() const { return mQRCodeDisplayed; };

void SetCancelPasscode(bool newValue) { mCancelPasscode = newValue; };
bool GetCancelPasscode() const { return mCancelPasscode; };

/**
* Writes the CommissionerDeclaration message to the given buffer.
*
Expand Down Expand Up @@ -390,6 +393,10 @@ class DLL_EXPORT CommissionerDeclaration
{
ChipLogDetail(AppServer, "\tQR code displayed: true");
}
if (mCancelPasscode)
{
ChipLogDetail(AppServer, "\tQR code displayed: true");
}
ChipLogDetail(AppServer, "---- Commissioner Declaration End ----");
}

Expand All @@ -403,6 +410,7 @@ class DLL_EXPORT CommissionerDeclaration
kPasscodeDialogDisplayedTag,
kCommissionerPasscodeTag,
kQRCodeDisplayedTag,
kCancelPasscodeTag,

kMaxNum = UINT8_MAX
};
Expand All @@ -413,6 +421,7 @@ class DLL_EXPORT CommissionerDeclaration
bool mPasscodeDialogDisplayed = false;
bool mCommissionerPasscode = false;
bool mQRCodeDisplayed = false;
bool mCancelPasscode = false;
};

class DLL_EXPORT InstanceNameResolver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ CHIP_ERROR CommissionerDeclaration::ReadPayload(uint8_t * udcPayload, size_t pay
case kQRCodeDisplayedTag:
err = reader.Get(mQRCodeDisplayed);
break;
case kCancelPasscodeTag:
err = reader.Get(mCancelPasscode);
break;
}
}

Expand Down

0 comments on commit b47e947

Please sign in to comment.