Add a feedRate_t data type (#15349)
This commit is contained in:
@ -43,7 +43,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef PHOTO_RETRACT_MM
|
||||
inline void e_move_m240(const float length, const float fr_mm_s) {
|
||||
inline void e_move_m240(const float length, const feedRate_t &fr_mm_s) {
|
||||
if (length && thermalManager.hotEnoughToExtrude(active_extruder)) {
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
do_pause_e_move(length, fr_mm_s);
|
||||
@ -104,7 +104,8 @@ void GcodeSuite::M240() {
|
||||
};
|
||||
|
||||
#ifdef PHOTO_RETRACT_MM
|
||||
constexpr float rfr = (MMS_TO_MMM(
|
||||
const float rval = parser.seenval('R') ? parser.value_linear_units() : _PHOTO_RETRACT_MM;
|
||||
feedRate_t sval = (
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
PAUSE_PARK_RETRACT_FEEDRATE
|
||||
#elif ENABLED(FWRETRACT)
|
||||
@ -112,13 +113,12 @@ void GcodeSuite::M240() {
|
||||
#else
|
||||
45
|
||||
#endif
|
||||
));
|
||||
const float rval = parser.seenval('R') ? parser.value_linear_units() : _PHOTO_RETRACT_MM,
|
||||
sval = parser.seenval('S') ? MMM_TO_MMS(parser.value_feedrate()) : rfr;
|
||||
);
|
||||
if (parser.seenval('S')) sval = parser.value_feedrate();
|
||||
e_move_m240(-rval, sval);
|
||||
#endif
|
||||
|
||||
float fr_mm_s = MMM_TO_MMS(parser.linearval('F'));
|
||||
feedRate_t fr_mm_s = MMM_TO_MMS(parser.linearval('F'));
|
||||
if (fr_mm_s) NOLESS(fr_mm_s, 10.0f);
|
||||
|
||||
constexpr float photo_position[XYZ] = PHOTO_POSITION;
|
||||
|
Reference in New Issue
Block a user