Skip to content

Commit 49183f6

Browse files
authored
Merge pull request #81 from bxparks/develop
merge v1.8.1 into master
2 parents 7511ff9 + df21ec6 commit 49183f6

22 files changed

+159
-84
lines changed

.github/workflows/aunit_tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
- name: Verify examples
2727
run: |
2828
make -C examples
29+
make -C examples/MemoryBenchmark epoxy
2930
3031
- name: Verify tests
3132
run: |

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Changelog
22

33
* Unreleased
4+
* 1.8.1 (2021-10-18, TZDB 2021d)
5+
* Add `make -C examples/MemoryBenchmark epoxy` to GitHub actions.
6+
* Upgrade to TZDB 2021d.
47
* 1.8.0 (2021-10-15, TZDB 2021c)
58
* **Breaking Change**: Move clock classes under `ace_time::clock` and
69
implementation classes under `ace_time::hw` to the new

DEVELOPER.md

Lines changed: 47 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -565,31 +565,52 @@ available.
565565
* `$ make clean`
566566
* `$ make`
567567
* `$ ./BasicHinnantDateTest.out | grep failed`
568-
* There should be no failures: `TestRunner summary: 268 passed, 0
569-
failed, 0 skipped, 0 timed out, out of 268 test(s).`
568+
* There should be no failures.
570569
* ExtendedHinnantDateTest
571570
* `$ cd .../AceTimeValidation/ExtendedHinnantDateTest`
572571
* Update the `TZ_VERSION` variable in the `Makefile` with the commit tag
573572
of the new TZDB version. (e.g. `TZ_VERSION = 2020c`).
574573
* `$ make clean`
575574
* `$ make`
576575
* `$ ./ExtendedHinnantDateTest.out | grep failed`
577-
* There should be no failures: `TestRunner summary: 387 passed, 0
578-
failed, 0 skipped, 0 timed out, out of 387 test(s).`
579-
* Update the various zone info files:
580-
* `src/ace_time/zonedb`
576+
* There should be no failures.
577+
* Verify that the `AceTime` library and the `AceTimePython` library agree with
578+
each other using the same TZDB version. This requires going into the
579+
[AceTimeValidation](https://github.com/bxparks/AceTimeValidation) project.
580+
* BasicAcetzTest
581+
* `$ cd .../AceTimeValidation/BasicAcetzTest`
582+
* Update the `TZ_VERSION` variable in the `Makefile` with the commit tag
583+
of the new TZDB version. (e.g. `TZ_VERSION = 2020c`).
584+
* `$ make clean`
585+
* `$ make`
586+
* `$ ./BasicAcetzTest.out | grep failed`
587+
* There should be no failures.
588+
* ExtendedAcetzTest
589+
* `$ cd .../AceTimeValidation/ExtendedAcetzTest`
590+
* Update the `TZ_VERSION` variable in the `Makefile` with the commit tag
591+
of the new TZDB version. (e.g. `TZ_VERSION = 2020c`).
592+
* `$ make clean`
593+
* `$ make`
594+
* `$ ./ExtendedAcetzTest.out | grep failed`
595+
* There should be no failures.
596+
* Update the various zoneinfo files for AceTime:
597+
* `zonedb`
581598
* `$ cd src/ace_time/zonedb`
582599
* Edit the `Makefile` and update the `TZ_VERSION`.
583600
* `$ make`
584-
* `src/ace_time/zonedbx`
601+
* `zonedbx`
585602
* `$ cd src/ace_time/zonedbx`
586603
* Edit the `Makefile` and update the `TZ_VERSION`.
587604
* `$ make`
588-
* `AceTimeTools/zonedbpy`
589-
* `$ cd AceTimeTools/zonedbpy`
605+
* Update the zoneinfo files for AceTimePython:
606+
* ``zonedbpy`
607+
* `$ cd AceTimePython/src/acetime/zonedbpy`
590608
* Edit the `Makefile` and update the `TZ_VERSION`.
591609
* `$ make`
592-
* Update the CHANGELOG.md.
610+
* Update CHANGELOGs
611+
* AceTime/CHANGELOG.md
612+
* AceTimePython/CHANGELOG.md
613+
* AceTimeValidation/CHANGELOG.md
593614
* Commit the changes to git
594615
* `$ git add ...`
595616
* `$ git commit -m "..."`
@@ -628,7 +649,7 @@ tests will fail until the underlying timezone database of the OS is updated.
628649
* Go to https://github.com/bxparks/AceTime.
629650
* Create a Pull Request from `develop` to `master`.
630651
* Approve and merge the PR.
631-
* Create a new Release.
652+
* Create a new Release of AceTime.
632653
* Go to https://github.com/bxparks/AceTime
633654
* Click on "Releases"
634655
* Click on "Draft a new release"
@@ -637,9 +658,19 @@ tests will fail until the underlying timezone database of the OS is updated.
637658
* Enter the release notes. I normally just copy and paste the latest changes
638659
from `CHANGELOG.md`.
639660
* Click Publish release.
661+
* Create a new Release of AceTimePython.
662+
* Go to https://github.com/bxparks/AceTimePython
663+
* Click on "Releases"
664+
* Click on "Draft a new release"
665+
* Enter a tag version (e.g. `v1.2`), targeting the `master` branch.
666+
* Enter the release title.
667+
* Enter the release notes. I normally just copy and paste the latest changes
668+
from `CHANGELOG.md`.
669+
* Click Publish release.
640670
* Add corresponding tags on AceTimeTools and AceTimeValidation for reference.
641-
* Go to https://github.com/bxparks/AceTimeTools
642-
* `$ git tag -a 'atX.Y.Z' -m 'AceTime vX.Y.Z'`
643-
* `$ git push --tags`
644-
* Go to https://github.com/bxparks/AceTimeValidation
645-
* (Same as above)
671+
* AceTimePython
672+
* `$ git tag -a 'atX.Y.Z' -m 'AceTime vX.Y.Z'`
673+
* `$ git push --tags`
674+
* AceTimeValidation
675+
* `$ git tag -a 'atX.Y.Z' -m 'AceTime vX.Y.Z'`
676+
* `$ git push --tags`

MIGRATING.md

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ libraries](https://github.com/Testato/SoftwareWire/wiki/Arduino-I2C-libraries).
8888
The `<AceWire.h>` library solves this problem by using compile-time polymorphism
8989
through C++ templates.
9090

91-
Here is the migration process. For all occurrences of the `DS3231Clock` class
92-
like this:
91+
Here is the migration process. For all occurrences of the old `DS3231Clock`
92+
class that look like this:
9393

9494
```C++
9595
#include <AceTimeClock.h>
@@ -99,7 +99,8 @@ using namespace ace_time::clock;
9999
DS3231Clock dsClock;
100100
```
101101
102-
Replace that with a template instance of the `DS3231Clock<T>` class:
102+
Replace that with a template instance of the `DS3231Clock<T>` class, and its I2C
103+
interface classes (`TwoWire` and `TwoWireInterface`):
103104
104105
```C++
105106
#include <AceTimeClock.h>
@@ -111,24 +112,42 @@ using namespace ace_time::clock;
111112
using WireInterface = ace_wire::TwoWireInterface<TwoWire>;
112113
WireInterface wireInterface(Wire);
113114
DS3231Clock<WireInterface> dsClock(wireInterface);
115+
116+
void setup() {
117+
...
118+
Wire.begin();
119+
wireInterface.begin();
120+
dsClock.setup();
121+
...
122+
}
114123
```
115124

116-
The new version requires more configuration. But in return, we gain more
117-
flexibility and potentially a large reduction of flash memory consumption. Here
118-
is another example where the `SimpleWireInterface` class is swapped in place of
119-
the `TwoWireInterface` class, without any changes to the `DS3231Clock` class:
125+
The new `DS3231Clock<T>` class requires more configuration. But in return, we
126+
gain more flexibility and potentially a large reduction of flash memory
127+
consumption if the pre-installed `<Wire.h>` is replaced with a different I2C
128+
implementation. For example, here is a version of the `DS3231Clock` object
129+
where the `SimpleWireInterface` software I2C class replaces the hardware
130+
`TwoWireInterface` class, without any changes to the `DS3231Clock` class:
120131

121132
```C++
122133
#include <AceTimeClock.h>
123134
#include <AceWire.h>
124135
using namespace ace_time;
136+
using namespace ace_time::clock;
125137

126138
const uint8_t SCL_PIN = SCL;
127139
const uint8_t SDA_PIN = SDA;
128140
const uint8_t DELAY_MICROS = 4;
129141
using WireInterface = ace_wire::SimpleWireInterface;
130142
WireInterface wireInterface(SDA_PIN, SCL_PIN, DELAY_MICROS);
131143
DS3231Clock<WireInterface> dsClock(wireInterface);
144+
145+
void setup() {
146+
...
147+
wireInterface.begin();
148+
dsClock.setup();
149+
...
150+
}
132151
```
133152
134153
According to the benchmarks at

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ This library can be an alternative to the Arduino Time
4141
(https://github.com/PaulStoffregen/Time) and Arduino Timezone
4242
(https://github.com/JChristensen/Timezone) libraries.
4343

44-
**Version**: 1.8.0 (2021-10-15, TZDB version 2021c)
44+
**Version**: 1.8.1 (2021-10-18, TZDB version 2021d)
4545

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

@@ -87,17 +87,14 @@ This library can be an alternative to the Arduino Time
8787

8888
The latest stable release is available in the Arduino Library Manager in the
8989
IDE. Search for "AceTime". Click install. The Library Manager should
90-
automatically install the dependent library:
91-
92-
* AceCommon (https://github.com/bxparks/AceCommon)
93-
94-
The development version can be installed by cloning the 2 git repos:
90+
automatically install AceTime and its the dependent library:
9591

9692
* AceTime (https://github.com/bxparks/AceTime)
9793
* AceCommon (https://github.com/bxparks/AceCommon)
9894

95+
The development version can be installed by cloning the above repos manually.
9996
You can copy over the contents to the `./libraries` directory used by the
100-
Arduino IDE. (The result is directories named `./libraries/AceTime` and
97+
Arduino IDE. (The result is a set of directories named `./libraries/AceTime` and
10198
`./libraries/AceCommon`). Or you can create symlinks from `./libraries` to these
10299
directories. Or you can `git clone` directly into the `./libraries` directory.
103100

USER_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The primary purpose of AceTime classes is to convert between an integer
44
representing the number of seconds since Epoch (2000-01-01T00:00:00 UTC) to
55
human-readable components in different timezones.
66

7-
**Version**: 1.8.0 (2021-10-15, TZDB 2021c)
7+
**Version**: 1.8.1 (2021-10-18, TZDB 2021d)
88

99
**Related Documents**:
1010

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=AceTime
2-
version=1.8.0
2+
version=1.8.1
33
author=Brian T. Park <[email protected]>
44
maintainer=Brian T. Park <[email protected]>
55
sentence=Date, time, timezone classes for Arduino supporting the full IANA TZ Database to convert epoch seconds to date and time components in different time zones.

src/AceTime.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
#include "ace_time/time_period_mutation.h"
6868

6969
// Version format: xxyyzz == "xx.yy.zz"
70-
#define ACE_TIME_VERSION 10800
71-
#define ACE_TIME_VERSION_STRING "1.8.0"
70+
#define ACE_TIME_VERSION 10801
71+
#define ACE_TIME_VERSION_STRING "1.8.1"
7272

7373
#endif

src/ace_time/zonedb/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ TARGETS := zone_infos.cpp zone_infos.h zone_policies.cpp zone_policies.h
22

33
TOOLS := $(abspath ../../../../AceTimeTools)
44

5-
TZ_VERSION := 2021c
5+
TZ_VERSION := 2021d
66
START_YEAR := 2000
77
UNTIL_YEAR := 2050
88

src/ace_time/zonedb/zone_infos.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// $ /home/brian/src/AceTimeTools/src/acetimetools/tzcompiler.py
44
// --input_dir /home/brian/dev/tz
55
// --output_dir /home/brian/src/AceTime/src/ace_time/zonedb
6-
// --tz_version 2021c
6+
// --tz_version 2021d
77
// --action zonedb
88
// --language arduino
99
// --scope basic
@@ -22,7 +22,7 @@
2222
// northamerica
2323
// southamerica
2424
//
25-
// from https://github.com/eggert/tz/releases/tag/2021c
25+
// from https://github.com/eggert/tz/releases/tag/2021d
2626
//
2727
// Zones: 258
2828
// Links: 193
@@ -52,7 +52,7 @@ namespace zonedb {
5252
// ZoneContext (should not be in PROGMEM)
5353
//---------------------------------------------------------------------------
5454

55-
const char kTzDatabaseVersion[] = "2021c";
55+
const char kTzDatabaseVersion[] = "2021d";
5656

5757
const char* const kFragments[] = {
5858
/*\x00*/ nullptr,

0 commit comments

Comments
 (0)