Skip to content

Commit

Permalink
fixed build issues stemming from removal of motor driver error surfac…
Browse files Browse the repository at this point in the history
…ing branch
  • Loading branch information
pmoegenburg committed May 31, 2024
1 parent eacd462 commit 60b7cc1
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 27 deletions.
2 changes: 1 addition & 1 deletion gripper/firmware/interfaces_z_motor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ static motor_class::Motor z_motor{
*/
static motor_handler::MotorInterruptHandler motor_interrupt(
motor_queue, gripper_tasks::z_tasks::get_queues(),
gripper_tasks::z_tasks::get_queues(), motor_hardware_iface, stallcheck,
motor_hardware_iface, stallcheck,
update_position_queue, gripper_tasks::get_main_queues());

static auto encoder_background_timer =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "motor-control/core/motor_messages.hpp"
#include "motor-control/core/stall_check.hpp"
#include "motor-control/core/tasks/move_status_reporter_task.hpp"
#include "motor-control/core/tasks/tmc_motor_driver_common.hpp"

namespace motor_handler {

Expand Down Expand Up @@ -95,7 +94,7 @@ struct SensorClientHelper<Empty> {
};

template <template <class> class QueueImpl, class StatusClient,
class DriverClient, typename MotorMoveMessage, typename MotorHardware,
typename MotorMoveMessage, typename MotorHardware,
class SensorClient = Empty>
requires MessageQueue<QueueImpl<MotorMoveMessage>, MotorMoveMessage> &&
std::is_base_of_v<motor_hardware::MotorHardwareIface, MotorHardware>
Expand All @@ -111,11 +110,10 @@ class MotorInterruptHandler {
stall_check::StallCheck& stall,
UpdatePositionQueue& incoming_update_position_queue)
: MotorInterruptHandler(
incoming_move_queue, outgoing_queue, driver_queue, hardware_iface,
incoming_move_queue, outgoing_queue, hardware_iface,
stall, incoming_update_position_queue, Empty::get_default()) {}
MotorInterruptHandler(MoveQueue& incoming_move_queue,
StatusClient& outgoing_queue,
DriverClient& driver_queue,
MotorHardware& hardware_iface,
stall_check::StallCheck& stall,
UpdatePositionQueue& incoming_update_position_queue,
Expand Down
14 changes: 6 additions & 8 deletions include/pipettes/firmware/interfaces.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
namespace interfaces {

#ifdef USE_SENSOR_MOVE
template <typename Client, typename DriverClient>
template <typename Client>
using MotorInterruptHandlerType = motor_handler::MotorInterruptHandler<
freertos_message_queue::FreeRTOSMessageQueue, Client, DriverClient,
freertos_message_queue::FreeRTOSMessageQueue, Client
motor_messages::SensorSyncMove, motor_hardware::MotorHardware,
sensor_tasks::QueueClient>;
#else
template <typename Client, typename DriverClient>
template <typename Client>
using MotorInterruptHandlerType = motor_handler::MotorInterruptHandler<
freertos_message_queue::FreeRTOSMessageQueue, Client, DriverClient,
freertos_message_queue::FreeRTOSMessageQueue, Client,
motor_messages::Move, motor_hardware::MotorHardware,
sensor_tasks::QueueClient>;
#endif
Expand Down Expand Up @@ -79,15 +79,13 @@ auto get_interrupt(motor_hardware::MotorHardware& hw,
stall_check::StallCheck& stall,
sensor_tasks::QueueClient& sensor_client)
-> MotorInterruptHandlerType<
linear_motor_tasks::QueueClient,
linear_motor_tasks::tmc2130_driver::QueueClient>;
linear_motor_tasks::QueueClient>;
auto get_interrupt(motor_hardware::MotorHardware& hw,
HighThroughputInterruptQueues& queues,
stall_check::StallCheck& stall,
sensor_tasks::QueueClient& sensor_client)
-> MotorInterruptHandlerType<
linear_motor_tasks::QueueClient,
linear_motor_tasks::tmc2160_driver::QueueClient>;
linear_motor_tasks::QueueClient>;
auto get_motor_hardware(motor_configs::LowThroughputPipetteMotorHardware pins)
-> motor_hardware::MotorHardware;
auto get_motor_hardware(motor_configs::HighThroughputPipetteMotorHardware pins)
Expand Down
14 changes: 6 additions & 8 deletions include/pipettes/firmware/interfaces_g4.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@
namespace interfaces {

#ifdef USE_SENSOR_MOVE
template <typename Client, typename DriverClient>
template <typename Client>
using MotorInterruptHandlerType = motor_handler::MotorInterruptHandler<
freertos_message_queue::FreeRTOSMessageQueue, Client, DriverClient,
freertos_message_queue::FreeRTOSMessageQueue, Client,
motor_messages::SensorSyncMove, motor_hardware::MotorHardware,
sensor_tasks::QueueClient>;
#else
template <typename Client, typename DriverClient>
template <typename Client>
using MotorInterruptHandlerType = motor_handler::MotorInterruptHandler<
freertos_message_queue::FreeRTOSMessageQueue, Client, DriverClient,
freertos_message_queue::FreeRTOSMessageQueue, Client,
motor_messages::Move, motor_hardware::MotorHardware,
sensor_tasks::QueueClient>;
#endif
Expand Down Expand Up @@ -88,15 +88,13 @@ auto get_interrupt(motor_hardware::MotorHardware& hw,
stall_check::StallCheck& stall,
sensor_tasks::QueueClient& sensor_client)
-> MotorInterruptHandlerType<
linear_motor_tasks::QueueClient,
linear_motor_tasks::tmc2130_driver::QueueClient>;
linear_motor_tasks::QueueClient>;
auto get_interrupt(motor_hardware::MotorHardware& hw,
HighThroughputInterruptQueues& queues,
stall_check::StallCheck& stall,
sensor_tasks::QueueClient& sensor_client)
-> MotorInterruptHandlerType<
linear_motor_tasks::QueueClient,
linear_motor_tasks::tmc2160_driver::QueueClient>;
linear_motor_tasks::QueueClient>;
auto get_motor_hardware(motor_hardware::HardwareConfig pins)
-> motor_hardware::MotorHardware;
auto get_motion_control(motor_hardware::MotorHardware& hw,
Expand Down
10 changes: 4 additions & 6 deletions pipettes/firmware/interfaces.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,10 @@ auto linear_motor::get_interrupt(motor_hardware::MotorHardware& hw,
stall_check::StallCheck& stall,
sensor_tasks::QueueClient& sensor_client)
-> MotorInterruptHandlerType<
linear_motor_tasks::QueueClient,
linear_motor_tasks::tmc2130_driver::QueueClient> {
linear_motor_tasks::QueueClient> {
return motor_handler::MotorInterruptHandler(
queues.plunger_queue, linear_motor_tasks::get_queues(),
linear_motor_tasks::tmc2130_driver::get_queues(), hw, stall,
hw, stall,
queues.plunger_update_queue, sensor_client);
}

Expand All @@ -73,11 +72,10 @@ auto linear_motor::get_interrupt(motor_hardware::MotorHardware& hw,
stall_check::StallCheck& stall,
sensor_tasks::QueueClient& sensor_client)
-> MotorInterruptHandlerType<
linear_motor_tasks::QueueClient,
linear_motor_tasks::tmc2160_driver::QueueClient> {
linear_motor_tasks::QueueClient> {
return motor_handler::MotorInterruptHandler(
queues.plunger_queue, linear_motor_tasks::get_queues(),
linear_motor_tasks::tmc2160_driver::get_queues(), hw, stall,
hw, stall,
queues.plunger_update_queue, sensor_client);
}

Expand Down

0 comments on commit 60b7cc1

Please sign in to comment.