Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

Commit

Permalink
v1.0.7 to fix bug in rtc_set_datetime()
Browse files Browse the repository at this point in the history
### Releases v1.0.7

1. Fix bug in rtc_set_datetime(). Check [Library converts datetime_t incorrectly, causing example to fail #4](#4)
  • Loading branch information
khoih-prog committed Nov 1, 2021
1 parent f7650a1 commit de19cbf
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 16 deletions.
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ The following is the sample terminal output when running example [RP2040_RTC_Tim

```
Start RP2040_RTC_Time_Ethernet on RASPBERRY_PI_PICO with W5x00 using EthernetLarge Library
RP2040_RTC v1.0.6
RP2040_RTC v1.0.7
Timezone_Generic v1.7.1
[EWS] =========== USE_ETHERNET_LARGE ===========
[EWS] Default SPI pinout:
Expand Down Expand Up @@ -819,7 +819,7 @@ The following is the sample terminal output when running example [RP2040_RTC_Tim

```
Start RP2040_RTC_Time_Ethernet on RASPBERRY_PI_PICO with W5x00 using EthernetLarge Library
RP2040_RTC v1.0.6
RP2040_RTC v1.0.7
Timezone_Generic v1.7.1
[EWS] =========== USE_ETHERNET_LARGE ===========
[EWS] Default SPI pinout:
Expand Down Expand Up @@ -862,7 +862,7 @@ The following is the sample terminal output when running example [RP2040_RTC_Tim

```
Start RP2040_RTC_Time_WiFiNINA on MBED NANO_RP2040_CONNECT with WiFiNINA using WiFiNINA_Generic Library
RP2040_RTC v1.0.6
RP2040_RTC v1.0.7
Timezone_Generic v1.7.1
Connecting to WPA SSID: HueNet1
You're connected to the network, IP = 192.168.2.153
Expand All @@ -889,7 +889,7 @@ The following is the sample terminal output when running example [RP2040_RTC_Ala

```
Start RP2040_RTC_Alarm_Ethernet on RASPBERRY_PI_PICO with W5x00 using EthernetLarge Library
RP2040_RTC v1.0.6
RP2040_RTC v1.0.7
Timezone_Generic v1.7.1
[EWS] =========== USE_ETHERNET_LARGE ===========
[EWS] Default SPI pinout:
Expand Down Expand Up @@ -940,7 +940,7 @@ Alarm @

```
Start RP2040_RTC_Alarm_Ethernet on RASPBERRY_PI_PICO with W5x00 using EthernetLarge Library
RP2040_RTC v1.0.6
RP2040_RTC v1.0.7
Timezone_Generic v1.7.1
[EWS] =========== USE_ETHERNET_LARGE ===========
[EWS] Default SPI pinout:
Expand Down Expand Up @@ -992,7 +992,7 @@ The following is the sample terminal output when running example [RP2040_RTC_Ala

```
Start RP2040_RTC_Alarm_Ethernet on MBED RASPBERRY_PI_PICO with W5x00 using EthernetLarge Library
RP2040_RTC v1.0.6
RP2040_RTC v1.0.7
Timezone_Generic v1.7.1
[EWS] =========== USE_ETHERNET_LARGE ===========
[EWS] Default SPI pinout:
Expand Down Expand Up @@ -1053,7 +1053,7 @@ Alarm @

```
Start RP2040_RTC_Alarm_Ethernet on RASPBERRY_PI_PICO with W5x00 using EthernetLarge Library
RP2040_RTC v1.0.6
RP2040_RTC v1.0.7
Timezone_Generic v1.7.1
[EWS] =========== USE_ETHERNET_LARGE ===========
[EWS] Default SPI pinout:
Expand Down Expand Up @@ -1106,7 +1106,7 @@ The following is the sample terminal output when running example [RP2040_RTC_Ala

```
Start RP2040_RTC_Alarm_WiFiNINA on MBED NANO_RP2040_CONNECT with WiFiNINA using WiFiNINA_Generic Library
RP2040_RTC v1.0.6
RP2040_RTC v1.0.7
Timezone_Generic v1.7.1
Connecting to WPA SSID: HueNet1
You're connected to the network, IP = 192.168.2.153
Expand Down Expand Up @@ -1139,7 +1139,7 @@ Alarm @

```
Start RP2040_RTC_Alarm_WiFiNINA on MBED NANO_RP2040_CONNECT with WiFiNINA using WiFiNINA_Generic Library
RP2040_RTC v1.0.6
RP2040_RTC v1.0.7
Timezone_Generic v1.7.1
Please upgrade the firmware
Connecting to WPA SSID: HueNet1
Expand Down Expand Up @@ -1205,13 +1205,16 @@ Many thanks for everyone for bug reporting, new feature suggesting, testing and

1. Thanks to [kenb2054](https://github.com/kenb2054) to report bugs in [Libraries updated to support new RP2040-based boards (RASPBERRY_PI_PICO, etc.) #43](https://forum.arduino.cc/t/libraries-updated-to-support-new-rp2040-based-boards-raspberry-pi-pico-etc/860353/43) leading to v1.0.4
2. Thanks to [josephchrzempiec](https://github.com/josephchrzempiec) to report bugs leading to v1.0.5
3. Thanks to [Maximilian Gerhardt](https://github.com/maxgerhardt) to create the PR [Correct platform name #2](https://github.com/khoih-prog/RP2040_RTC/pull/2) leading to v1.0.6
3. Thanks to [Maximilian Gerhardt](https://github.com/maxgerhardt)

- to create the PR [Correct platform name #2](https://github.com/khoih-prog/RP2040_RTC/pull/2) leading to v1.0.6
- to create perfect bug report [Library converts datetime_t incorrectly, causing example to fail #4](https://github.com/khoih-prog/RP2040_RTC/issues/4) leading to v1.0.7

<table>
<tr>
<td align="center"><a href="https://github.com/kenb2054"><img src="https://github.com/kenb2054.png" width="100px;" alt="kenb2054"/><br /><sub><b>kenb2054</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/josephchrzempiec"><img src="https://github.com/josephchrzempiec.png" width="100px;" alt="josephchrzempiec"/><br /><sub><b>josephchrzempiec</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/maxgerhardt"><img src="https://github.com/maxgerhardt.png" width="100px;" alt="maxgerhardt"/><br /><sub><b>Maximilian Gerhardt</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/maxgerhardt"><img src="https://github.com/maxgerhardt.png" width="100px;" alt="maxgerhardt"/><br /><sub><b>⭐️ Maximilian Gerhardt</b></sub></a><br /></td>
</tr>
</table>

Expand Down
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
## Table of Contents

* [Changelog](#changelog)
* [Releases v1.0.7](#releases-v107)
* [Releases v1.0.6](#releases-v106)
* [Releases v1.0.5](#releases-v105)
* [Releases v1.0.4](#releases-v104)
Expand All @@ -25,6 +26,10 @@

## Changelog

### Releases v1.0.7

1. Fix bug in rtc_set_datetime(). Check [Library converts datetime_t incorrectly, causing example to fail #4](https://github.com/khoih-prog/RP2040_RTC/issues/4)

### Releases v1.0.6

1. Fix platform in `library.json`
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "RP2040_RTC",
"version": "1.0.6",
"version": "1.0.7",
"keywords": "timing, device, rtc, control, timer, interrupt, alarm, utc, ntp, isr, isr-based, hardware-timer, mission-critical, accuracy, precise, non-blocking, mbed, rpi-pico, rp2040, nano-rp2040-connect",
"description": "This library enables you to use RTC from RP2040-based boards such as Nano_RP2040_Connect, RASPBERRY_PI_PICO. This RP204-based RTC, using Interrupt, has no battery backup. Time will be lost when powered down. To need NTP-client to update RTC every start-up.",
"authors":
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=RP2040_RTC
version=1.0.6
version=1.0.7
author=Khoi Hoang <khoih.prog@gmail.com>
maintainer=Khoi Hoang <khoih.prog@gmail.com>
sentence=This library enables you to use RTC from RP2040-based boards such as Nano_RP2040_Connect, RASPBERRY_PI_PICO
Expand Down
5 changes: 4 additions & 1 deletion src/DateTime_Generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Built by Khoi Hoang https://github.com/khoih-prog/RP2040_RTC
Licensed under MIT license
Version: 1.0.6
Version: 1.0.7
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -17,6 +17,7 @@
1.0.4 K Hoang 26/06/2021 Using TimeLib instead of Time
1.0.5 K Hoang 30/09/2021 Fix examples' issue with Nano_RP2040_Connect
1.0.6 K Hoang 22/10/2021 Fix platform in library.json for PIO
1.0.7 K Hoang 01/11/2021 Fix bug in rtc_set_datetime()
*****************************************************************************************************************************/

#pragma once
Expand Down Expand Up @@ -463,6 +464,8 @@ typedef struct {
tm.hour = dt.hour();
tm.min = dt.minute();
tm.sec = dt.second();

tm.dotw = dt.dayOfTheWeek();

#if RTC_DEBUG
Serial.print("Year = "); Serial.print(tm.year);
Expand Down
5 changes: 3 additions & 2 deletions src/RP2040_RTC.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Built by Khoi Hoang https://github.com/khoih-prog/RP2040_RTC
Licensed under MIT license
Version: 1.0.6
Version: 1.0.7
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -16,14 +16,15 @@
1.0.4 K Hoang 26/06/2021 Using TimeLib instead of Time
1.0.5 K Hoang 30/09/2021 Fix examples' issue with Nano_RP2040_Connect
1.0.6 K Hoang 22/10/2021 Fix platform in library.json for PIO
1.0.7 K Hoang 01/11/2021 Fix bug in rtc_set_datetime()
*****************************************************************************************************************************/

#pragma once

#ifndef RP2040_RTC_H
#define RP2040_RTC_H

#define RP2040_RTC_VERSION "RP2040_RTC v1.0.6"
#define RP2040_RTC_VERSION "RP2040_RTC v1.0.7"

#if !defined(RTC_DEBUG)
#define RTC_DEBUG false
Expand Down

0 comments on commit de19cbf

Please sign in to comment.