diff --git a/CHANGELOG.md b/CHANGELOG.md index ff2863af..cfa12536 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +Unreleased: +- fix: RampControl.cpp declared the log2 timer-frequency variables `static`, conflicting with their `extern` declaration in RampGenerator.h. That combination is ill-formed C++ (a static redeclaration cannot follow a non-static/extern one in the same translation unit) and breaks the build for any platform whose TICKS_PER_S isn't exactly 16000000 or 21000000 - e.g. an AVR board not running at 16/21 MHz - the moment SUPPORT_LOG2_TIMER_FREQ_VARIABLES is exercised + 1.3.3: - moveTimed(0, duration): pause uses last direction XOR prepare_revert (default false does not toggle DIR; true pauses in the opposite direction) diff --git a/src/fas_ramp/RampControl.cpp b/src/fas_ramp/RampControl.cpp index 800c4fb9..47afc952 100644 --- a/src/fas_ramp/RampControl.cpp +++ b/src/fas_ramp/RampControl.cpp @@ -7,9 +7,12 @@ #include "fas_arch/common.h" #ifdef SUPPORT_LOG2_TIMER_FREQ_VARIABLES -static log2_value_t log2_timer_freq; -static log2_value_t log2_timer_freq_div_sqrt_of_2; -static log2_value_t log2_timer_freq_square_div_2; +// Definitions for the `extern` declarations in RampGenerator.h. Must have +// external linkage (no `static`): RampGenerator.cpp, a separate translation +// unit, also uses these via the LOG2_TICKS_PER_S* macros in RampCalculator.h. +log2_value_t log2_timer_freq; +log2_value_t log2_timer_freq_div_sqrt_of_2; +log2_value_t log2_timer_freq_square_div_2; #endif void ramp_rw_s::init() {