|
@@ -2034,9 +2034,9 @@ DEFINE_PGM_READ_ANY(signed char, byte);
|
|
|
#define XYZ_CONSTS_FROM_CONFIG(type, array, CONFIG) \
|
|
|
static const PROGMEM type array##_P[3] = \
|
|
|
{ X_##CONFIG, Y_##CONFIG, Z_##CONFIG }; \
|
|
|
-static inline type array(int axis) \
|
|
|
+static inline type array(uint8_t axis) \
|
|
|
{ return pgm_read_any(&array##_P[axis]); } \
|
|
|
-type array##_ext(int axis) \
|
|
|
+type array##_ext(uint8_t axis) \
|
|
|
{ return pgm_read_any(&array##_P[axis]); }
|
|
|
|
|
|
XYZ_CONSTS_FROM_CONFIG(float, base_min_pos, MIN_POS);
|
|
@@ -2046,7 +2046,7 @@ XYZ_CONSTS_FROM_CONFIG(float, max_length, MAX_LENGTH);
|
|
|
XYZ_CONSTS_FROM_CONFIG(float, home_retract_mm, HOME_RETRACT_MM);
|
|
|
XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR);
|
|
|
|
|
|
-static void axis_is_at_home(int axis) {
|
|
|
+static void axis_is_at_home(uint8_t axis) {
|
|
|
current_position[axis] = base_home_pos(axis) + cs.add_homing[axis];
|
|
|
min_pos[axis] = base_min_pos(axis) + cs.add_homing[axis];
|
|
|
max_pos[axis] = base_max_pos(axis) + cs.add_homing[axis];
|
|
@@ -2362,9 +2362,9 @@ static void check_Z_crash(void)
|
|
|
#endif //TMC2130
|
|
|
|
|
|
#ifdef TMC2130
|
|
|
-void homeaxis(int axis, uint8_t cnt, uint8_t* pstep)
|
|
|
+void homeaxis(uint8_t axis, uint8_t cnt, uint8_t* pstep)
|
|
|
#else
|
|
|
-void homeaxis(int axis, uint8_t cnt)
|
|
|
+void homeaxis(uint8_t axis, uint8_t cnt)
|
|
|
#endif //TMC2130
|
|
|
{
|
|
|
bool endstops_enabled = enable_endstops(true); //RP: endstops should be allways enabled durring homing
|
|
@@ -2835,7 +2835,7 @@ static void gcode_G28(bool home_x_axis, long home_x_value, bool home_y_axis, lon
|
|
|
{
|
|
|
current_position[X_AXIS] = 0;current_position[Y_AXIS] = 0;
|
|
|
|
|
|
- int x_axis_home_dir = home_dir(X_AXIS);
|
|
|
+ uint8_t x_axis_home_dir = home_dir(X_AXIS);
|
|
|
|
|
|
plan_set_position_curposXYZE();
|
|
|
destination[X_AXIS] = 1.5 * max_length(X_AXIS) * x_axis_home_dir;destination[Y_AXIS] = 1.5 * max_length(Y_AXIS) * home_dir(Y_AXIS);
|