From a02f1e880fafb21b44331b5f996e79ddaa794a61 Mon Sep 17 00:00:00 2001 From: tomcombriat Date: Wed, 16 Apr 2025 11:41:27 +0200 Subject: [PATCH 1/3] Fixed static tests for SAMD and ESP8266 --- src/FixMath_Autotests.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FixMath_Autotests.h b/src/FixMath_Autotests.h index 05fb43a..38224a1 100644 --- a/src/FixMath_Autotests.h +++ b/src/FixMath_Autotests.h @@ -8,11 +8,11 @@ * */ -#if (defined(__GNUC__) && (__GNUC__ < 10)) || (__cplusplus >= 202002L) +#if (defined(__GNUC__) && (__GNUC__ < 12) && !defined(ESP8266)) && !defined(ARDUINO_ARCH_SAMD) || (__cplusplus >= 202002L) // Bit-shifting negative number has not been formally defined behavior before C++ 2020, but rather technically "implementation defined". It thus // could not be used in constexpr statements (although working quite fine, at runtime). // At the time of this writing (07/2024), we do not have a c++ 2020 compiler running in our automated test workflow. However, older versions of GCC -// are less pedantic, and will regard at least the case of shift by 0 bits (-1 << 0) as defined. We leverage this fact to compile as many checks as possible. +// are less pedantic, at least on some platforms (not ESP8266 and SAMD apparently), and will regard at least the case of shift by 0 bits (-1 << 0) as defined. We leverage this fact to compile as many checks as possible. #define SHIFT_NEGATIVE_BY_ZERO_DEFINED 1 #else #define SHIFT_NEGATIVE_BY_ZERO_DEFINED 0 From 18ae17ce34252912052b3e8aee915e8ee440561c Mon Sep 17 00:00:00 2001 From: tomcombriat Date: Wed, 16 Apr 2025 11:43:42 +0200 Subject: [PATCH 2/3] Added more platforms for autotests --- .github/workflows/compile_examples.yml | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/compile_examples.yml b/.github/workflows/compile_examples.yml index c7e4d04..6f59a78 100644 --- a/.github/workflows/compile_examples.yml +++ b/.github/workflows/compile_examples.yml @@ -63,6 +63,36 @@ jobs: - name: STMicroelectronics:stm32 source-url: https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json internalid: stm32_official + - fqbn: esp8266:esp8266:huzzah + type: 8266 + platforms: | + - name: esp8266:esp8266 + source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json + internalid: esp8266 + - fqbn: arduino:mbed_giga:giga + platforms: | + - name: arduino:mbed_giga + internalid: arduino_giga + - fqbn: rp2040:rp2040:rpipico + type: rp2040 + platforms: | + - name: rp2040:rp2040 + source-url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json + internalid: rp2040 + - fqbn: arduino:renesas_uno:minima + platforms: | + - name: arduino:renesas_uno + internalid: arduino_unor4 + - fqbn: teensy:avr:teensy36 + platforms: | + - name: teensy:avr + source-url: https://www.pjrc.com/teensy/package_teensy_index.json + internalid: teensy36 + - fqbn: teensy:avr:teensy41 + platforms: | + - name: teensy:avr + source-url: https://www.pjrc.com/teensy/package_teensy_index.json + internalid: teensy41 steps: - name: Checkout repository From 00b290bab65b71b32f0f028a8de695eb695e53c2 Mon Sep 17 00:00:00 2001 From: tomcombriat Date: Wed, 16 Apr 2025 11:44:06 +0200 Subject: [PATCH 3/3] Increased version number --- library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.properties b/library.properties index 32bef5b..c74c011 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=FixMath -version=1.0.8 +version=1.0.9 author=Thomas Combriat and Thomas Friedrichsmeier maintainer=Thomas Combriat sentence=Fixed Point Arithmetics for Arduino and others