Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
9 changes: 6 additions & 3 deletions src/fas_ramp/RampControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Loading