From 638a3566a97d240e743571aa571401ac6af50593 Mon Sep 17 00:00:00 2001 From: ZZ-Cat Date: Sat, 1 Nov 2025 21:36:05 +0000 Subject: [PATCH 1/6] chore: Bump version to `2025.11.2` --- library.json | 2 +- library.properties | 2 +- src/CFA_Config.hpp | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/library.json b/library.json index db369b31..9f43dd62 100644 --- a/library.json +++ b/library.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/platformio/platformio-core/develop/platformio/assets/schema/library.json", "name": "CRSFforArduino", - "version": "2025.10.26", + "version": "2025.11.2", "description": "An Arduino Library for communicating with ExpressLRS and TBS Crossfire receivers.", "keywords": "arduino, remote-control, arduino-library, protocols, rc, radio-control, crsf, expresslrs", "repository": diff --git a/library.properties b/library.properties index c537f54d..9dbccba6 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=CRSFforArduino -version=2025.10.26 +version=2025.11.2 author=Cassandra Robinson maintainer=Cassandra Robinson sentence=CRSF for Arduino brings the Crossfire Protocol to the Arduino ecosystem. diff --git a/src/CFA_Config.hpp b/src/CFA_Config.hpp index ab2a6fea..069799af 100644 --- a/src/CFA_Config.hpp +++ b/src/CFA_Config.hpp @@ -35,11 +35,11 @@ namespace crsfForArduinoConfig Versioning is based on a rolling release model and is backwards-compatible with Semantic Versioning 2.0.0. See https://semver.org/ for more information. */ -#define CRSFFORARDUINO_VERSION "2025.10.26" -#define CRSFFORARDUINO_VERSION_DATE "2025-10-26" +#define CRSFFORARDUINO_VERSION "2025.11.2" +#define CRSFFORARDUINO_VERSION_DATE "2025-11-02" #define CRSFFORARDUINO_VERSION_MAJOR 2025 -#define CRSFFORARDUINO_VERSION_MINOR 10 -#define CRSFFORARDUINO_VERSION_PATCH 26 +#define CRSFFORARDUINO_VERSION_MINOR 11 +#define CRSFFORARDUINO_VERSION_PATCH 2 // This is set to 1 if the version is a pre-release version. #define CRSFFORARDUINO_VERSION_IS_PRERELEASE 0 From 03ea24a59c5add9650fcd38656a898c2ace0d79a Mon Sep 17 00:00:00 2001 From: ZZ-Cat Date: Sat, 1 Nov 2025 22:09:12 +0000 Subject: [PATCH 2/6] refactor(environment): :truck: Outsource development environment to its own configuration file --- src/build/scripts/platformio.ini | 1 + src/build/targets/development.ini | 8 ++++++++ src/build/targets/unified_samd51.ini | 16 ++++++++-------- 3 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 src/build/targets/development.ini diff --git a/src/build/scripts/platformio.ini b/src/build/scripts/platformio.ini index e5d6ac02..b87463e0 100644 --- a/src/build/scripts/platformio.ini +++ b/src/build/scripts/platformio.ini @@ -19,6 +19,7 @@ default_envs = ${build.commonly_used} extra_configs = ../../../src/build/targets/common.ini + ../../../src/build/targets/development.ini ../../../src/build/targets/quality_control.ini ../../../src/build/targets/unified_esp32.ini ../../../src/build/targets/unified_rp2040.ini diff --git a/src/build/targets/development.ini b/src/build/targets/development.ini new file mode 100644 index 00000000..41104ab0 --- /dev/null +++ b/src/build/targets/development.ini @@ -0,0 +1,8 @@ +[env:development] +extends = env_common_samd51 +board = adafruit_metro_m4 +build_unflags = + ${common.build_unflags} +build_flags = + ${common.build_flags_development} +build_type = debug diff --git a/src/build/targets/unified_samd51.ini b/src/build/targets/unified_samd51.ini index 4d49e6cd..9004cc81 100644 --- a/src/build/targets/unified_samd51.ini +++ b/src/build/targets/unified_samd51.ini @@ -1,11 +1,11 @@ -[env:development] -extends = env_common_samd51 -board = adafruit_metro_m4 -build_unflags = - ${common.build_unflags} -build_flags = - ${common.build_flags_development} -build_type = debug +; [env:development] +; extends = env_common_samd51 +; board = adafruit_metro_m4 +; build_unflags = +; ${common.build_unflags} +; build_flags = +; ${common.build_flags_development} +; build_type = debug [env:adafruit_feather_m4] extends = env_common_samd51 From d6f28cf1233ca488fe6d56fd328b0d01ef5e8abd Mon Sep 17 00:00:00 2001 From: ZZ-Cat Date: Sat, 1 Nov 2025 23:32:10 +0000 Subject: [PATCH 3/6] feat(targets): :sparkles: Add ESP32 DOIT DevKit V1 to Compatibility Table --- src/build/targets/unified_esp32.ini | 9 +++++++++ src/hal/CompatibilityTable/CompatibilityTable.cpp | 2 ++ src/hal/CompatibilityTable/CompatibilityTable.hpp | 2 ++ 3 files changed, 13 insertions(+) diff --git a/src/build/targets/unified_esp32.ini b/src/build/targets/unified_esp32.ini index 1d5f9e77..f146dabb 100644 --- a/src/build/targets/unified_esp32.ini +++ b/src/build/targets/unified_esp32.ini @@ -124,6 +124,15 @@ build_flags = ${common.build_flags} build_type = release +[env:esp32doit-devkit-v1] +extends = env_common_esp32 +board = esp32doit-devkit-v1 +build_unflags = + ${common.build_unflags} +build_flags = + ${common.build_flags_development} +build_type = debug + [env:seeed_xiao_esp32c3] extends = env_common_esp32 board = seeed_xiao_esp32c3 diff --git a/src/hal/CompatibilityTable/CompatibilityTable.cpp b/src/hal/CompatibilityTable/CompatibilityTable.cpp index 8a60e2bc..586534de 100644 --- a/src/hal/CompatibilityTable/CompatibilityTable.cpp +++ b/src/hal/CompatibilityTable/CompatibilityTable.cpp @@ -67,6 +67,8 @@ namespace hal device.type.devboard = DEVBOARD_ESPRESSIF_ESP32C3_DEVKIT; #elif defined(ARDUINO_ESP32S3_DEV) device.type.devboard = DEVBOARD_ESPRESSIF_ESP32S3_DEVKIT; +#elif defined(ARDUINO_ESP32_DEV) + device.type.devboard = DEVBOARD_ESPRESSIF_ESP32DOIT_DEVKIT_V1; // Seeed Studio ESP32 devboards. #elif defined(ARDUINO_XIAO_ESP32C3) diff --git a/src/hal/CompatibilityTable/CompatibilityTable.hpp b/src/hal/CompatibilityTable/CompatibilityTable.hpp index 0b206f0c..26a3393d 100644 --- a/src/hal/CompatibilityTable/CompatibilityTable.hpp +++ b/src/hal/CompatibilityTable/CompatibilityTable.hpp @@ -105,6 +105,7 @@ namespace hal // Espressif ESP32 boards. DEVBOARD_ESPRESSIF_ESP32C3_DEVKIT, DEVBOARD_ESPRESSIF_ESP32S3_DEVKIT, + DEVBOARD_ESPRESSIF_ESP32DOIT_DEVKIT_V1, // Raspberry Pi RP2040 boards. DEVBOARD_RASPBERRYPI_PICO, @@ -297,6 +298,7 @@ namespace hal "Arduino Portenta H7 (M4 Core)", "Espressif ESP32-C3 DevKit", "Espressif ESP32-S3 DevKit", + "Espressif ESP32 DOIT DevKit V1", "Raspberry Pi Pico", "Seeed Studio Xiao ESP32-C3", "Seeed Studio Xiao ESP32-S3", From 1301eaefc2cbe4fc1a7423f17ae127dd31b305fa Mon Sep 17 00:00:00 2001 From: ZZ-Cat Date: Sat, 1 Nov 2025 23:33:49 +0000 Subject: [PATCH 4/6] build(environment): Temporarily set development environment to ESP32 DOIT DevKit V1 Once this development board's compatibility has been finalised, this will be reverted back to Adafruit Metro M4. --- src/build/targets/development.ini | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/build/targets/development.ini b/src/build/targets/development.ini index 41104ab0..52361702 100644 --- a/src/build/targets/development.ini +++ b/src/build/targets/development.ini @@ -1,6 +1,8 @@ [env:development] -extends = env_common_samd51 -board = adafruit_metro_m4 +; extends = env_common_samd51 +; board = adafruit_metro_m4 +extends = env_common_esp32 +board = esp32doit-devkit-v1 build_unflags = ${common.build_unflags} build_flags = From 5f1294bc88cb1107fe9bbc8d8031da66b3b3d03a Mon Sep 17 00:00:00 2001 From: ZZ-Cat Date: Wed, 26 Nov 2025 21:01:47 +0000 Subject: [PATCH 5/6] fix(targets): :bug: Undeclared default `Serial1` pins for EPS32 targets The ESP32 board support package does not provide generic `PIN_SERIAL1_RX` and `PIN_SERIAL1_TX` defines. So, these have been added to the Compatibility Table's header for ESP32 targets. This changes the default UART pins for ESP32 targets to where they should be, instead of using potentially non-existent pins 0 and 1. Refer to your development board's documentation for its default UART pinouts. --- src/SerialReceiver/SerialReceiver.cpp | 54 ++++++++++--------- .../CompatibilityTable/CompatibilityTable.hpp | 13 +++++ 2 files changed, 43 insertions(+), 24 deletions(-) diff --git a/src/SerialReceiver/SerialReceiver.cpp b/src/SerialReceiver/SerialReceiver.cpp index 2a279a30..240e7a20 100644 --- a/src/SerialReceiver/SerialReceiver.cpp +++ b/src/SerialReceiver/SerialReceiver.cpp @@ -44,21 +44,24 @@ namespace serialReceiverLayer #elif defined(ARDUINO_ARCH_ESP32) _uart = &Serial1; -#if defined(D0) - _rxPin = D0; -#else - _rxPin = 0; -#endif - -#if defined(D1) - _txPin = D1; -#else - _txPin = 1; -#endif +// #if defined(D0) +// _rxPin = D0; +// #else +// _rxPin = 0; +// #endif + +// #if defined(D1) +// _txPin = D1; +// #else +// _txPin = 1; +// #endif #else _uart = &Serial1; #endif + _rxPin = PIN_SERIAL1_RX; + _txPin = PIN_SERIAL1_TX; + #if CRSF_RC_ENABLED > 0 _rcChannels = new rcChannels_t; _rcChannels->valid = false; @@ -74,19 +77,22 @@ namespace serialReceiverLayer { _uart = hwUartPort; -#if defined(ARDUINO_ARCH_ESP32) - #if defined(D0) - _rxPin = D0; -#else - _rxPin = 0; -#endif - -#if defined(D1) - _txPin = D1; -#else - _txPin = 1; -#endif -#endif +// #if defined(ARDUINO_ARCH_ESP32) +// #if defined(RX) +// _rxPin = RX; +// #else +// _rxPin = 0; +// #endif + +// #if defined(TX) +// _txPin = TX; +// #else +// _txPin = 1; +// #endif +// #endif + + _rxPin = PIN_SERIAL1_RX; + _txPin = PIN_SERIAL1_TX; #if CRSF_RC_ENABLED > 0 _rcChannels = new rcChannels_t; diff --git a/src/hal/CompatibilityTable/CompatibilityTable.hpp b/src/hal/CompatibilityTable/CompatibilityTable.hpp index 26a3393d..248c3f1c 100644 --- a/src/hal/CompatibilityTable/CompatibilityTable.hpp +++ b/src/hal/CompatibilityTable/CompatibilityTable.hpp @@ -24,6 +24,19 @@ #pragma once +/* ESP32 workarounds for non-compliant generic UART definitions. */ +#if defined(ARDUINO_ARCH_ESP32) + +#ifndef PIN_SERIAL1_RX +#define PIN_SERIAL1_RX RX +#endif + +#ifndef PIN_SERIAL1_TX +#define PIN_SERIAL1_TX TX +#endif + +#endif + namespace hal { class CompatibilityTable From c82881b23ffc5ac0087e22a0f5180e48c884fe57 Mon Sep 17 00:00:00 2001 From: ZZ-Cat Date: Wed, 26 Nov 2025 21:29:46 +0000 Subject: [PATCH 6/6] fix(targets): :pencil2: Fix typos in Compatibility Table for default UART pin mapping --- src/hal/CompatibilityTable/CompatibilityTable.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/hal/CompatibilityTable/CompatibilityTable.hpp b/src/hal/CompatibilityTable/CompatibilityTable.hpp index 248c3f1c..544b825a 100644 --- a/src/hal/CompatibilityTable/CompatibilityTable.hpp +++ b/src/hal/CompatibilityTable/CompatibilityTable.hpp @@ -35,6 +35,14 @@ #define PIN_SERIAL1_TX TX #endif +/* Serial1 workarounds for everything else. */ +#else + +#if (defined(PIN_SERIAL_RX) && defined(PIN_SERIAL_TX)) +#define PIN_SERIAL1_RX PIN_SERIAL_RX +#define PIN_SERIAL1_TX PIN_SERIAL_TX +#endif + #endif namespace hal