Skip to content

Releases: Pharap/FixedPointsArduino

Fix bug in SFixed conversion operator

12 Jan 09:36
149c812
Compare
Choose a tag to compare

What's Changed

  • Fix SFixed conversion by making ShiftType signed by @Pharap in #100

Full Changelog: v1.1.1...v1.1.2

Fix a bug in floating point conversion.

25 Sep 09:42
b61dd1a
Compare
Choose a tag to compare

This release consists of just a single bug-fix: fixing conversion to float (and double) for certain types.

First minor release

07 Apr 03:38
e5103ac
Compare
Choose a tag to compare

Technically some of the earlier patch releases should have been minor releases, but I wasn't expecting this library to get as popular as it has done. I'm now aiming to stick to semver as much as possible.

This release contains several new features and one bugfix.

Features include:

  • Operators for converting between SFixed and UFixed types.
    • This change was long overdue, but I am satisfied that the chosen implementation is better than what I might have come up with a few years ago.
  • Integer conversion operators
    • Ooperators for converting to all of the built-in integer types (char, short, int, long, long long and all signed and unsigned variations thereupon).
    • These are all explicit operators because conversion from fixed point to integer is an inherantly narrowing operation.
  • Postincrement and postdecrement operators.
    • They are provided for completeness, though I would advise against using them.
  • Bitwise shift operators.
    • These have been added purely to facilitate cheaper and faster multiplication and division by powers of two. Personally I'm not a fan of using bitshift operators for this purpose because I believe it harms readability, but since it's unlikely that a compiler would be able to perform such an optimisation on a user-defined type and I expect most users of this library are targetting microcontrollers, I've decided that the potential memory savings are worth the harmed readability.

Bugfixes include:

  • ++ and -- would cause a shift overflow for larger types because a lone 1 was being treated as int instead of a suitably large type. This was more of a problem for AVR CPUs, where int is only 16 bits wide.

Fix the random number issue for non-AVR targets

25 Mar 04:17
00ce47f
Compare
Choose a tag to compare

Most of the changes in this release are non-eventful behind the scenes stuff.

The biggest change is that now random number support is disabled for all non-AVR targets instead of being conditionally disabled for particular targets.
I.e. it is now assumed that a non-AVR target does not support random() and thus random number facilities are not provided.


Random numbers may be provided for non-AVR targets in a future version, but for now they are off the table until more pressing issues have been handled. (That is, unless a particular need for them arises.)

Fix roundFixed, incorrect constant definitions and missing type conversion

02 Jun 13:01
299199c
Compare
Choose a tag to compare

Public API:

  • Fixed unintended bug in roundFixed introduced in v1.0.5 (i.e. only v1.0.5 and v1.0.6 have this bug)
  • Fixed the definition of UFixed::Scale and SFixed::Scale
  • Fixed an inconsistency with the typing of SFixed's constants compared to UFixed
  • Added long double conversion operator (this is classed as a bugfix because its absense was an oversight)

Internal:

  • Updated licence year
  • Updated licence text
  • Removed superfluous constructors
  • Reorganised member constants and member type aliases
  • Removed UFixedBase and SFixedBase*

* This is a non-breaking change because UFixedBase and SFixedBase are not part of the public API. If this breaks your code, please re-read 'Important.txt'.

Added Teensy Support

20 Mar 23:34
c3994a0
Compare
Choose a tag to compare
  • Added support for Teensy on request of @barafael.
  • Added better error messages for unsuitable multiplication operations on request of @nunovilhena.
  • Added an FAQ mentioning the multiplication issue to README.md.
  • Added a project showcase to README.md.
  • Removed inferred literal types.

Special thanks to @barafael for testing the Teensy support.

Added Arduino Due support

24 Feb 03:29
a2660d2
Compare
Choose a tag to compare
  • Added support for Arduino Due on request of @coolpluggy. (Should work for other SAM boards.)
  • Added Serial.begin(9600); to examples/FixedPointCalculations.
  • Simplified the definitions of roundFixed, which should reduce the generated code size.

Special thanks to @adekto for testing the Arduino Due support.

Added ESP8266 support

30 Nov 15:44
bd84a2c
Compare
Choose a tag to compare
  • Added support for ESP8266 on request of @marciopamplona.
  • Added FIXED_POINTS_NO_RANDOM option to disable random number functions.
  • Added workaround for gcc bug 58541.

Special thanks to @eried for testing the ESP8266 support.

Added licence header to all relevant files

08 Nov 04:59
dc41816
Compare
Choose a tag to compare

This update is mostly cosmetic and partly to make licencing clearer.
Now all relevant source files will have the Apache 2.0 licence header at the top.

Added PlatformIO support

17 Oct 07:16
Compare
Choose a tag to compare

Added support for PlatformIO on request of @yinkou (a.k.a. Botisaurus).