Skip to content

Commit

Permalink
Added _use_servos config item
Browse files Browse the repository at this point in the history
This will allow servos and steppers to homing differently
  • Loading branch information
bdring committed Aug 11, 2023
1 parent 9ca4ad1 commit 7079eb4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 6 additions & 0 deletions FluidNC/src/Kinematics/ParallelDelta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ namespace Kinematics {
handler.item("homing_mpos_radians", _homing_mpos);
handler.item("soft_limits", _softLimits);
handler.item("max_z_mm", _max_z, -10000.0, 0.0); //
handler.item("use_servos", _use_servos);
}

void ParallelDelta::init() {
Expand Down Expand Up @@ -282,6 +283,11 @@ namespace Kinematics {
}

bool ParallelDelta::kinematics_homing(AxisMask& axisMask) {

// only servos use custom homing. Steppers use limit switches
if (!_use_servos)
false;

auto axes = config->_axes;
auto n_axis = axes->_numberAxis;

Expand Down
8 changes: 2 additions & 6 deletions FluidNC/src/Kinematics/ParallelDelta.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,7 @@
#endif

namespace Kinematics {
// enum class KinematicError : uint8_t {
// NONE = 0,
// OUT_OF_RANGE = 1,
// ANGLE_TOO_NEGATIVE = 2,
// ANGLE_TOO_POSITIVE = 3,
// };

class ParallelDelta : public Cartesian {
public:
ParallelDelta() = default;
Expand Down Expand Up @@ -78,6 +73,7 @@ namespace Kinematics {
bool _softLimits = false;
float _homing_mpos = 0.0;
float _max_z = 0.0;
bool _use_servos = true; // servo use a special homing

bool delta_calcAngleYZ(float x0, float y0, float z0, float& theta);
float three_axis_dist(float* point1, float* point2);
Expand Down

0 comments on commit 7079eb4

Please sign in to comment.