Skip to content

Commit

Permalink
Merge pull request #22 from bxparks/develop
Browse files Browse the repository at this point in the history
merge v1.3.0 into master
  • Loading branch information
bxparks committed Jul 21, 2023
2 parents fd935f8 + 4eb213e commit 81a065e
Show file tree
Hide file tree
Showing 90 changed files with 403 additions and 355 deletions.
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,37 @@
# Changelog

* Unreleased
* 1.3.0 (2023-07-20)
* Replace call to `Epoch::daysToCurrentEpochFromConverterEpoch()` with
`Epoch::daysToCurrentEpochFromInternalEpoch()`, to be consistent with
AceTime v2.3.0.
* This an internal implementation detail, it should not cause an API
breakage.
* Upgrade tool chain
* Upgrade Arduino CLI to 0.33.0.
* Upgrade Arduino AVR Core to 1.8.6.
* Upgrade STM32 Core to 2.6.0.
* Upgrade ESP32 Core to 2.0.9.
* Upgrade Teensyduino from 1.56 to 1.57.
* Update supported boards and tiers
* Add SAMD21 and SAMD51 boards to Tier 1
* Add 2 SAMD boards from 2 different companies, to test their
Arduino Board software:
* Seeeduino XIAO M0 (SAMD21 48MHz ARM Cortex-M0+)
* Adafruit ItsyBitsy M4 (SAMD51 120MHz ARM Cortex-M4)
* SAMD21 and SAMD51 boards are back in Tier 1, as long as they use
the traditional Arduino API instead of the new
[ArduinoCore-api](https://github.com/arduino/ArduinoCore-api).
* Fortunately most third party SAMD21 and SAMD51 boards continue to
use the traditional Arduino API.
* Move Teensy 3.2 to Tier 2 ("Should work but not tested often")
* This board is entering end-of-life.
* As well, the Teensyduino environment integrates with the Arduino
IDE and CLI in a way that's different than all other third-party
Arduino boards. Some of my automation scripts do not work with
Teensyduino, so it becomes very time consuming to test the Teensy
boards.
* All Teensy boards are now in Tier 2 .
* 1.2.4 (2023-03-26)
* **Bug Fix**: Fix incorrect template parameter in the definition
of `SystemClockCoroutine` which prevented it from being executed by
Expand Down
64 changes: 33 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ complexity of both libraries.
This library can be an alternative to the Arduino Time
(https://github.com/PaulStoffregen/Time) library.

**Version**: v1.2.4 (2023-03-26)
**Version**: v1.2.5 (2023-07-20)

**Changelog**: [CHANGELOG.md](CHANGELOG.md)

Expand Down Expand Up @@ -1527,7 +1527,7 @@ having possibility that the setup process of the application could take longer.
sizeof(DS3231Clock): 7
sizeof(SystemClock): 28
sizeof(SystemClockLoop): 41
sizeof(SystemClockCoroutine): 52
sizeof(SystemClockCoroutine): 57
```

**STM32: 32-bit processors**
Expand Down Expand Up @@ -1572,12 +1572,12 @@ are 2 samples:
| DS3231Clock<SimpleWireFast> | 2742/ 43 | 2246/ 26 |
|----------------------------------------+--------------+--------------|
| SystemClockLoop | 1016/ 72 | 520/ 55 |
| SystemClockLoop+1 Basic zone | 7694/ 272 | 7198/ 255 |
| SystemClockLoop+1 Extended zone | 10846/ 340 | 10350/ 323 |
| SystemClockLoop+1 Basic zone | 8412/ 124 | 7916/ 107 |
| SystemClockLoop+1 Extended zone | 12166/ 124 | 11670/ 107 |
|----------------------------------------+--------------+--------------|
| SystemClockCoroutine | 1820/ 100 | 1324/ 83 |
| SystemClockCoroutine+1 Basic zone | 8468/ 300 | 7972/ 283 |
| SystemClockCoroutine+1 Extended zone | 11620/ 368 | 11124/ 351 |
| SystemClockCoroutine+1 Basic zone | 9186/ 152 | 8690/ 135 |
| SystemClockCoroutine+1 Extended zone | 12940/ 152 | 12444/ 135 |
+----------------------------------------------------------------------+
```

Expand All @@ -1596,12 +1596,12 @@ are 2 samples:
| EspSntpClock | 266637/28240 | 6528/ 344 |
|----------------------------------------+--------------+--------------|
| SystemClockLoop | 264809/28124 | 4700/ 228 |
| SystemClockLoop+1 Basic zone | 271485/28720 | 11376/ 824 |
| SystemClockLoop+1 Extended zone | 273493/28880 | 13384/ 984 |
| SystemClockLoop+1 Basic zone | 271541/28528 | 11432/ 632 |
| SystemClockLoop+1 Extended zone | 273981/28640 | 13872/ 744 |
|----------------------------------------+--------------+--------------|
| SystemClockCoroutine | 265353/28156 | 5244/ 260 |
| SystemClockCoroutine+1 Basic zone | 272045/28752 | 11936/ 856 |
| SystemClockCoroutine+1 Extended zone | 274053/28912 | 13944/ 1016 |
| SystemClockCoroutine+1 Basic zone | 272101/28560 | 11992/ 664 |
| SystemClockCoroutine+1 Extended zone | 274541/28672 | 14432/ 776 |
+----------------------------------------------------------------------+
```

Expand Down Expand Up @@ -1632,9 +1632,9 @@ are shown below:
+------------------------------------+-------------+----------+
| Method | micros/iter | diff |
|------------------------------------+-------------+----------|
| EmptyLoop | 1.106 | 0.000 |
| EmptyLoop | 1.107 | 0.000 |
|------------------------------------+-------------+----------|
| SystemClockLoop | 9.011 | 7.905 |
| SystemClockLoop | 9.012 | 7.905 |
+------------------------------------+-------------+----------+
```

Expand All @@ -1646,7 +1646,7 @@ are shown below:
|------------------------------------+-------------+----------|
| EmptyLoop | 0.139 | 0.000 |
|------------------------------------+-------------+----------|
| SystemClockLoop | 9.583 | 9.444 |
| SystemClockLoop | 9.586 | 9.447 |
+------------------------------------+-------------+----------+
```

Expand All @@ -1664,10 +1664,10 @@ These boards are tested on each release:
* SparkFun Pro Micro (16 MHz ATmega32U4)
* Seeed Studio XIAO M0 (SAMD21, 48 MHz ARM Cortex-M0+)
* STM32 Blue Pill (STM32F103C8, 72 MHz ARM Cortex-M3)
* Adafruit ItsyBitsy M4 (SAMD51, 120 MHz ARM Cortext-M4)
* NodeMCU 1.0 (ESP-12E module, 80 MHz ESP8266)
* WeMos D1 Mini (ESP-12E module, 80 MHz ESP8266)
* ESP32 dev board (ESP-WROOM-32 module, 240 MHz dual core Tensilica LX6)
* Teensy 3.2 (96 MHz ARM Cortex-M4)

**Tier 2: Should work**

Expand All @@ -1677,17 +1677,14 @@ These boards should work but I don't test them as often:
* Arduino Pro Mini (16 MHz ATmega328P)
* Mini Mega 2560 (Arduino Mega 2560 compatible, 16 MHz ATmega2560)
* Teensy LC (48 MHz ARM Cortex-M0+)
* Teensy 3.2 (96 MHz ARM Cortex-M4)
* STM32F411 Black Pill (STM32F411CEU6, 100 MHz ARM Cortex-M4)

**Tier 3: May work, but not supported**

* Other SAMD21 based boards.
* SAMD21 based boards are now split into 2 groups:
* Those using the new ArduinoCore-API, usually Arduino-branded
boards. These are explicitly blacklisted. See below.
* Other 3rd party SAMD21 boards using the previous Arduino API.
* The ones using the previous Arduino API *may* work but I have not
explicitly tested any of them except for the Seeed Studio XIAO M0.
* Other 3rd party SAMD21 and SAMD51 boards *may* work if their board software
uses the traditional Arduino API, instead of the
[ArduinoCore-API](https://github.com/arduino/ArduinoCore-api)

**Tier Blacklisted**

Expand All @@ -1696,10 +1693,11 @@ the compiler to print useful error messages instead of hundreds of lines of
compiler errors:

* Any platform using the ArduinoCore-API
(https://github.com/arduino/ArduinoCore-api), such as:
* megaAVR (e.g. Nano Every)
* SAMD21 boards w/ `arduino:samd` version >= 1.8.10 (e.g. Nano 33 IoT,
MKRZero, etc)
(https://github.com/arduino/ArduinoCore-api). For example:
* Arduino Nano Every
* Arduino Nano 33 IoT
* Arduino MKRZero
* Arduino UNO R4
* Raspberry Pi Pico RP2040

<a name="ToolChain"></a>
Expand All @@ -1708,24 +1706,28 @@ compiler errors:
This library was developed and tested using:

* [Arduino IDE 1.8.19](https://www.arduino.cc/en/Main/Software)
* [Arduino CLI 0.27.1](https://arduino.github.io/arduino-cli)
* [Arduino CLI 0.33.0](https://arduino.github.io/arduino-cli)
* [SpenceKonde ATTinyCore 1.5.2](https://github.com/SpenceKonde/ATTinyCore)
* [Arduino AVR Boards 1.8.5](https://github.com/arduino/ArduinoCore-avr)
* [Arduino AVR Boards 1.8.6](https://github.com/arduino/ArduinoCore-avr)
* [Arduino SAMD Boards 1.8.9](https://github.com/arduino/ArduinoCore-samd)
* [SparkFun AVR Boards 1.1.13](https://github.com/sparkfun/Arduino_Boards)
* [SparkFun SAMD Boards 1.8.6](https://github.com/sparkfun/Arduino_Boards)
* [STM32duino 2.3.0](https://github.com/stm32duino/Arduino_Core_STM32)
* [Adafruit SAMD Boards 1.7.11](https://github.com/adafruit/ArduinoCore-samd)
* [Seeeduino SAMD Boards 1.8.4](https://github.com/Seeed-Studio/ArduinoCore-samd)
* [STM32duino 2.6.0](https://github.com/stm32duino/Arduino_Core_STM32)
* [ESP8266 Arduino 3.0.2](https://github.com/esp8266/Arduino)
* [ESP32 Arduino 2.0.5](https://github.com/espressif/arduino-esp32)
* [ESP32 Arduino 2.0.9](https://github.com/espressif/arduino-esp32)
* [Teensyduino 1.57](https://www.pjrc.com/teensy/td_download.html)

This library is *not* compatible with:

* Any platform using the
[ArduinoCore-API](https://github.com/arduino/ArduinoCore-api), for example:
* [Arduino megaAVR](https://github.com/arduino/ArduinoCore-megaavr/)
* [ArduinoCore SAMD >=1.8.10](https://github.com/arduino/ArduinoCore-samd)
* [ArduinoCore megaAVR](https://github.com/arduino/ArduinoCore-megaavr/)
* [ArduinoCore renesas](https://github.com/arduino/ArduinoCore-renesas)
* [Arduino-Pico](https://github.com/earlephilhower/arduino-pico)
* [MegaCoreX](https://github.com/MCUdude/MegaCoreX)
* [Arduino SAMD Boards >=1.8.10](https://github.com/arduino/ArduinoCore-samd)

It should work with [PlatformIO](https://platformio.org/) but I have
not tested it.
Expand Down
2 changes: 1 addition & 1 deletion docs/doxygen.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = AceTimeClock
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 1.2.4
PROJECT_NUMBER = 1.3.0

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
6 changes: 3 additions & 3 deletions docs/html/AceTimeClock_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AceTimeClock
&#160;<span id="projectnumber">1.2.3</span>
&#160;<span id="projectnumber">1.3.0</span>
</div>
<div id="projectbrief">Clock classes for Arduino that can synchronize from an NTP server or an RTC chip</div>
</td>
Expand Down Expand Up @@ -99,8 +99,8 @@
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="preprocessor">#endif </span><span class="comment">// #if defined(ARDUINO_ARCH_STM32) || defined(EPOXY_DUINO)</span></div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; </div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="comment">// Version format: xxyyzz == &quot;xx.yy.zz&quot;</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;<span class="preprocessor">#define ACE_TIME_CLOCK_VERSION 10203</span></div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;<span class="preprocessor">#define ACE_TIME_CLOCK_VERSION_STRING &quot;1.2.3&quot;</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;<span class="preprocessor">#define ACE_TIME_CLOCK_VERSION 10300</span></div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;<span class="preprocessor">#define ACE_TIME_CLOCK_VERSION_STRING &quot;1.3.0&quot;</span></div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; </div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;<span class="preprocessor">#endif</span></div>
</div><!-- fragment --></div><!-- contents -->
Expand Down
2 changes: 1 addition & 1 deletion docs/html/ClockInterface_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AceTimeClock
&#160;<span id="projectnumber">1.2.3</span>
&#160;<span id="projectnumber">1.3.0</span>
</div>
<div id="projectbrief">Clock classes for Arduino that can synchronize from an NTP server or an RTC chip</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/Clock_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AceTimeClock
&#160;<span id="projectnumber">1.2.3</span>
&#160;<span id="projectnumber">1.3.0</span>
</div>
<div id="projectbrief">Clock classes for Arduino that can synchronize from an NTP server or an RTC chip</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/DS3231Clock_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AceTimeClock
&#160;<span id="projectnumber">1.2.3</span>
&#160;<span id="projectnumber">1.3.0</span>
</div>
<div id="projectbrief">Clock classes for Arduino that can synchronize from an NTP server or an RTC chip</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/DS3231_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AceTimeClock
&#160;<span id="projectnumber">1.2.3</span>
&#160;<span id="projectnumber">1.3.0</span>
</div>
<div id="projectbrief">Clock classes for Arduino that can synchronize from an NTP server or an RTC chip</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/EspSntpClock_8cpp_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AceTimeClock
&#160;<span id="projectnumber">1.2.3</span>
&#160;<span id="projectnumber">1.3.0</span>
</div>
<div id="projectbrief">Clock classes for Arduino that can synchronize from an NTP server or an RTC chip</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/EspSntpClock_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AceTimeClock
&#160;<span id="projectnumber">1.2.3</span>
&#160;<span id="projectnumber">1.3.0</span>
</div>
<div id="projectbrief">Clock classes for Arduino that can synchronize from an NTP server or an RTC chip</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/HardwareDateTime_8cpp_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AceTimeClock
&#160;<span id="projectnumber">1.2.3</span>
&#160;<span id="projectnumber">1.3.0</span>
</div>
<div id="projectbrief">Clock classes for Arduino that can synchronize from an NTP server or an RTC chip</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/HardwareDateTime_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AceTimeClock
&#160;<span id="projectnumber">1.2.3</span>
&#160;<span id="projectnumber">1.3.0</span>
</div>
<div id="projectbrief">Clock classes for Arduino that can synchronize from an NTP server or an RTC chip</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/HardwareTemperature_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AceTimeClock
&#160;<span id="projectnumber">1.2.3</span>
&#160;<span id="projectnumber">1.3.0</span>
</div>
<div id="projectbrief">Clock classes for Arduino that can synchronize from an NTP server or an RTC chip</div>
</td>
Expand Down
8 changes: 4 additions & 4 deletions docs/html/NtpClock_8cpp_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AceTimeClock
&#160;<span id="projectnumber">1.2.3</span>
&#160;<span id="projectnumber">1.3.0</span>
</div>
<div id="projectbrief">Clock classes for Arduino that can synchronize from an NTP server or an RTC chip</div>
</td>
Expand Down Expand Up @@ -243,7 +243,7 @@
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160;<span class="comment">// NTP epoch is 1900-01-01. Unix epoch is 1970-01-01. GPS epoch is 1980-01-06.</span></div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160;<span class="comment">// AceTime v2 epoch is 2050-01-01 by default but is adjustable at runtime.</span></div>
<div class="line"><a name="l00172"></a><span class="lineno"><a class="line" href="classace__time_1_1clock_1_1NtpClock.html#a089fa15e59b45faf79289cbca4760221"> 172</a></span>&#160;acetime_t <a class="code" href="classace__time_1_1clock_1_1NtpClock.html#a089fa15e59b45faf79289cbca4760221">NtpClock::convertNtpSecondsToAceTimeSeconds</a>(uint32_t ntpSeconds) {</div>
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; <span class="comment">// Sometimes the NTP packet is garage and contains 0. Mark that as invalid.</span></div>
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; <span class="comment">// Sometimes the NTP packet is garbage and contains 0. Mark that as invalid.</span></div>
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; <span class="comment">// NOTE: Is this necessary? Let&#39;s comment it out for now.</span></div>
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; <span class="comment">//if (ntpSeconds == 0) return kInvalidSeconds;</span></div>
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; </div>
Expand All @@ -252,8 +252,8 @@
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; <span class="comment">// 32-bit range of NTP seconds to the 32-bit AceTime seconds, automatically</span></div>
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; <span class="comment">// accounting for NTP rollovers, for any AceTime currentEpochYear().</span></div>
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; int32_t daysToCurrentEpochFromNtpEpoch =</div>
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; Epoch::daysToCurrentEpochFromConverterEpoch()</div>
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; + kDaysToConverterEpochFromNtpEpoch;</div>
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; Epoch::daysToCurrentEpochFromInternalEpoch()</div>
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; + kDaysToInternalEpochFromNtpEpoch;</div>
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160; uint32_t secondsToCurrentEpochFromNtpEpoch = (uint32_t) 86400</div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; * (uint32_t) daysToCurrentEpochFromNtpEpoch;</div>
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; uint32_t epochSeconds = ntpSeconds - secondsToCurrentEpochFromNtpEpoch;</div>
Expand Down
Loading

0 comments on commit 81a065e

Please sign in to comment.