FORCE_INLINE before static
This commit is contained in:
parent
cd6468d6de
commit
8be7a0b131
@ -144,10 +144,10 @@
|
||||
static void printFloat(double, uint8_t);
|
||||
|
||||
public:
|
||||
static FORCE_INLINE void write(const char* str) { while (*str) write(*str++); }
|
||||
static FORCE_INLINE void write(const uint8_t* buffer, size_t size) { while (size--) write(*buffer++); }
|
||||
static FORCE_INLINE void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
|
||||
static FORCE_INLINE void print(const char* str) { write(str); }
|
||||
FORCE_INLINE static void write(const char* str) { while (*str) write(*str++); }
|
||||
FORCE_INLINE static void write(const uint8_t* buffer, size_t size) { while (size--) write(*buffer++); }
|
||||
FORCE_INLINE static void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
|
||||
FORCE_INLINE static void print(const char* str) { write(str); }
|
||||
|
||||
static void print(char, int = BYTE);
|
||||
static void print(unsigned char, int = BYTE);
|
||||
|
@ -140,7 +140,7 @@ class Planner {
|
||||
static uint8_t last_extruder; // Respond to extruder change
|
||||
#endif
|
||||
|
||||
static int16_t flow_percentage[EXTRUDERS]; // Extrusion factor for each extruder
|
||||
static int16_t flow_percentage[EXTRUDERS]; // Extrusion factor for each extruder
|
||||
|
||||
static float e_factor[EXTRUDERS], // The flow percentage and volumetric multiplier combine to scale E movement
|
||||
filament_size[EXTRUDERS], // diameter of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder
|
||||
@ -388,7 +388,7 @@ class Planner {
|
||||
* fr_mm_s - (target) speed of the move (mm/s)
|
||||
* extruder - target extruder
|
||||
*/
|
||||
static FORCE_INLINE void buffer_line(ARG_X, ARG_Y, ARG_Z, const float &e, const float &fr_mm_s, const uint8_t extruder) {
|
||||
FORCE_INLINE static void buffer_line(ARG_X, ARG_Y, ARG_Z, const float &e, const float &fr_mm_s, const uint8_t extruder) {
|
||||
#if PLANNER_LEVELING && IS_CARTESIAN
|
||||
apply_leveling(rx, ry, rz);
|
||||
#endif
|
||||
@ -404,7 +404,7 @@ class Planner {
|
||||
* fr_mm_s - (target) speed of the move (mm/s)
|
||||
* extruder - target extruder
|
||||
*/
|
||||
static FORCE_INLINE void buffer_line_kinematic(const float cart[XYZE], const float &fr_mm_s, const uint8_t extruder) {
|
||||
FORCE_INLINE static void buffer_line_kinematic(const float cart[XYZE], const float &fr_mm_s, const uint8_t extruder) {
|
||||
#if PLANNER_LEVELING
|
||||
float raw[XYZ] = { cart[X_AXIS], cart[Y_AXIS], cart[Z_AXIS] };
|
||||
apply_leveling(raw);
|
||||
@ -428,7 +428,7 @@ class Planner {
|
||||
*
|
||||
* Clears previous speed values.
|
||||
*/
|
||||
static FORCE_INLINE void set_position_mm(ARG_X, ARG_Y, ARG_Z, const float &e) {
|
||||
FORCE_INLINE static void set_position_mm(ARG_X, ARG_Y, ARG_Z, const float &e) {
|
||||
#if PLANNER_LEVELING && IS_CARTESIAN
|
||||
apply_leveling(rx, ry, rz);
|
||||
#endif
|
||||
@ -436,8 +436,8 @@ class Planner {
|
||||
}
|
||||
static void set_position_mm_kinematic(const float position[NUM_AXIS]);
|
||||
static void set_position_mm(const AxisEnum axis, const float &v);
|
||||
static FORCE_INLINE void set_z_position_mm(const float &z) { set_position_mm(Z_AXIS, z); }
|
||||
static FORCE_INLINE void set_e_position_mm(const float &e) { set_position_mm(AxisEnum(E_AXIS), e); }
|
||||
FORCE_INLINE static void set_z_position_mm(const float &z) { set_position_mm(Z_AXIS, z); }
|
||||
FORCE_INLINE static void set_e_position_mm(const float &e) { set_position_mm(AxisEnum(E_AXIS), e); }
|
||||
|
||||
/**
|
||||
* Sync from the stepper positions. (e.g., after an interrupted move)
|
||||
|
@ -225,7 +225,7 @@ class Stepper {
|
||||
// SCARA AB axes are in degrees, not mm
|
||||
//
|
||||
#if IS_SCARA
|
||||
static FORCE_INLINE float get_axis_position_degrees(AxisEnum axis) { return get_axis_position_mm(axis); }
|
||||
FORCE_INLINE static float get_axis_position_degrees(AxisEnum axis) { return get_axis_position_mm(axis); }
|
||||
#endif
|
||||
|
||||
//
|
||||
@ -247,7 +247,7 @@ class Stepper {
|
||||
//
|
||||
// The direction of a single motor
|
||||
//
|
||||
static FORCE_INLINE bool motor_direction(AxisEnum axis) { return TEST(last_direction_bits, axis); }
|
||||
FORCE_INLINE static bool motor_direction(AxisEnum axis) { return TEST(last_direction_bits, axis); }
|
||||
|
||||
#if HAS_DIGIPOTSS || HAS_MOTOR_CURRENT_PWM
|
||||
static void digitalPotWrite(const int16_t address, const int16_t value);
|
||||
@ -261,19 +261,19 @@ class Stepper {
|
||||
#endif
|
||||
|
||||
#if ENABLED(X_DUAL_ENDSTOPS)
|
||||
static FORCE_INLINE void set_homing_flag_x(const bool state) { performing_homing = state; }
|
||||
static FORCE_INLINE void set_x_lock(const bool state) { locked_x_motor = state; }
|
||||
static FORCE_INLINE void set_x2_lock(const bool state) { locked_x2_motor = state; }
|
||||
FORCE_INLINE static void set_homing_flag_x(const bool state) { performing_homing = state; }
|
||||
FORCE_INLINE static void set_x_lock(const bool state) { locked_x_motor = state; }
|
||||
FORCE_INLINE static void set_x2_lock(const bool state) { locked_x2_motor = state; }
|
||||
#endif
|
||||
#if ENABLED(Y_DUAL_ENDSTOPS)
|
||||
static FORCE_INLINE void set_homing_flag_y(const bool state) { performing_homing = state; }
|
||||
static FORCE_INLINE void set_y_lock(const bool state) { locked_y_motor = state; }
|
||||
static FORCE_INLINE void set_y2_lock(const bool state) { locked_y2_motor = state; }
|
||||
FORCE_INLINE static void set_homing_flag_y(const bool state) { performing_homing = state; }
|
||||
FORCE_INLINE static void set_y_lock(const bool state) { locked_y_motor = state; }
|
||||
FORCE_INLINE static void set_y2_lock(const bool state) { locked_y2_motor = state; }
|
||||
#endif
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
static FORCE_INLINE void set_homing_flag_z(const bool state) { performing_homing = state; }
|
||||
static FORCE_INLINE void set_z_lock(const bool state) { locked_z_motor = state; }
|
||||
static FORCE_INLINE void set_z2_lock(const bool state) { locked_z2_motor = state; }
|
||||
FORCE_INLINE static void set_homing_flag_z(const bool state) { performing_homing = state; }
|
||||
FORCE_INLINE static void set_z_lock(const bool state) { locked_z_motor = state; }
|
||||
FORCE_INLINE static void set_z2_lock(const bool state) { locked_z2_motor = state; }
|
||||
#endif
|
||||
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
@ -292,7 +292,7 @@ class Stepper {
|
||||
//
|
||||
// Triggered position of an axis in mm (not core-savvy)
|
||||
//
|
||||
static FORCE_INLINE float triggered_position_mm(AxisEnum axis) {
|
||||
FORCE_INLINE static float triggered_position_mm(AxisEnum axis) {
|
||||
return endstops_trigsteps[axis] * planner.steps_to_mm[axis];
|
||||
}
|
||||
|
||||
@ -302,7 +302,7 @@ class Stepper {
|
||||
|
||||
private:
|
||||
|
||||
static FORCE_INLINE unsigned short calc_timer(unsigned short step_rate) {
|
||||
FORCE_INLINE static unsigned short calc_timer(unsigned short step_rate) {
|
||||
unsigned short timer;
|
||||
|
||||
NOMORE(step_rate, MAX_STEP_FREQUENCY);
|
||||
@ -344,7 +344,7 @@ class Stepper {
|
||||
|
||||
// Initialize the trapezoid generator from the current block.
|
||||
// Called whenever a new block begins.
|
||||
static FORCE_INLINE void trapezoid_generator_reset() {
|
||||
FORCE_INLINE static void trapezoid_generator_reset() {
|
||||
|
||||
static int8_t last_extruder = -1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user