Releases: bxparks/AceCommon
Releases · bxparks/AceCommon
1.6.2 - add strXxx_T() functions for template programming; fix PrintStr::flush() for ESP32 on PlatformIO
1.6.2 - add strXxx_T() functions for template programming; fix PrintStr::flush() for ESP32 on PlatformIO
Latest
- 1.6.2 (2023-06-25)
- Add
tstrings.h
which adds variousstrxxx_T()
overloaded functions
which take either aconst char*
or aconst __FlashStringHelper*
parameter.- Allows writing C++ template code which is agnostic to whether the
string argument is in normal memory or flash memory. The compiler will
select the specific implementation automatically at compile-time.
- Allows writing C++ template code which is agnostic to whether the
PrintStr.h
- Add special exception for ESP32 on PlatformIO which seems to be
stuck using the ESP32 Core from 1.x, which means that its
Print::flush()
is non-virtual instead of virtual (fixed in v2.0.3). - See PR#28.
- Add special exception for ESP32 on PlatformIO which seems to be
- Add
1.6.1 - add additional KString() constructors, fixing backwards compatible breakage
- 1.6.1 (2023-06-09)
- Fix backwards compatibility breakage in
KString()
constructor.- v1.5.2 supported only:
KString(cstring, cstring)
KString(flash, cstring)
- v1.6.0 changed to support only (in prep for next version of AceTime):
KString(cstring, cstring)
KString(flash, flash)
- which breaks old version of AceTime v2.2.3
- v1.6.1 adds all remaining combinations:
KString(flash, cstring)
KString(cstring, flash)
- Now works for both old and new AceTime versions.
- v1.5.2 supported only:
- Fix backwards compatibility breakage in
1.6.0 - more PROGMEM support in KString; add SAMD21, SAMD51 boards to Tier 1
- 1.6.0 (2023-06-08)
- Add overloaded flash string versions of
copyReplaceChar()
and
copyReplaceString()
which accept__FlashStringHelper*
pointers in the
source string parameters. - Support
keywords[]
in PROGMEM inKString
class. - 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 Core 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
Arduino-Core. - Fortunately most third party SAMD21 and SAMD51 boards continue to
use the traditional Arduino API.
- Add 2 SAMD boards from 2 different companies, to test their
- Move Teensy 3.2 to Tier 2
- 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 ("Should work but not tested
often").
- Add SAMD21 and SAMD51 boards to Tier 1
- Add overloaded flash string versions of
v1.5.2 - mark PrintStr::flush() as override on most platforms; upgrade tool chain
- 1.5.2 (2022-09-22)
- Change
hashDjb2(const char*)
to be an inlined function instead of
simply delegating to the template version.- Increases type-safety because passing an incorrect array (e.g.
uint16_t[]
) would compile without any errors, and probably not what
the user intended since the hash function expects a NUL-terminated
string.
- Increases type-safety because passing an incorrect array (e.g.
- Mark
PrintStr::flush()
asoverride
.- The STM32 and ESP32 platforms have finally fixed their implementation
ofPrint::flush()
to bevirtual
, consistent with other Arduino
platforms. - Make exception for ATTinyCore, which does not implement a
Print::flush()
.
- The STM32 and ESP32 platforms have finally fixed their implementation
- Upgrade tool chain
- Upgrade Arduino CLI from 0.20.2 to 0.27.1.
- Upgrade Arduino AVR Core from 1.8.4 to 1.8.5.
- Upgrade STM32 Core from 2.2.0 to 2.3.0.
- Upgrade ESP32 Core from 2.0.2 to 2.0.5.
- Upgrade Teensyduino from 1.56 to 1.57.
- Change
v1.5.1 - change signature of backslashXEncode() and backslashXDecode() slightly
- 1.5.1 (2022-02-25)
- Breaking Change API of
backslash_x_encoding.h slightly so that the
status
is returned and thewritten
number of bytes is returned through
a pointer to an out-parameter.- Turns out the more common case is to check the status, and
ignore thewritten
, so thewritten
pointer can now benullptr
if the calling code wishes to ignore it. - This is technically a breaking change, but the
backslashXEncode()
andbackslashXDecode()
methods were just added, but I'm going to
consider this to be a "quick fix", and increment only the minor
version number.
- Turns out the more common case is to check the status, and
- Breaking Change API of
v1.5.0 - upgrade tool chain; add backslashXEncode() and backslashXDecode()
- 1.5.0 (2022-02-17)
- Expose
byteToHexChar()
andhexCharToByte()
utility functions from
url_encoding.h
. They became useful inbackslash_x_encoding.h
. - Add backslash_x_encoding.h which provides
backslashXEncode()
that encodes non-printable ASCII characters to\xHH
form andbackslashXDecode()
to decode back. - Upgrade tool chain:
- Upgrade Arduino IDE from 1.8.16 to 1.8.19.
- Upgrade Arduino CLI from 0.19.2 to 0.20.2.
- Upgrade Arduino AVR Core from 1.8.3 to 1.8.4.
- Upgrade STM32 Core from 2.0.0 to 2.2.0.
- Upgrade ESP32 Core from 1.0.6 to 2.0.2.
- Upgrade Teensyduino from 1.55 to 1.56.
- Downgrade SAMD21 boards to new "Tier 3: May work but unsupported" since I
can no longer upload to my SAMD21 boards with the current tool chain.
- Expose
v1.4.7 - add KString::compareTo(const KString&); upgrade tool chain
- 1.4.7 (2021-11-04)
- Add
KString::compareTo(KString&)
using aKStringIterator
- Supports a single level of fragment nesting (i.e. a compression
fragment cannot contain another fragment). - Needed to implement
ZoneSorter
classes in AceTime.
- Supports a single level of fragment nesting (i.e. a compression
- Upgrade tool chain:
- Upgrade Arduino IDE from 1.8.13 to 1.8.16.
- Upgrade Arduino CLI from 0.14.0 to 0.19.2
- Upgrade SparkFun SAMD Core from 1.8.3 to 1.8.5.
- Upgrade ESP8266 Core from 2.7.4 to 3.0.2.
- Upgrade Teensyduino from 1.53 to 1.55.
- Add
v1.4.6 - GenericStats, isReverseSorted(), upgrade STM32duino to 2.0.0, upgrade SparkFun SAMD to 1.8.3
- 1.4.6 (2021-08-05)
- Upgrade STM32duino Core from 1.9.0 to 2.0.0.
- MemoryBenchmark: Flash usage increases by 2.3kB across the board, but
static RAM goes down by 250 bytes. Very little change to AceCommon
code itself. - AutoBenchmark: No change.
- MemoryBenchmark: Flash usage increases by 2.3kB across the board, but
- Upgrade SparkFun SAMD Core from 1.8.1 to 1.8.3.
- No change observed in MemoryBenchmark or AutoBenchmark.
- Add
print_utils/PrintIntAsFloat.h
withprintUint16AsFloat3To()
and
printUint32AsFloat3To()
.- Divides the provided value by 1000, then prints the result as a
floating point number to 3 decimal places. - Does not use floating point operations to be friendly on 8-bit
processors.
- Divides the provided value by 1000, then prints the result as a
- Add
GenericStats<T>
, a templatized version ofTimingStats
. - Update
MemoryBenchmark
- Add memory usage for
String
, to provide a better comparison for
PrintStr<N>
andPrintStrN
. String
consumes about 1000 more flash bytes compared toPrintStr
.PrintStrN
consumes about 600 more flash bytes compared toPrintStr
because it pulls inmalloc()
andfree().
- Add memory usage for
isSorted()
.
- Add memory usage for
- Add
isReverseSorted()
andisReversedSortedByKey()
. Analogous to
isSorted()
andisSortedByKey()
.
- Upgrade STM32duino Core from 1.9.0 to 2.0.0.
v1.4.5 - optimize decToHex() for specific platforms; add PrintStr::cstr() alternative for getCstr()
- 1.4.5 (2021-04-26)
- Create more generic
examples/AutoBenchmark
program which replaces
examples/Udiv1000
. - Activate
GitHub Discussions. - Add
decToHexDivOnly()
anddecToHexDivMod()
to AutoBenchmark, and
updatedecToHex()
to automatically select the faster one. On AVR,
decToHexDivMod()
seems to be 2 clock cycles (125 ns) faster. But on
32-bit processors,decToHexDivOnly()
is 2X faster on those without
hardware divide (e.g. SAMD21, ESP8266), and 10-20% faster on processors
with hardware divide (e.g. STM32, ESP32, Teensy 3.2). - Prevent overflow of
uint16_t
when calculating exponential decay average. - Add
PrintStrBase::cstr()
as a shorter, more convenient version of
PrintStrBase::getCstr()
. RetaingetCstr()
for backwards compatibility. - Upgrade to ESP32 Core v1.0.6 and regenerate MemoryBenchmark and
AutoBenchmark.
- Create more generic
v1.4.4 - add copyReplaceXxx(), printReplaceXxxTo(), FlashString class
- 1.4.4
- Add
copyReplaceChar()
andcopyReplaceString()
functions. Extracted
from AceTime library. - Add
printReplaceCharTo()
andprintReplaceStringTo()
functions. - Add examples/MemoryBenchmark to track the
flash sizes of various components within this library. - Add
FlashString
class which is a very thin-wrapper around a
const __FlashStringHelper*
pointer, to make it look and act like a
normalconst char*
pointer.- Solves code duplication problem when writing functions that need to
support both c-strings and f-strings. - First write the function against a generic
T
type that is
assumed to be a type that acts like aconst char*
. Use this for a
c-string. - Second write a template specialization that takes a
const __FlashStringHelper*
, wraps the pointer into aFlashString
,
and then forwards the call to the generic template function.
- Solves code duplication problem when writing functions that need to
- Add