Skip to content

Commit

Permalink
fix simulators
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanthecoder committed Jun 4, 2024
1 parent 77dce9e commit c19f5e2
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 11 deletions.
3 changes: 1 addition & 2 deletions include/pipettes/simulator/interfaces.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ auto get_interrupt_driver(
LowThroughputInterruptQueues& queues,
MotorInterruptHandlerType<linear_motor_tasks::QueueClient>& handler)
-> motor_interrupt_driver::MotorInterruptDriver<
linear_motor_tasks::QueueClient,
linear_motor_tasks::tmc2130_driver::QueueClient, motor_messages::Move,
linear_motor_tasks::QueueClient, motor_messages::Move,
sim_motor_hardware_iface::SimMotorHardwareIface>;

auto get_interrupt_driver(
Expand Down
25 changes: 20 additions & 5 deletions pipettes/simulator/interfaces.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ auto linear_motor::get_interrupt(
auto linear_motor::get_interrupt(
sim_motor_hardware_iface::SimMotorHardwareIface& hw,
HighThroughputInterruptQueues& queues, stall_check::StallCheck& stall)
-> MotorInterruptHandlerType<
linear_motor_tasks::QueueClient,
linear_motor_tasks::tmc2160_driver::QueueClient> {
-> MotorInterruptHandlerType<linear_motor_tasks::QueueClient> {
return motor_handler::MotorInterruptHandler(
queues.plunger_queue, linear_motor_tasks::get_queues(), hw, stall,
queues.plunger_update_queue);
Expand All @@ -77,8 +75,25 @@ auto linear_motor::get_interrupt_driver(
linear_motor_tasks::QueueClient, motor_messages::Move,
sim_motor_hardware_iface::SimMotorHardwareIface> {
#endif
return motor_interrupt_driver::MotorInterruptDriver(queue, handler, hw,
update_queue);
return motor_interrupt_driver::MotorInterruptDriver(
queues.plunger_queue, handler, hw, queues.plunger_update_queue);
}

auto linear_motor::get_interrupt_driver(
sim_motor_hardware_iface::SimMotorHardwareIface& hw,
HighThroughputInterruptQueues& queues,
MotorInterruptHandlerType<linear_motor_tasks::QueueClient>& handler)
#ifdef USE_SENSOR_MOVE
-> motor_interrupt_driver::MotorInterruptDriver<
linear_motor_tasks::QueueClient, motor_messages::SensorSyncMove,
sim_motor_hardware_iface::SimMotorHardwareIface> {
#else
-> motor_interrupt_driver::MotorInterruptDriver<
linear_motor_tasks::QueueClient, motor_messages::Move,
sim_motor_hardware_iface::SimMotorHardwareIface> {
#endif
return motor_interrupt_driver::MotorInterruptDriver(
queues.plunger_queue, handler, hw, queues.plunger_update_queue);
}

auto linear_motor::get_motor_hardware()
Expand Down
6 changes: 2 additions & 4 deletions pipettes/simulator/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,10 @@ static auto gear_stall_check = interfaces::gear_motor::GearStallCheck{
static auto linear_motor_hardware =
interfaces::linear_motor::get_motor_hardware();
static auto plunger_interrupt = interfaces::linear_motor::get_interrupt(
linear_motor_hardware, interrupt_queues.plunger_queue, linear_stall_check,
interrupt_queues.plunger_update_queue);
linear_motor_hardware, interrupt_queues, linear_stall_check);
static auto plunger_interrupt_driver =
interfaces::linear_motor::get_interrupt_driver(
linear_motor_hardware, interrupt_queues.plunger_queue,
plunger_interrupt, interrupt_queues.plunger_update_queue);
linear_motor_hardware, interrupt_queues, plunger_interrupt);
static auto linear_motion_control =
interfaces::linear_motor::get_motion_control(linear_motor_hardware,
interrupt_queues);
Expand Down

0 comments on commit c19f5e2

Please sign in to comment.