Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrangle feed rate variables #4319

Merged
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
14 changes: 12 additions & 2 deletions Marlin/Marlin.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,18 @@ inline void refresh_cmd_timeout() { previous_cmd_ms = millis(); }
#define CRITICAL_SECTION_END SREG = _sreg;
#endif

/**
* Feedrate scaling and conversion
*/
extern int feedrate_percentage;

#define MMM_TO_MMS(MM_M) ((MM_M)/60.0)
#define MMS_TO_MMM(MM_S) ((MM_S)*60.0)
#define MMM_SCALED(MM_M) ((MM_M)*feedrate_percentage/100.0)
#define MMS_SCALED(MM_S) MMM_SCALED(MM_S)
#define MMM_TO_MMS_SCALED(MM_M) (MMS_SCALED(MMM_TO_MMS(MM_M)))

extern bool axis_relative_modes[];
extern int feedrate_multiplier;
extern bool volumetric_enabled;
extern int extruder_multiplier[EXTRUDERS]; // sets extrude multiply factor (in percent) for each extruder individually
extern float filament_size[EXTRUDERS]; // cross-sectional area of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder.
Expand Down Expand Up @@ -385,7 +395,7 @@ float code_value_temp_diff();
extern bool autoretract_enabled;
extern bool retracted[EXTRUDERS]; // extruder[n].retracted
extern float retract_length, retract_length_swap, retract_feedrate_mm_s, retract_zlift;
extern float retract_recover_length, retract_recover_length_swap, retract_recover_feedrate;
extern float retract_recover_length, retract_recover_length_swap, retract_recover_feedrate_mm_s;
#endif

// Print job timer
Expand Down
Loading