diff --git a/gantry/core/tasks_proto.cpp b/gantry/core/tasks_proto.cpp index c059698aa..143c18c12 100644 --- a/gantry/core/tasks_proto.cpp +++ b/gantry/core/tasks_proto.cpp @@ -62,11 +62,13 @@ auto gantry::tasks::start_tasks( tmc2130::configs::TMC2130DriverConfig& driver_configs, motor_hardware_task::MotorHardwareTask& mh_tsk, i2c::hardware::I2CBase& i2c2, - eeprom::hardware_iface::EEPromHardwareIface& eeprom_hw_iface) -> interfaces::diag0_handler { + eeprom::hardware_iface::EEPromHardwareIface& eeprom_hw_iface) + -> interfaces::diag0_handler { auto& can_writer = can_task::start_writer(can_bus); can_task::start_reader(can_bus); - auto& motion = mc_task_builder.start(5, "motion controller", - motion_controller, ::queues, ::queues, ::queues); + auto& motion = + mc_task_builder.start(5, "motion controller", motion_controller, + ::queues, ::queues, ::queues); auto& tmc2130_driver = motor_driver_task_builder.start( 5, "tmc2130 driver", driver_configs, ::queues, spi_task_client); auto& move_group = @@ -122,7 +124,8 @@ auto gantry::tasks::start_tasks( void gantry::tasks::call_run_diag0_interrupt() { if (gantry::tasks::get_tasks().motion_controller) { - return gantry::tasks::get_tasks().motion_controller->run_diag0_interrupt(); + return gantry::tasks::get_tasks() + .motion_controller->run_diag0_interrupt(); } } diff --git a/gantry/core/tasks_rev1.cpp b/gantry/core/tasks_rev1.cpp index 4c31ddb72..d7a294a1a 100644 --- a/gantry/core/tasks_rev1.cpp +++ b/gantry/core/tasks_rev1.cpp @@ -61,11 +61,13 @@ auto gantry::tasks::start_tasks( tmc2160::configs::TMC2160DriverConfig& driver_configs, motor_hardware_task::MotorHardwareTask& mh_tsk, i2c::hardware::I2CBase& i2c2, - eeprom::hardware_iface::EEPromHardwareIface& eeprom_hw_iface) -> interfaces::diag0_handler { + eeprom::hardware_iface::EEPromHardwareIface& eeprom_hw_iface) + -> interfaces::diag0_handler { auto& can_writer = can_task::start_writer(can_bus); can_task::start_reader(can_bus); - auto& motion = mc_task_builder.start(5, "motion controller", - motion_controller, ::queues, ::queues, ::queues); + auto& motion = + mc_task_builder.start(5, "motion controller", motion_controller, + ::queues, ::queues, ::queues); auto& tmc2160_driver = motor_driver_task_builder.start( 5, "tmc2160 driver", driver_configs, ::queues, spi_task_client); auto& move_group = @@ -121,7 +123,8 @@ auto gantry::tasks::start_tasks( void gantry::tasks::call_run_diag0_interrupt() { if (gantry::tasks::get_tasks().motion_controller) { - return gantry::tasks::get_tasks().motion_controller->run_diag0_interrupt(); + return gantry::tasks::get_tasks() + .motion_controller->run_diag0_interrupt(); } } diff --git a/gantry/firmware/interfaces_proto.cpp b/gantry/firmware/interfaces_proto.cpp index 123f3e835..0c142d197 100644 --- a/gantry/firmware/interfaces_proto.cpp +++ b/gantry/firmware/interfaces_proto.cpp @@ -86,11 +86,12 @@ struct motion_controller::HardwareConfig motor_pins_x { .port = GPIOB, .pin = GPIO_PIN_7, .active_setting = GPIO_PIN_RESET}, - .estop_in = { - // NOLINTNEXTLINE(cppcoreguidelines-pro-type-cstyle-cast) - .port = GPIOA, - .pin = GPIO_PIN_10, - .active_setting = GPIO_PIN_RESET}, + .estop_in = + { + // NOLINTNEXTLINE(cppcoreguidelines-pro-type-cstyle-cast) + .port = GPIOA, + .pin = GPIO_PIN_10, + .active_setting = GPIO_PIN_RESET}, .diag0 = { // NOLINTNEXTLINE(cppcoreguidelines-pro-type-cstyle-cast) .port = GPIOC, @@ -130,11 +131,12 @@ struct motion_controller::HardwareConfig motor_pins_y { .port = GPIOB, .pin = GPIO_PIN_5, .active_setting = GPIO_PIN_RESET}, - .estop_in = { - // NOLINTNEXTLINE(cppcoreguidelines-pro-type-cstyle-cast) - .port = GPIOA, - .pin = GPIO_PIN_10, - .active_setting = GPIO_PIN_RESET}, + .estop_in = + { + // NOLINTNEXTLINE(cppcoreguidelines-pro-type-cstyle-cast) + .port = GPIOA, + .pin = GPIO_PIN_10, + .active_setting = GPIO_PIN_RESET}, .diag0 = { // NOLINTNEXTLINE(cppcoreguidelines-pro-type-cstyle-cast) .port = GPIOC, @@ -143,8 +145,7 @@ struct motion_controller::HardwareConfig motor_pins_y { }; static tmc2130::configs::TMC2130DriverConfig gantry_x_driver_configs{ - .registers = {.gconfig = {.en_pwm_mode = 1, - .diag0_error = 1}, + .registers = {.gconfig = {.en_pwm_mode = 1, .diag0_error = 1}, .ihold_irun = {.hold_current = 0x2, .run_current = 0x18, .hold_current_delay = 0x7}, @@ -167,8 +168,7 @@ static tmc2130::configs::TMC2130DriverConfig gantry_x_driver_configs{ }}; static tmc2130::configs::TMC2130DriverConfig gantry_y_driver_configs{ - .registers = {.gconfig = {.en_pwm_mode = 1, - .diag0_error = 1}, + .registers = {.gconfig = {.en_pwm_mode = 1, .diag0_error = 1}, .ihold_irun = {.hold_current = 0x2, .run_current = 0x18, .hold_current_delay = 0x7}, @@ -244,8 +244,8 @@ static stall_check::StallCheck stallcheck( * Handler of motor interrupts. */ static motor_handler::MotorInterruptHandler motor_interrupt( - motor_queue, gantry::queues::get_queues(), gantry::queues::get_queues(), motor_hardware_iface, stallcheck, - update_position_queue); + motor_queue, gantry::queues::get_queues(), gantry::queues::get_queues(), + motor_hardware_iface, stallcheck, update_position_queue); static auto encoder_background_timer = motor_encoder::BackgroundTimer(motor_interrupt, motor_hardware_iface); @@ -287,7 +287,8 @@ void interfaces::initialize(diag0_handler* call_diag0_handler) { Error_Handler(); } - initialize_timer(call_motor_handler, call_diag0_handler, enc_overflow_callback); + initialize_timer(call_motor_handler, call_diag0_handler, + enc_overflow_callback); // Start the can bus canbus.start(can_bit_timings); diff --git a/gantry/firmware/interfaces_rev1.cpp b/gantry/firmware/interfaces_rev1.cpp index cb0f96a22..5a4137b12 100644 --- a/gantry/firmware/interfaces_rev1.cpp +++ b/gantry/firmware/interfaces_rev1.cpp @@ -86,11 +86,12 @@ struct motion_controller::HardwareConfig motor_pins_x { .port = GPIOB, .pin = GPIO_PIN_7, .active_setting = GPIO_PIN_RESET}, - .estop_in = { - // NOLINTNEXTLINE(cppcoreguidelines-pro-type-cstyle-cast) - .port = GPIOA, - .pin = GPIO_PIN_10, - .active_setting = GPIO_PIN_RESET}, + .estop_in = + { + // NOLINTNEXTLINE(cppcoreguidelines-pro-type-cstyle-cast) + .port = GPIOA, + .pin = GPIO_PIN_10, + .active_setting = GPIO_PIN_RESET}, .diag0 = { // NOLINTNEXTLINE(cppcoreguidelines-pro-type-cstyle-cast) .port = GPIOC, @@ -130,11 +131,12 @@ struct motion_controller::HardwareConfig motor_pins_y { .port = GPIOB, .pin = GPIO_PIN_7, .active_setting = GPIO_PIN_RESET}, - .estop_in = { - // NOLINTNEXTLINE(cppcoreguidelines-pro-type-cstyle-cast) - .port = GPIOA, - .pin = GPIO_PIN_10, - .active_setting = GPIO_PIN_RESET}, + .estop_in = + { + // NOLINTNEXTLINE(cppcoreguidelines-pro-type-cstyle-cast) + .port = GPIOA, + .pin = GPIO_PIN_10, + .active_setting = GPIO_PIN_RESET}, .diag0 = { // NOLINTNEXTLINE(cppcoreguidelines-pro-type-cstyle-cast) .port = GPIOC, @@ -143,8 +145,7 @@ struct motion_controller::HardwareConfig motor_pins_y { }; static tmc2160::configs::TMC2160DriverConfig motor_driver_config_x{ - .registers = {.gconfig = {.en_pwm_mode = 0, - .diag0_error = 1}, + .registers = {.gconfig = {.en_pwm_mode = 0, .diag0_error = 1}, .ihold_irun = {.hold_current = 16, .run_current = 31, .hold_current_delay = 0x7}, @@ -184,8 +185,7 @@ static tmc2160::configs::TMC2160DriverConfig motor_driver_config_x{ }}; static tmc2160::configs::TMC2160DriverConfig motor_driver_config_y{ - .registers = {.gconfig = {.en_pwm_mode = 0, - .diag0_error = 1}, + .registers = {.gconfig = {.en_pwm_mode = 0, .diag0_error = 1}, .ihold_irun = {.hold_current = 16, .run_current = 31, .hold_current_delay = 0x7}, @@ -271,8 +271,8 @@ static stall_check::StallCheck stallcheck( * Handler of motor interrupts. */ static motor_handler::MotorInterruptHandler motor_interrupt( - motor_queue, gantry::queues::get_queues(), gantry::queues::get_queues(), motor_hardware_iface, stallcheck, - update_position_queue); + motor_queue, gantry::queues::get_queues(), gantry::queues::get_queues(), + motor_hardware_iface, stallcheck, update_position_queue); static auto encoder_background_timer = motor_encoder::BackgroundTimer(motor_interrupt, motor_hardware_iface); @@ -315,7 +315,8 @@ void interfaces::initialize(diag0_handler* call_diag0_handler) { Error_Handler(); } - initialize_timer(call_motor_handler, call_diag0_handler, enc_overflow_callback); + initialize_timer(call_motor_handler, call_diag0_handler, + enc_overflow_callback); // Start the can bus canbus.start(can_bit_timings); diff --git a/gantry/simulator/interfaces.cpp b/gantry/simulator/interfaces.cpp index e7a8a8f56..a22db5105 100644 --- a/gantry/simulator/interfaces.cpp +++ b/gantry/simulator/interfaces.cpp @@ -89,8 +89,8 @@ static stall_check::StallCheck stallcheck( * Handler of motor interrupts. */ static motor_handler::MotorInterruptHandler motor_interrupt( - motor_queue, gantry::queues::get_queues(), gantry::queues::get_queues(), motor_interface, stallcheck, - update_position_queue); + motor_queue, gantry::queues::get_queues(), gantry::queues::get_queues(), + motor_interface, stallcheck, update_position_queue); static motor_interrupt_driver::MotorInterruptDriver A(motor_queue, motor_interrupt, diff --git a/gripper/firmware/interfaces_z_motor.cpp b/gripper/firmware/interfaces_z_motor.cpp index d691d4ad5..2d2416ec9 100644 --- a/gripper/firmware/interfaces_z_motor.cpp +++ b/gripper/firmware/interfaces_z_motor.cpp @@ -190,8 +190,9 @@ static motor_class::Motor z_motor{ * Handler of motor interrupts. */ static motor_handler::MotorInterruptHandler motor_interrupt( - motor_queue, gripper_tasks::z_tasks::get_queues(), gripper_tasks::z_tasks::get_queues(), motor_hardware_iface, - stallcheck, update_position_queue); + motor_queue, gripper_tasks::z_tasks::get_queues(), + gripper_tasks::z_tasks::get_queues(), motor_hardware_iface, stallcheck, + update_position_queue); static auto encoder_background_timer = motor_encoder::BackgroundTimer(motor_interrupt, motor_hardware_iface); diff --git a/gripper/simulator/interfaces.cpp b/gripper/simulator/interfaces.cpp index 13469ba52..dd419450e 100644 --- a/gripper/simulator/interfaces.cpp +++ b/gripper/simulator/interfaces.cpp @@ -94,8 +94,9 @@ static stall_check::StallCheck stallcheck( * Handler of motor interrupts. */ static motor_handler::MotorInterruptHandler motor_interrupt( - motor_queue, gripper_tasks::z_tasks::get_queues(), gripper_tasks::z_tasks::get_queues(), motor_interface, - stallcheck, update_position_queue); + motor_queue, gripper_tasks::z_tasks::get_queues(), + gripper_tasks::z_tasks::get_queues(), motor_interface, stallcheck, + update_position_queue); static motor_interrupt_driver::MotorInterruptDriver A(motor_queue, motor_interrupt, diff --git a/head/core/tasks_proto.cpp b/head/core/tasks_proto.cpp index 69e52a767..6c3d4efd6 100644 --- a/head/core/tasks_proto.cpp +++ b/head/core/tasks_proto.cpp @@ -140,8 +140,9 @@ void head_tasks::start_tasks( head_queues.eeprom_queue = &eeprom_task.get_queue(); // Start the left motor tasks - auto& left_motion = left_mc_task_builder.start( - 5, "left mc", left_motion_controller, left_queues, left_queues, left_queues); + auto& left_motion = + left_mc_task_builder.start(5, "left mc", left_motion_controller, + left_queues, left_queues, left_queues); auto& left_tmc2130_driver = left_motor_driver_task_builder.start( 5, "left motor driver", left_driver_configs, left_queues, spi3_task_client); @@ -169,8 +170,9 @@ void head_tasks::start_tasks( left_queues.usage_storage_queue = &left_usage_storage_task.get_queue(); // Start the right motor tasks - auto& right_motion = right_mc_task_builder.start( - 5, "right mc", right_motion_controller, right_queues, right_queues, right_queues); + auto& right_motion = + right_mc_task_builder.start(5, "right mc", right_motion_controller, + right_queues, right_queues, right_queues); auto& right_tmc2130_driver = right_motor_driver_task_builder.start( 5, "right motor driver", right_driver_configs, right_queues, spi2_task_client); diff --git a/head/core/tasks_rev1.cpp b/head/core/tasks_rev1.cpp index e150722cb..c875df463 100644 --- a/head/core/tasks_rev1.cpp +++ b/head/core/tasks_rev1.cpp @@ -145,8 +145,9 @@ void head_tasks::start_tasks( head_queues.eeprom_queue = &eeprom_task.get_queue(); #endif // Start the left motor tasks - auto& left_motion = left_mc_task_builder.start( - 5, "left mc", left_motion_controller, left_queues, left_queues, left_queues); + auto& left_motion = + left_mc_task_builder.start(5, "left mc", left_motion_controller, + left_queues, left_queues, left_queues); auto& left_tmc2160_driver = left_motor_driver_task_builder.start( 5, "left motor driver", left_driver_configs, left_queues, spi3_task_client); @@ -182,8 +183,9 @@ void head_tasks::start_tasks( #endif // Start the right motor tasks - auto& right_motion = right_mc_task_builder.start( - 5, "right mc", right_motion_controller, right_queues, right_queues, right_queues); + auto& right_motion = + right_mc_task_builder.start(5, "right mc", right_motion_controller, + right_queues, right_queues, right_queues); auto& right_tmc2160_driver = right_motor_driver_task_builder.start( 5, "right motor driver", right_driver_configs, right_queues, spi2_task_client); diff --git a/head/firmware/main_proto.cpp b/head/firmware/main_proto.cpp index 7b0948814..c63842b32 100644 --- a/head/firmware/main_proto.cpp +++ b/head/firmware/main_proto.cpp @@ -268,8 +268,9 @@ static stall_check::StallCheck stallcheck_right( static motor_hardware::MotorHardware motor_hardware_right( pin_configurations_right, &htim7, &htim2, right_usage_config); static motor_handler::MotorInterruptHandler motor_interrupt_right( - motor_queue_right, head_tasks::get_right_queues(), head_tasks::get_right_queues(), motor_hardware_right, - stallcheck_right, update_position_queue_right); + motor_queue_right, head_tasks::get_right_queues(), + head_tasks::get_right_queues(), motor_hardware_right, stallcheck_right, + update_position_queue_right); static auto encoder_background_timer_right = motor_encoder::BackgroundTimer(motor_interrupt_right, motor_hardware_right); @@ -289,8 +290,9 @@ static stall_check::StallCheck stallcheck_left( static motor_hardware::MotorHardware motor_hardware_left( pin_configurations_left, &htim7, &htim3, left_usage_config); static motor_handler::MotorInterruptHandler motor_interrupt_left( - motor_queue_left, head_tasks::get_left_queues(), head_tasks::get_left_queues(), motor_hardware_left, - stallcheck_left, update_position_queue_left); + motor_queue_left, head_tasks::get_left_queues(), + head_tasks::get_left_queues(), motor_hardware_left, stallcheck_left, + update_position_queue_left); static auto encoder_background_timer_left = motor_encoder::BackgroundTimer(motor_interrupt_left, motor_hardware_left); diff --git a/head/firmware/main_rev1.cpp b/head/firmware/main_rev1.cpp index 4d8e27054..008560e77 100644 --- a/head/firmware/main_rev1.cpp +++ b/head/firmware/main_rev1.cpp @@ -286,8 +286,9 @@ static stall_check::StallCheck stallcheck_right( static motor_hardware::MotorHardware motor_hardware_right( pin_configurations_right, &htim7, &htim2, right_usage_config); static motor_handler::MotorInterruptHandler motor_interrupt_right( - motor_queue_right, head_tasks::get_right_queues(), head_tasks::get_right_queues(), motor_hardware_right, - stallcheck_right, update_position_queue_right); + motor_queue_right, head_tasks::get_right_queues(), + head_tasks::get_right_queues(), motor_hardware_right, stallcheck_right, + update_position_queue_right); static auto encoder_background_timer_right = motor_encoder::BackgroundTimer(motor_interrupt_right, motor_hardware_right); @@ -311,8 +312,9 @@ static stall_check::StallCheck stallcheck_left( static motor_hardware::MotorHardware motor_hardware_left( pin_configurations_left, &htim7, &htim3, left_usage_config); static motor_handler::MotorInterruptHandler motor_interrupt_left( - motor_queue_left, head_tasks::get_left_queues(), head_tasks::get_left_queues(), motor_hardware_left, - stallcheck_left, update_position_queue_left); + motor_queue_left, head_tasks::get_left_queues(), + head_tasks::get_left_queues(), motor_hardware_left, stallcheck_left, + update_position_queue_left); static auto encoder_background_timer_left = motor_encoder::BackgroundTimer(motor_interrupt_left, motor_hardware_left); diff --git a/head/simulator/main.cpp b/head/simulator/main.cpp index bb2c03b63..907f60bdb 100644 --- a/head/simulator/main.cpp +++ b/head/simulator/main.cpp @@ -94,8 +94,9 @@ static stall_check::StallCheck stallcheck_right( linear_config.get_usteps_per_mm() / 1000.0F, utils::STALL_THRESHOLD_UM); static motor_handler::MotorInterruptHandler motor_interrupt_right( - motor_queue_right, head_tasks::get_right_queues(), head_tasks::get_right_queues(), motor_interface_right, - stallcheck_right, update_position_queue_right); + motor_queue_right, head_tasks::get_right_queues(), + head_tasks::get_right_queues(), motor_interface_right, stallcheck_right, + update_position_queue_right); static stall_check::StallCheck stallcheck_left( linear_config.get_encoder_pulses_per_mm() / 1000.0F, @@ -117,8 +118,9 @@ static motor_class::Motor motor_right{ motor_queue_right, update_position_queue_right}; static motor_handler::MotorInterruptHandler motor_interrupt_left( - motor_queue_left, head_tasks::get_left_queues(), head_tasks::get_left_queues(), motor_interface_left, - stallcheck_left, update_position_queue_left); + motor_queue_left, head_tasks::get_left_queues(), + head_tasks::get_left_queues(), motor_interface_left, stallcheck_left, + update_position_queue_left); static motor_class::Motor motor_left{ motor_sys_config, motor_interface_left, diff --git a/include/can/core/message_handlers/motion.hpp b/include/can/core/message_handlers/motion.hpp index 7434a5fab..b01ad0e9d 100644 --- a/include/can/core/message_handlers/motion.hpp +++ b/include/can/core/message_handlers/motion.hpp @@ -17,8 +17,8 @@ class MotionHandler { std::variant; + UpdateMotorPositionEstimationRequest, GetMotorUsageRequest, + MotorDriverErrorEncountered>; MotionHandler(MotionTaskClient &motion_client) : motion_client{motion_client} {} diff --git a/include/can/core/messages.hpp b/include/can/core/messages.hpp index 30668c1d7..60c2decb5 100644 --- a/include/can/core/messages.hpp +++ b/include/can/core/messages.hpp @@ -198,7 +198,8 @@ using MotorPositionRequest = Empty; using UpdateMotorPositionEstimationRequest = Empty; -using MotorDriverErrorEncountered = Empty; +using MotorDriverErrorEncountered = + Empty; struct WriteToEEPromRequest : BaseMessage { uint32_t message_index; diff --git a/include/gantry/core/interfaces_proto.hpp b/include/gantry/core/interfaces_proto.hpp index d5da7f710..264c3fd6e 100644 --- a/include/gantry/core/interfaces_proto.hpp +++ b/include/gantry/core/interfaces_proto.hpp @@ -14,7 +14,7 @@ extern "C" typedef void (*diag0_handler)(void); /** * Initialize the hardware portability layer. */ -void initialize(diag0_handler* call_diag0_handler); +void initialize(diag0_handler *call_diag0_handler); /** * Get the CAN bus interface. diff --git a/include/gantry/core/interfaces_rev1.hpp b/include/gantry/core/interfaces_rev1.hpp index db4aba4af..fd5af0640 100644 --- a/include/gantry/core/interfaces_rev1.hpp +++ b/include/gantry/core/interfaces_rev1.hpp @@ -14,7 +14,7 @@ extern "C" typedef void (*diag0_handler)(void); /** * Initialize the hardware portability layer. */ -void initialize(diag0_handler* call_diag0_handler); +void initialize(diag0_handler *call_diag0_handler); /** * Get the CAN bus interface. diff --git a/include/gantry/core/tasks_proto.hpp b/include/gantry/core/tasks_proto.hpp index 0e439b6b3..8fe6846d4 100644 --- a/include/gantry/core/tasks_proto.hpp +++ b/include/gantry/core/tasks_proto.hpp @@ -36,7 +36,8 @@ auto start_tasks( tmc2130::configs::TMC2130DriverConfig& driver_configs, motor_hardware_task::MotorHardwareTask& mh_tsk, i2c::hardware::I2CBase& i2c2, - eeprom::hardware_iface::EEPromHardwareIface& eeprom_hw_iface) -> interfaces::diag0_handler; + eeprom::hardware_iface::EEPromHardwareIface& eeprom_hw_iface) + -> interfaces::diag0_handler; void call_run_diag0_interrupt(); diff --git a/include/gantry/core/tasks_rev1.hpp b/include/gantry/core/tasks_rev1.hpp index 567e2f181..ea086c412 100644 --- a/include/gantry/core/tasks_rev1.hpp +++ b/include/gantry/core/tasks_rev1.hpp @@ -36,7 +36,8 @@ auto start_tasks( tmc2160::configs::TMC2160DriverConfig& driver_configs, motor_hardware_task::MotorHardwareTask& mh_tsk, i2c::hardware::I2CBase& i2c2, - eeprom::hardware_iface::EEPromHardwareIface& eeprom_hw_iface) -> interfaces::diag0_handler; + eeprom::hardware_iface::EEPromHardwareIface& eeprom_hw_iface) + -> interfaces::diag0_handler; void call_run_diag0_interrupt(); diff --git a/include/motor-control/core/brushed_motor/brushed_motion_controller.hpp b/include/motor-control/core/brushed_motor/brushed_motion_controller.hpp index 449965b92..0c57df98f 100644 --- a/include/motor-control/core/brushed_motor/brushed_motion_controller.hpp +++ b/include/motor-control/core/brushed_motor/brushed_motion_controller.hpp @@ -101,7 +101,8 @@ class MotionController { enabled = false; } - void stop(can::ids::ErrorSeverity error_severity = can::ids::ErrorSeverity::warning) { + void stop(can::ids::ErrorSeverity error_severity = + can::ids::ErrorSeverity::warning) { queue.reset(); // if we're gripping something we need to flag this so we don't drop it if (!hardware.get_stay_enabled()) { diff --git a/include/motor-control/core/stepper_motor/motion_controller.hpp b/include/motor-control/core/stepper_motor/motion_controller.hpp index c49ff0353..75badedf8 100644 --- a/include/motor-control/core/stepper_motor/motion_controller.hpp +++ b/include/motor-control/core/stepper_motor/motion_controller.hpp @@ -107,7 +107,8 @@ class MotionController { return update_queue.try_write(can_msg); } - void stop(can::ids::ErrorSeverity error_severity = can::ids::ErrorSeverity::warning) { + void stop(can::ids::ErrorSeverity error_severity = + can::ids::ErrorSeverity::warning) { queue.reset(); if (hardware.is_timer_interrupt_running()) { hardware.request_cancel(static_cast(error_severity)); @@ -262,7 +263,8 @@ class PipetteMotionController { return false; } - void stop(can::ids::ErrorSeverity error_severity = can::ids::ErrorSeverity::warning) { + void stop(can::ids::ErrorSeverity error_severity = + can::ids::ErrorSeverity::warning) { queue.reset(); // if the timer interrupt is running, cancel it. if it isn't running, // don't submit a cancel because then the cancel won't be read until diff --git a/include/motor-control/core/stepper_motor/motor_interrupt_handler.hpp b/include/motor-control/core/stepper_motor/motor_interrupt_handler.hpp index 0906849f2..cf870597a 100644 --- a/include/motor-control/core/stepper_motor/motor_interrupt_handler.hpp +++ b/include/motor-control/core/stepper_motor/motor_interrupt_handler.hpp @@ -42,8 +42,8 @@ using namespace motor_messages; * Note: The position tracker should never be allowed to go below zero. */ -template