diff --git a/.github/workflows/firmware.yaml b/.github/workflows/firmware.yaml index 5f73efd65..1a7fa2757 100644 --- a/.github/workflows/firmware.yaml +++ b/.github/workflows/firmware.yaml @@ -12,20 +12,10 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macOS-latest] + os: [ubuntu-latest] board_version: [v3.6-56V] - debug: [true] - - include: - - {os: ubuntu-latest, board_version: v3.2, debug: false} - - {os: ubuntu-latest, board_version: v3.3, debug: false} - - {os: ubuntu-latest, board_version: v3.4-24V, debug: false} - - {os: ubuntu-latest, board_version: v3.4-48V, debug: false} - - {os: ubuntu-latest, board_version: v3.5-24V, debug: false} - - {os: ubuntu-latest, board_version: v3.5-48V, debug: false} - - {os: ubuntu-latest, board_version: v3.6-24V, debug: false} - - {os: ubuntu-latest, board_version: v3.6-56V, debug: false} - + debug: [false] + runs-on: ${{ matrix.os }} outputs: channel: ${{ steps.release-info.outputs.channel }} diff --git a/Firmware/MotorControl/axis.cpp b/Firmware/MotorControl/axis.cpp index 03735ce0d..f0d8e362d 100644 --- a/Firmware/MotorControl/axis.cpp +++ b/Firmware/MotorControl/axis.cpp @@ -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)) { + 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)) { + } 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; } diff --git a/Firmware/MotorControl/endstop.hpp b/Firmware/MotorControl/endstop.hpp index 21a640c27..b3a6018b1 100644 --- a/Firmware/MotorControl/endstop.hpp +++ b/Firmware/MotorControl/endstop.hpp @@ -10,6 +10,8 @@ class Endstop { uint16_t gpio_num = 0; 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; diff --git a/Firmware/odrive-interface.yaml b/Firmware/odrive-interface.yaml index 34cb09d06..be98dba1a 100644 --- a/Firmware/odrive-interface.yaml +++ b/Firmware/odrive-interface.yaml @@ -1409,6 +1409,8 @@ interfaces: enabled: {type: bool, c_setter: set_enabled} 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: