Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Fix TimeValue struct size (plus a couple minor changes)" #54

Merged
merged 1 commit into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions src/NukiBle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ NukiBle::NukiBle(const std::string& deviceName,
deviceServiceUUID(deviceServiceUUID),
gdioUUID(gdioUUID),
userDataUUID(userDataUUID),
preferencesId(preferencedId),
errorCode(ErrorCode::ERROR_UNKNOWN) {
preferencesId(preferencedId) {
}

NukiBle::~NukiBle() {
Expand Down Expand Up @@ -537,11 +536,7 @@ Nuki::CmdResult NukiBle::updateTime(TimeValue time) {
}

bool NukiBle::saveSecurityPincode(const uint16_t pinCode) {
if (preferences.putBytes(SECURITY_PINCODE_STORE_NAME, &pinCode, 2) == 2) {
this->pinCode = pinCode;
return true;
}
return false;
return (preferences.putBytes(SECURITY_PINCODE_STORE_NAME, &pinCode, 2) == 2);
}

void NukiBle::saveCredentials() {
Expand Down
4 changes: 2 additions & 2 deletions src/NukiConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,6 @@ struct __attribute__((packed)) TimeValue {
uint8_t day;
uint8_t hour;
uint8_t minute;
uint8_t second;
uint16_t second;
};
} // namespace Nuki
} // namespace Nuki
Loading