Add custom types for position (#15204)
This commit is contained in:
@@ -339,19 +339,19 @@ bool L6470_Marlin::get_user_input(uint8_t &driver_count, uint8_t axis_index[3],
|
||||
// Position calcs & checks
|
||||
//
|
||||
|
||||
const float center[] = {
|
||||
LOGICAL_X_POSITION(current_position[X_AXIS]),
|
||||
LOGICAL_Y_POSITION(current_position[Y_AXIS]),
|
||||
LOGICAL_Z_POSITION(current_position[Z_AXIS]),
|
||||
current_position[E_AXIS]
|
||||
const xyze_pos_t center = {
|
||||
LOGICAL_X_POSITION(current_position.x),
|
||||
LOGICAL_Y_POSITION(current_position.y),
|
||||
LOGICAL_Z_POSITION(current_position.z),
|
||||
current_position.e
|
||||
};
|
||||
|
||||
switch (axis_mon[0][0]) {
|
||||
default: position_max = position_min = 0; break;
|
||||
|
||||
case 'X': {
|
||||
position_min = center[X_AXIS] - displacement;
|
||||
position_max = center[X_AXIS] + displacement;
|
||||
position_min = center.x - displacement;
|
||||
position_max = center.x + displacement;
|
||||
echo_min_max('X', position_min, position_max);
|
||||
if (false
|
||||
#ifdef X_MIN_POS
|
||||
@@ -367,8 +367,8 @@ bool L6470_Marlin::get_user_input(uint8_t &driver_count, uint8_t axis_index[3],
|
||||
} break;
|
||||
|
||||
case 'Y': {
|
||||
position_min = center[Y_AXIS] - displacement;
|
||||
position_max = center[Y_AXIS] + displacement;
|
||||
position_min = center.y - displacement;
|
||||
position_max = center.y + displacement;
|
||||
echo_min_max('Y', position_min, position_max);
|
||||
if (false
|
||||
#ifdef Y_MIN_POS
|
||||
@@ -384,8 +384,8 @@ bool L6470_Marlin::get_user_input(uint8_t &driver_count, uint8_t axis_index[3],
|
||||
} break;
|
||||
|
||||
case 'Z': {
|
||||
position_min = center[Z_AXIS] - displacement;
|
||||
position_max = center[Z_AXIS] + displacement;
|
||||
position_min = center.z - displacement;
|
||||
position_max = center.z + displacement;
|
||||
echo_min_max('Z', position_min, position_max);
|
||||
if (false
|
||||
#ifdef Z_MIN_POS
|
||||
@@ -401,8 +401,8 @@ bool L6470_Marlin::get_user_input(uint8_t &driver_count, uint8_t axis_index[3],
|
||||
} break;
|
||||
|
||||
case 'E': {
|
||||
position_min = center[E_AXIS] - displacement;
|
||||
position_max = center[E_AXIS] + displacement;
|
||||
position_min = center.e - displacement;
|
||||
position_max = center.e + displacement;
|
||||
echo_min_max('E', position_min, position_max);
|
||||
} break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user