From 2166a190880af329f393032f3848da6963b432ee Mon Sep 17 00:00:00 2001 From: Arnd Date: Mon, 18 Dec 2017 07:01:55 +0100 Subject: [PATCH] Minor Fix Issue #8 incorrectly sets the 24-clock in begin() --- MCP7940.cpp | 2 +- MCP7940.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/MCP7940.cpp b/MCP7940.cpp index 7f5c209..c538f9b 100644 --- a/MCP7940.cpp +++ b/MCP7940.cpp @@ -198,7 +198,7 @@ bool MCP7940_Class::begin() { // Wire.beginTransmission(MCP7940_ADDRESS); // Address the MCP7940M // uint8_t errorCode = Wire.endTransmission(); // See if there's a device present // if (errorCode == 0) { // If we have a MCP7940M // - writeByte(MCP7940_RTCSEC,readByte(MCP7940_RTCHOUR)&B10111111); // Use 24 hour clock // + writeByte(MCP7940_RTCHOUR,readByte(MCP7940_RTCHOUR)&B10111111); // Use 24 hour clock // writeByte(MCP7940_CONTROL,readByte(MCP7940_CONTROL)|0x80); // assert alarm low, default high // _CrystalStatus = readByte(MCP7940_RTCSEC) >> MCP7940_RTCSEC_SC; // Status bit from register // _OscillatorStatus = readByte(MCP7940_RTCWKDAY)>> MCP7940_RTCWKDAY_OSCRUN; // Oscillator state from register // diff --git a/MCP7940.h b/MCP7940.h index ec92eb7..aa6c8cd 100644 --- a/MCP7940.h +++ b/MCP7940.h @@ -21,6 +21,7 @@ ** ** ** Vers. Date Developer Comments ** ** ====== ========== ============================= ============================================================== ** +** 1.0.5b 2017-12-18 https://github.com/SV-Zanshin Bug #8 - incorrect setting to 24-Hour clock ** ** 1.0.5a 2017-10-31 https://github.com/SV-Zanshin Bug #6 to remove classification on 2 template functions ** ** 1.0.4c 2017-08-13 https://github.com/SV-Zanshin Enhancement #5 to remove checks after Wire.requestFrom() ** ** 1.0.4b 2017-08-08 https://github.com/SV-Zanshin Replaced readRAM and writeRAM with template functions **