Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Firmware/MotorControl/axis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ bool Axis::do_checks(uint32_t timestamp) {
motor_.do_checks(timestamp);

// Check for endstop presses
if (min_endstop_.config_.enabled && min_endstop_.rose() && !(current_state_ == AXIS_STATE_HOMING) && !(min_endstop_.config_.ignore_during_startup && current_state_ == AXIS_STATE_UNDEFINED) && !(config_.startup_encoder_index_search && current_state_ == AXIS_STATE_ENCODER_INDEX_SEARCH)) {
if (min_endstop_.config_.enabled && min_endstop_.rose() && !(current_state_ == AXIS_STATE_HOMING) && !(min_endstop_.config_.ignore_during_startup && current_state_ == AXIS_STATE_UNDEFINED) && !(min_endstop_.config_.ignore_during_encoder_index_search && current_state_ == AXIS_STATE_ENCODER_INDEX_SEARCH)) {
error_ |= ERROR_MIN_ENDSTOP_PRESSED;
} else if (max_endstop_.config_.enabled && max_endstop_.rose() && !(current_state_ == AXIS_STATE_HOMING) && !(max_endstop_.config_.ignore_during_startup && current_state_ == AXIS_STATE_UNDEFINED) && !(config_.startup_encoder_index_search && current_state_ == AXIS_STATE_ENCODER_INDEX_SEARCH)) {
} else if (max_endstop_.config_.enabled && max_endstop_.rose() && !(current_state_ == AXIS_STATE_HOMING) && !(max_endstop_.config_.ignore_during_startup && current_state_ == AXIS_STATE_UNDEFINED) && !(min_endstop_.config_.ignore_during_encoder_index_search && current_state_ == AXIS_STATE_ENCODER_INDEX_SEARCH)) {
error_ |= ERROR_MAX_ENDSTOP_PRESSED;
}

Expand Down
1 change: 1 addition & 0 deletions Firmware/MotorControl/endstop.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class Endstop {
bool enabled = false;
bool is_active_high = false;
bool ignore_during_startup = false;
bool ignore_during_encoder_index_search = false;

// custom setters
Endstop* parent = nullptr;
Expand Down
1 change: 1 addition & 0 deletions Firmware/odrive-interface.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1410,6 +1410,7 @@ interfaces:
offset: {type: float32, unit: turns}
is_active_high: bool
ignore_during_startup: bool
ignore_during_encoder_index_search: bool
debounce_ms: {type: uint32, c_setter: set_debounce_ms}

ODrive.MechanicalBrake:
Expand Down