1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 22:08:02 +00:00

More externs and functions in Marlin.h

This commit is contained in:
Scott Lahteine 2017-12-15 18:18:26 -06:00
parent 4277fcb32c
commit e1b998e40a
4 changed files with 5 additions and 14 deletions

View File

@ -132,15 +132,11 @@
// External references
extern float feedrate_mm_s; // must set before calling prepare_move_to_destination
extern Planner planner;
#if ENABLED(ULTRA_LCD)
extern char lcd_status_message[];
#endif
void set_destination_from_current();
void prepare_move_to_destination();
inline void sync_plan_position_e() { planner.set_e_position_mm(current_position[E_AXIS]); }
inline void set_current_from_destination() { COPY(current_position, destination); }
// Private functions

View File

@ -210,6 +210,7 @@ inline void refresh_cmd_timeout() { previous_cmd_ms = millis(); }
/**
* Feedrate scaling and conversion
*/
extern float feedrate_mm_s;
extern int16_t feedrate_percentage;
#define MMS_SCALED(MM_S) ((MM_S)*feedrate_percentage*0.01)
@ -461,6 +462,10 @@ extern uint8_t active_extruder;
extern float mixing_factor[MIXING_STEPPERS];
#endif
inline void set_current_from_destination() { COPY(current_position, destination); }
inline void set_destination_from_current() { COPY(destination, current_position); }
void prepare_move_to_destination();
/**
* Blocking movement and shorthand functions
*/

View File

@ -724,7 +724,6 @@ void stop();
void get_available_commands();
void process_next_command();
void process_parsed_command();
void prepare_move_to_destination();
void get_cartesian_from_steppers();
void set_current_from_steppers_for_axis(const AxisEnum axis);
@ -1533,9 +1532,6 @@ inline void buffer_line_to_destination(const float fr_mm_s) {
planner.buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], fr_mm_s, active_extruder);
}
inline void set_current_from_destination() { COPY(current_position, destination); }
inline void set_destination_from_current() { COPY(destination, current_position); }
#if IS_KINEMATIC
/**
* Calculate delta, start a line, and set current_position to destination

View File

@ -2753,12 +2753,6 @@ void kill_screen(const char* lcd_msg) {
#endif // DELTA_CALIBRATION_MENU || DELTA_AUTO_CALIBRATION
#if IS_KINEMATIC
extern float feedrate_mm_s;
void set_destination_from_current();
void prepare_move_to_destination();
#endif
/**
* If the most recent manual move hasn't been fed to the planner yet,
* and the planner can accept one, send immediately