From d4f0a7c8f35da240412a671514e45cd40866836a Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Sun, 31 Dec 2023 13:18:28 +0100 Subject: [PATCH] DC frequency uno does not have timers anyway step #5 --- DCC.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/DCC.cpp b/DCC.cpp index d857cb8..ea6e910 100644 --- a/DCC.cpp +++ b/DCC.cpp @@ -155,12 +155,17 @@ uint8_t DCC::getThrottleSpeedByte(int cab) { // returns 0 to 3 for frequency uint8_t DCC::getThrottleFrequency(int cab) { +#if defined(ARDUINO_AVR_UNO) + (void)cab; + return 0; +#else int reg=lookupSpeedTable(cab); if (reg<0) return 0; // use default frequency uint8_t res = (uint8_t)(speedTable[reg].functions >>30); DIAG(F("Speed table %d functions %l shifted %d"), reg, speedTable[reg].functions, res); return res; // shift out first 29 bits so we have the "frequency bits" left +#endif } // returns direction on loco