From 9ded7e0483a1b9090ddcbe0906cf12ebcac33d0a Mon Sep 17 00:00:00 2001 From: gab-k Date: Thu, 18 Dec 2025 21:06:53 +0100 Subject: [PATCH] Add Decoder ID defines inside board header files --- Software/CV.h | 2 +- Software/RP2040-Decoder-board-Legacy.h | 3 +++ Software/RP2040-Decoder-board-USB.h | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Software/CV.h b/Software/CV.h index 61c84db..28b96f7 100644 --- a/Software/CV.h +++ b/Software/CV.h @@ -131,7 +131,7 @@ uint8_t CV_ARRAY_DEFAULT [CV_ARRAY_SIZE] = { 0b00000000, //CV_106 - user data 0b00000001, //CV_107 - MSB Manufacturer ID for DIY https://www.decoderdb.com/database/decoderdb-list 0b00001011, //CV_108 - LSB Manufacturer ID - 0b00000000, //CV_109 - decoder id + DECODER_ID, //CV_109 - Decoder ID defined by board .h file (e.g. RP2040-Decoder-board-USB.h) 0b00000000, //CV_110 - 0b00000000, //CV_111 - ///// PWM - Configuration ////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/Software/RP2040-Decoder-board-Legacy.h b/Software/RP2040-Decoder-board-Legacy.h index a0ac9fe..07a7b13 100644 --- a/Software/RP2040-Decoder-board-Legacy.h +++ b/Software/RP2040-Decoder-board-Legacy.h @@ -20,6 +20,9 @@ // For board detection #define RP2040_DECODER +// Decoder ID (CV_109) +#define DECODER_ID 1 + // In case the xosc takes longer to stabilize than usual #ifndef PICO_XOSC_STARTUP_DELAY_MULTIPLIER #define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 diff --git a/Software/RP2040-Decoder-board-USB.h b/Software/RP2040-Decoder-board-USB.h index f7f4ea7..71500fc 100644 --- a/Software/RP2040-Decoder-board-USB.h +++ b/Software/RP2040-Decoder-board-USB.h @@ -19,6 +19,9 @@ // For board detection #define RP2040_DECODER +// Decoder ID (CV_109) +#define DECODER_ID 2 + // In case the xosc takes longer to stabilize than usual #ifndef PICO_XOSC_STARTUP_DELAY_MULTIPLIER #define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64