Skip to content

Releases: bxparks/AceCommon

1.6.2 - add strXxx_T() functions for template programming; fix PrintStr::flush() for ESP32 on PlatformIO

25 Jun 18:51
8698645
Compare
Choose a tag to compare
  • 1.6.2 (2023-06-25)
    • Add tstrings.h which adds various strxxx_T() overloaded functions
      which take either a const char* or a const __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.
    • 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.

1.6.1 - add additional KString() constructors, fixing backwards compatible breakage

09 Jun 16:28
8bcf295
Compare
Choose a tag to compare
  • 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.

1.6.0 - more PROGMEM support in KString; add SAMD21, SAMD51 boards to Tier 1

08 Jun 14:14
7169306
Compare
Choose a tag to compare
  • 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 in KString 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.
      • 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").

v1.5.2 - mark PrintStr::flush() as override on most platforms; upgrade tool chain

22 Sep 17:35
ceac97b
Compare
Choose a tag to compare
  • 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.
    • Mark PrintStr::flush() as override.
      • The STM32 and ESP32 platforms have finally fixed their implementation
        of Print::flush() to be virtual, consistent with other Arduino
        platforms.
      • Make exception for ATTinyCore, which does not implement a
        Print::flush().
    • 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.

v1.5.1 - change signature of backslashXEncode() and backslashXDecode() slightly

25 Feb 23:43
3c1e5bc
Compare
Choose a tag to compare
  • 1.5.1 (2022-02-25)
    • Breaking Change API of
      backslash_x_encoding.h slightly so that the
      status is returned and the written 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 the written, so the written pointer can now be nullptr
        if the calling code wishes to ignore it.
      • This is technically a breaking change, but the backslashXEncode()
        and backslashXDecode() methods were just added, but I'm going to
        consider this to be a "quick fix", and increment only the minor
        version number.

v1.5.0 - upgrade tool chain; add backslashXEncode() and backslashXDecode()

17 Feb 22:15
28e08b5
Compare
Choose a tag to compare
  • 1.5.0 (2022-02-17)
    • Expose byteToHexChar() and hexCharToByte() utility functions from
      url_encoding.h. They became useful in backslash_x_encoding.h.
    • Add backslash_x_encoding.h which provides
      backslashXEncode() that encodes non-printable ASCII characters to \xHH
      form and backslashXDecode() 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.

v1.4.7 - add KString::compareTo(const KString&); upgrade tool chain

04 Nov 23:47
e4ced3d
Compare
Choose a tag to compare
  • 1.4.7 (2021-11-04)
    • Add KString::compareTo(KString&) using a KStringIterator
      • Supports a single level of fragment nesting (i.e. a compression
        fragment cannot contain another fragment).
      • Needed to implement ZoneSorter classes in AceTime.
    • 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.

v1.4.6 - GenericStats, isReverseSorted(), upgrade STM32duino to 2.0.0, upgrade SparkFun SAMD to 1.8.3

05 Aug 21:16
94d8f28
Compare
Choose a tag to compare
  • 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.
    • Upgrade SparkFun SAMD Core from 1.8.1 to 1.8.3.
      • No change observed in MemoryBenchmark or AutoBenchmark.
    • Add print_utils/PrintIntAsFloat.h with printUint16AsFloat3To() 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.
    • Add GenericStats<T>, a templatized version of TimingStats.
    • Update MemoryBenchmark
      • Add memory usage for String, to provide a better comparison for
        PrintStr<N> and PrintStrN.
      • String consumes about 1000 more flash bytes compared to PrintStr.
      • PrintStrN consumes about 600 more flash bytes compared to PrintStr
        because it pulls in malloc() and free().
      • Add memory usage for isSorted().
    • Add isReverseSorted() and isReversedSortedByKey(). Analogous to
      isSorted() and isSortedByKey().

v1.4.5 - optimize decToHex() for specific platforms; add PrintStr::cstr() alternative for getCstr()

26 Apr 16:09
bbdb89d
Compare
Choose a tag to compare
  • 1.4.5 (2021-04-26)
    • Create more generic examples/AutoBenchmark program which replaces
      examples/Udiv1000.
    • Activate
      GitHub Discussions.
    • Add decToHexDivOnly() and decToHexDivMod() to AutoBenchmark, and
      update decToHex() 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(). Retain getCstr() for backwards compatibility.
    • Upgrade to ESP32 Core v1.0.6 and regenerate MemoryBenchmark and
      AutoBenchmark.

v1.4.4 - add copyReplaceXxx(), printReplaceXxxTo(), FlashString class

02 Apr 20:13
44214b5
Compare
Choose a tag to compare
  • 1.4.4
    • Add copyReplaceChar() and copyReplaceString() functions. Extracted
      from AceTime library.
    • Add printReplaceCharTo() and printReplaceStringTo() 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
      normal const 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 a const char*. Use this for a
        c-string.
      • Second write a template specialization that takes a const __FlashStringHelper*, wraps the pointer into a FlashString,
        and then forwards the call to the generic template function.