Skip to content

Commit

Permalink
Merge pull request #4319 from thinkyhead/rc_feedrates_to_mess_with_you
Browse files Browse the repository at this point in the history
Wrangle feed rate variables
  • Loading branch information
thinkyhead authored Jul 17, 2016
2 parents 0342661 + f38553b commit f242aea
Show file tree
Hide file tree
Showing 11 changed files with 213 additions and 199 deletions.
14 changes: 12 additions & 2 deletions Marlin/Marlin.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,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 @@ -386,7 +396,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

0 comments on commit f242aea

Please sign in to comment.