Skip to content

Commit

Permalink
Merge pull request #54 from I-Connect/revert-52-fixes
Browse files Browse the repository at this point in the history
Revert "Fix TimeValue struct size (plus a couple minor changes)"
  • Loading branch information
Bascy authored May 23, 2024
2 parents 1e8a2ae + 0598f52 commit 0b35059
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
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

0 comments on commit 0b35059

Please sign in to comment.