Skip to content

Commit c6d717d

Browse files
committed
Merge branch 'bugfix-2.1.x' into pr/25327
2 parents 4b4c16c + 2f987ac commit c6d717d

File tree

114 files changed

+542
-539
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+542
-539
lines changed

Marlin/src/HAL/AVR/fastio.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ uint8_t extDigitalRead(const int8_t pin) {
241241
*
242242
* DC values -1.0 to 1.0. Negative duty cycle inverts the pulse.
243243
*/
244-
uint16_t set_pwm_frequency_hz(const_float_t hz, const float dca, const float dcb, const float dcc) {
244+
uint16_t set_pwm_frequency_hz(const float hz, const float dca, const float dcb, const float dcc) {
245245
float count = 0;
246246
if (hz > 0 && (dca || dcb || dcc)) {
247247
count = float(F_CPU) / hz; // 1x prescaler, TOP for 16MHz base freq.

Marlin/src/core/serial.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ void SERIAL_WARN_START() { SERIAL_ECHO(F("Warning:")); }
9999

100100
void SERIAL_ECHO_SP(uint8_t count) { count *= (PROPORTIONAL_FONT_RATIO); while (count--) SERIAL_CHAR(' '); }
101101

102-
void serial_offset(const_float_t v, const uint8_t sp/*=0*/) {
102+
void serial_offset(const float v, const uint8_t sp/*=0*/) {
103103
if (v == 0 && sp == 1)
104104
SERIAL_CHAR(' ');
105105
else if (v > 0 || (v == 0 && sp == 2))
@@ -121,7 +121,7 @@ void print_bin(uint16_t val) {
121121
}
122122
}
123123

124-
void _print_xyz(NUM_AXIS_ARGS_(const_float_t) FSTR_P const prefix) {
124+
void _print_xyz(NUM_AXIS_ARGS_(const float) FSTR_P const prefix) {
125125
if (prefix) SERIAL_ECHO(prefix);
126126
#if NUM_AXES
127127
SERIAL_ECHOPGM_P(NUM_AXIS_PAIRED_LIST(
@@ -132,12 +132,12 @@ void _print_xyz(NUM_AXIS_ARGS_(const_float_t) FSTR_P const prefix) {
132132
#endif
133133
}
134134

135-
void print_xyz(NUM_AXIS_ARGS_(const_float_t) FSTR_P const prefix/*=nullptr*/, FSTR_P const suffix/*=nullptr*/) {
135+
void print_xyz(NUM_AXIS_ARGS_(const float) FSTR_P const prefix/*=nullptr*/, FSTR_P const suffix/*=nullptr*/) {
136136
_print_xyz(NUM_AXIS_LIST_(x, y, z, i, j, k, u, v, w) prefix);
137137
if (suffix) SERIAL_ECHO(suffix); else SERIAL_EOL();
138138
}
139139

140-
void print_xyze(LOGICAL_AXIS_ARGS_(const_float_t) FSTR_P const prefix/*=nullptr*/, FSTR_P const suffix/*=nullptr*/) {
140+
void print_xyze(LOGICAL_AXIS_ARGS_(const float) FSTR_P const prefix/*=nullptr*/, FSTR_P const suffix/*=nullptr*/) {
141141
_print_xyz(NUM_AXIS_LIST_(x, y, z, i, j, k, u, v, w) prefix);
142142
#if HAS_EXTRUDERS
143143
SERIAL_ECHOPGM_P(SP_E_STR, e);

Marlin/src/core/serial.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,16 +236,16 @@ void SERIAL_ECHO_SP(uint8_t count);
236236
inline FSTR_P const ON_OFF(const bool onoff) { return onoff ? F("ON") : F("OFF"); }
237237
inline FSTR_P const TRUE_FALSE(const bool tf) { return tf ? F("true") : F("false"); }
238238

239-
void serial_offset(const_float_t v, const uint8_t sp=0); // For v==0 draw space (sp==1) or plus (sp==2)
239+
void serial_offset(const float v, const uint8_t sp=0); // For v==0 draw space (sp==1) or plus (sp==2)
240240

241241
void print_bin(const uint16_t val);
242242

243-
void print_xyz(NUM_AXIS_ARGS_(const_float_t) FSTR_P const prefix=nullptr, FSTR_P const suffix=nullptr);
243+
void print_xyz(NUM_AXIS_ARGS_(const float) FSTR_P const prefix=nullptr, FSTR_P const suffix=nullptr);
244244
inline void print_xyz(const xyz_pos_t &xyz, FSTR_P const prefix=nullptr, FSTR_P const suffix=nullptr) {
245245
print_xyz(NUM_AXIS_ELEM_(xyz) prefix, suffix);
246246
}
247247

248-
void print_xyze(LOGICAL_AXIS_ARGS_(const_float_t) FSTR_P const prefix=nullptr, FSTR_P const suffix=nullptr);
248+
void print_xyze(LOGICAL_AXIS_ARGS_(const float) FSTR_P const prefix=nullptr, FSTR_P const suffix=nullptr);
249249
inline void print_xyze(const xyze_pos_t &xyze, FSTR_P const prefix=nullptr, FSTR_P const suffix=nullptr) {
250250
print_xyze(LOGICAL_AXIS_ELEM_LC_(xyze) prefix, suffix);
251251
}

Marlin/src/core/types.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -363,17 +363,6 @@ typedef uint16_t raw_adc_t;
363363
typedef int16_t celsius_t;
364364
typedef float celsius_float_t;
365365

366-
//
367-
// On AVR pointers are only 2 bytes so use 'const float &' for 'const float'
368-
//
369-
#ifdef __AVR__
370-
typedef const float & const_float_t;
371-
#else
372-
typedef const float const_float_t;
373-
#endif
374-
typedef const_float_t const_feedRate_t;
375-
typedef const_float_t const_celsius_float_t;
376-
377366
// Type large enough to count leveling grid points
378367
typedef IF<TERN0(ABL_USES_GRID, (GRID_MAX_POINTS > 255)), uint16_t, uint8_t>::type grid_count_t;
379368

Marlin/src/feature/babystep.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ void Babystep::step_axis(const AxisEnum axis) {
5454
}
5555
}
5656

57-
void Babystep::add_mm(const AxisEnum axis, const_float_t mm) {
57+
void Babystep::add_mm(const AxisEnum axis, const float mm) {
5858
add_steps(axis, mm * planner.settings.axis_steps_per_mm[axis]);
5959
}
6060

6161
#if ENABLED(BD_SENSOR)
62-
void Babystep::set_mm(const AxisEnum axis, const_float_t mm) {
62+
void Babystep::set_mm(const AxisEnum axis, const float mm) {
6363
//if (DISABLED(BABYSTEP_WITHOUT_HOMING) && axis_should_home(axis)) return;
6464
const int16_t distance = mm * planner.settings.axis_steps_per_mm[axis];
6565
accum = distance; // Count up babysteps for the UI

Marlin/src/feature/babystep.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class Babystep {
6161

6262
static bool can_babystep(const AxisEnum axis);
6363
static void add_steps(const AxisEnum axis, const int16_t distance);
64-
static void add_mm(const AxisEnum axis, const_float_t mm);
64+
static void add_mm(const AxisEnum axis, const float mm);
6565

6666
#if ENABLED(EP_BABYSTEPPING)
6767
// Step Z for M293 / M294
@@ -79,7 +79,7 @@ class Babystep {
7979
#endif // EP_BABYSTEPPING
8080

8181
#if ENABLED(BD_SENSOR)
82-
static void set_mm(const AxisEnum axis, const_float_t mm);
82+
static void set_mm(const AxisEnum axis, const float mm);
8383
#endif
8484

8585
static bool has_steps() {

Marlin/src/feature/backlash.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ class Backlash {
8181
static void set_correction(const float v) { set_correction_uint8(_MAX(0, _MIN(1.0, v)) * all_on + 0.5f); }
8282
static float get_correction() { return float(get_correction_uint8()) / all_on; }
8383
static void set_distance_mm(const AxisEnum axis, const float v);
84-
static float get_distance_mm(const AxisEnum axis) {return distance_mm[axis];}
84+
static float get_distance_mm(const AxisEnum axis) { return distance_mm[axis]; }
8585
#ifdef BACKLASH_SMOOTHING_MM
8686
static void set_smoothing_mm(const float v);
87-
static float get_smoothing_mm() {return smoothing_mm;}
87+
static float get_smoothing_mm() { return smoothing_mm; }
8888
#endif
8989
#endif
9090

Marlin/src/feature/bedlevel/abl/bbl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ void LevelingBilinear::print_leveling_grid(const bed_mesh_t* _z_values/*=nullptr
229229
) * 0.5f;
230230
}
231231

232-
float LevelingBilinear::virt_2cmr(const uint8_t x, const uint8_t y, const_float_t tx, const_float_t ty) {
232+
float LevelingBilinear::virt_2cmr(const uint8_t x, const uint8_t y, const float tx, const float ty) {
233233
float row[4], column[4];
234234
for (uint8_t i = 0; i < 4; ++i) {
235235
for (uint8_t j = 0; j < 4; ++j) {
@@ -369,7 +369,7 @@ float LevelingBilinear::get_z_correction(const xy_pos_t &raw) {
369369
* Prepare a bilinear-leveled linear move on Cartesian,
370370
* splitting the move where it crosses grid borders.
371371
*/
372-
void LevelingBilinear::line_to_destination(const_feedRate_t scaled_fr_mm_s, uint16_t x_splits, uint16_t y_splits) {
372+
void LevelingBilinear::line_to_destination(const feedRate_t scaled_fr_mm_s, uint16_t x_splits, uint16_t y_splits) {
373373
// Get current and destination cells for this line
374374
xy_int_t c1 { CELL_INDEX(x, current_position.x), CELL_INDEX(y, current_position.y) },
375375
c2 { CELL_INDEX(x, destination.x), CELL_INDEX(y, destination.y) };

Marlin/src/feature/bedlevel/abl/bbl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class LevelingBilinear {
4545

4646
static float virt_coord(const uint8_t x, const uint8_t y);
4747
static float virt_cmr(const float p[4], const uint8_t i, const float t);
48-
static float virt_2cmr(const uint8_t x, const uint8_t y, const_float_t tx, const_float_t ty);
48+
static float virt_2cmr(const uint8_t x, const uint8_t y, const float tx, const float ty);
4949
static void subdivide_mesh();
5050
#endif
5151

@@ -63,7 +63,7 @@ class LevelingBilinear {
6363
static constexpr float get_z_offset() { return 0.0f; }
6464

6565
#if IS_CARTESIAN && DISABLED(SEGMENT_LEVELED_MOVES)
66-
static void line_to_destination(const_feedRate_t scaled_fr_mm_s, uint16_t x_splits=0xFFFF, uint16_t y_splits=0xFFFF);
66+
static void line_to_destination(const feedRate_t scaled_fr_mm_s, uint16_t x_splits=0xFFFF, uint16_t y_splits=0xFFFF);
6767
#endif
6868
};
6969

Marlin/src/feature/bedlevel/bedlevel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ TemporaryBedLevelingState::TemporaryBedLevelingState(const bool enable) : saved(
9191

9292
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
9393

94-
void set_z_fade_height(const_float_t zfh, const bool do_report/*=true*/) {
94+
void set_z_fade_height(const float zfh, const bool do_report/*=true*/) {
9595

9696
if (planner.z_fade_height == zfh) return;
9797

0 commit comments

Comments
 (0)