File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1206
1206
#define INPUT_SHAPING_Y
1207
1207
#if ANY (INPUT_SHAPING_X , INPUT_SHAPING_Y )
1208
1208
#if ENABLED (INPUT_SHAPING_X )
1209
- #define SHAPING_FREQ_X 40 // (Hz) The default dominant resonant frequency on the X axis.
1210
- #define SHAPING_ZETA_X 0.15f // Damping ratio of the X axis (range: 0.0 = no damping to 1.0 = critical damping).
1209
+ #define SHAPING_FREQ_X 40.0 // (Hz) The default dominant resonant frequency on the X axis.
1210
+ #define SHAPING_ZETA_X 0.15 // Damping ratio of the X axis (range: 0.0 = no damping to 1.0 = critical damping).
1211
1211
#endif
1212
1212
#if ENABLED (INPUT_SHAPING_Y )
1213
- #define SHAPING_FREQ_Y 40 // (Hz) The default dominant resonant frequency on the Y axis.
1214
- #define SHAPING_ZETA_Y 0.15f // Damping ratio of the Y axis (range: 0.0 = no damping to 1.0 = critical damping).
1213
+ #define SHAPING_FREQ_Y 40.0 // (Hz) The default dominant resonant frequency on the Y axis.
1214
+ #define SHAPING_ZETA_Y 0.15 // Damping ratio of the Y axis (range: 0.0 = no damping to 1.0 = critical damping).
1215
1215
#endif
1216
- //#define SHAPING_MIN_FREQ 20 // By default the minimum of the shaping frequencies. Override to affect SRAM usage.
1216
+ //#define SHAPING_MIN_FREQ 20.0 // (Hz) By default the minimum of the shaping frequencies. Override to affect SRAM usage.
1217
1217
//#define SHAPING_MAX_STEPRATE 10000 // By default the maximum total step rate of the shaped axes. Override to affect SRAM usage.
1218
1218
// #define SHAPING_MENU // Add a menu to the LCD to set shaping parameters.
1219
1219
#endif
Original file line number Diff line number Diff line change @@ -159,10 +159,10 @@ constexpr ena_mask_t enable_overlap[] = {
159
159
#endif
160
160
161
161
#ifndef SHAPING_MIN_FREQ
162
- #define SHAPING_MIN_FREQ _MIN (0x7FFFFFFFL OPTARG (INPUT_SHAPING_X, SHAPING_FREQ_X) OPTARG(INPUT_SHAPING_Y, SHAPING_FREQ_Y))
162
+ #define SHAPING_MIN_FREQ _MIN (__FLT_MAX__ OPTARG (INPUT_SHAPING_X, SHAPING_FREQ_X) OPTARG(INPUT_SHAPING_Y, SHAPING_FREQ_Y))
163
163
#endif
164
- constexpr uint16_t shaping_min_freq = SHAPING_MIN_FREQ,
165
- shaping_echoes = max_step_rate / shaping_min_freq / 2 + 3 ;
164
+ constexpr float shaping_min_freq = SHAPING_MIN_FREQ;
165
+ constexpr uint16_t shaping_echoes = FLOOR( max_step_rate / shaping_min_freq / 2 ) + 3;
166
166
167
167
typedef hal_timer_t shaping_time_t ;
168
168
enum shaping_echo_t { ECHO_NONE = 0 , ECHO_FWD = 1 , ECHO_BWD = 2 };
You can’t perform that action at this time.
0 commit comments