Skip to content
Permalink
Browse files

Fix bug in update that masked 2s from the tens digit for hours.

  • Loading branch information...
Dan Campbell
Dan Campbell committed Oct 19, 2016
1 parent 377e67f commit 7ece12bb219e89b7313a1acc21f261a73a377a39
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/SparkFunDS1307RTC.cpp
@@ -162,8 +162,8 @@ bool DS1307::update(void)
_pm = true;
else
_pm = false;
_time[TIME_HOURS] &= 0x1F; // Mask out 24-hour bit from hours
}
_time[TIME_HOURS] &= 0x1F; // Mask out 24-hour bit from hours

return true;
}
@@ -496,4 +496,4 @@ bool DS1307::i2cReadBytes(uint8_t deviceAddress, ds1307_registers reg, uint8_t *
return true;
}

DS1307 rtc; // Use rtc in sketches
DS1307 rtc; // Use rtc in sketches

0 comments on commit 7ece12b

Please sign in to comment.
You can’t perform that action at this time.