1
+ #pragma once
2
+
3
+ #include " motor-control/core/stepper_motor/motor_interrupt_handler.hpp"
4
+ #include " pipettes/core/sensor_tasks.hpp"
5
+
6
+ namespace pipettes {
7
+ using namespace motor_messages ;
8
+ template <template <class > class QueueImpl , class StatusClient ,
9
+ typename MotorMoveMessage, typename MotorHardware, class SensorClient >
10
+ requires MessageQueue<QueueImpl<MotorMoveMessage>, MotorMoveMessage> &&
11
+ std::is_base_of_v<motor_hardware::MotorHardwareIface, MotorHardware>
12
+ class PipetteMotorInterruptHandler
13
+ : public motor_handler::MotorInterruptHandler<
14
+ freertos_message_queue::FreeRTOSMessageQueue, StatusClient,
15
+ MotorMoveMessage, MotorHardware> {
16
+ public:
17
+ using MoveQueue = QueueImpl<MotorMoveMessage>;
18
+ using InterruptHandler = motor_handler::MotorInterruptHandler<
19
+ freertos_message_queue::FreeRTOSMessageQueue, StatusClient,
20
+ MotorMoveMessage, MotorHardware>;
21
+ using UpdatePositionQueue =
22
+ QueueImpl<can::messages::UpdateMotorPositionEstimationRequest>;
23
+ PipetteMotorInterruptHandler () = delete ;
24
+ PipetteMotorInterruptHandler (
25
+ MoveQueue& incoming_move_queue, StatusClient& outgoing_queue,
26
+ MotorHardware& hardware_iface, stall_check::StallCheck& stall,
27
+ UpdatePositionQueue& incoming_update_position_queue,
28
+ SensorClient& sensor_queue_client)
29
+ : sensor_client(sensor_queue_client),
30
+ InterruptHandler (incoming_move_queue, outgoing_queue, hardware_iface,
31
+ stall, incoming_update_position_queue) {}
32
+
33
+ ~PipetteMotorInterruptHandler () = default ;
34
+
35
+ auto operator =(PipetteMotorInterruptHandler&)
36
+ -> PipetteMotorInterruptHandler& = delete ;
37
+
38
+ auto operator =(PipetteMotorInterruptHandler&&)
39
+ -> PipetteMotorInterruptHandler&& = delete ;
40
+
41
+ PipetteMotorInterruptHandler (PipetteMotorInterruptHandler&) = delete;
42
+
43
+ PipetteMotorInterruptHandler (PipetteMotorInterruptHandler&&) = delete;
44
+
45
+ // might be able to overwrite functions in here
46
+
47
+ private:
48
+ SensorClient& sensor_client;
49
+ };
50
+ } // namespace pipettes
0 commit comments