Skip to content

Commit 9009956

Browse files
committed
format
1 parent 84b4afb commit 9009956

File tree

5 files changed

+29
-24
lines changed

5 files changed

+29
-24
lines changed

include/can/core/messages.hpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ using ReadLimitSwitchRequest = Empty<MessageId::limit_sw_request>;
226226

227227
using MotorPositionRequest = Empty<MessageId::motor_position_request>;
228228

229-
using IncreaseEvoDispenseRequest = Empty<MessageId::increase_evo_disp_count_request>;
229+
using IncreaseEvoDispenseRequest =
230+
Empty<MessageId::increase_evo_disp_count_request>;
230231

231232
using UpdateMotorPositionEstimationRequest =
232233
Empty<MessageId::update_motor_position_estimation_request>;

include/motor-control/core/tasks/messages.hpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ using MotionControlTaskMessage = std::variant<
1616
can::messages::HomeRequest,
1717
can::messages::UpdateMotorPositionEstimationRequest,
1818
can::messages::GetMotorUsageRequest, can::messages::MotorStatusRequest,
19-
can::messages::AddSensorMoveRequest, can::messages::IncreaseEvoDispenseRequest>;
19+
can::messages::AddSensorMoveRequest,
20+
can::messages::IncreaseEvoDispenseRequest>;
2021

2122
using MoveGroupTaskMessage =
2223
std::variant<std::monostate, can::messages::AddLinearMoveRequest,

include/motor-control/core/tasks/motion_controller_task.hpp

+11-6
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,11 @@ class MotionControllerMessageHandler {
137137
}
138138

139139
void handle(const can::messages::IncreaseEvoDispenseRequest& m) {
140-
// We should never have a key = 0 if we're in this define but just in case
141-
if (evo_disp_count_key == 0) { return; }
140+
// We should never have a key = 0 if we're in this define but just in
141+
// case
142+
if (evo_disp_count_key == 0) {
143+
return;
144+
}
142145
auto message =
143146
usage_messages::IncreaseErrorCount{.key = evo_disp_count_key};
144147
usage_client.send_usage_storage_queue(message);
@@ -225,8 +228,10 @@ class MotionControllerTask {
225228
public:
226229
using Messages = TaskMessage;
227230
using QueueType = QueueImpl<TaskMessage>;
228-
MotionControllerTask(QueueType& queue, uint16_t evo_disp_count_key) : queue{queue}, evo_disp_count_key{evo_disp_count_key} {}
229-
MotionControllerTask(QueueType& queue) : queue{queue}, evo_disp_count_key{0} {}
231+
MotionControllerTask(QueueType& queue, uint16_t evo_disp_count_key)
232+
: queue{queue}, evo_disp_count_key{evo_disp_count_key} {}
233+
MotionControllerTask(QueueType& queue)
234+
: queue{queue}, evo_disp_count_key{0} {}
230235
MotionControllerTask(const MotionControllerTask& c) = delete;
231236
MotionControllerTask(const MotionControllerTask&& c) = delete;
232237
auto operator=(const MotionControllerTask& c) = delete;
@@ -242,8 +247,8 @@ class MotionControllerTask {
242247
[[noreturn]] void operator()(
243248
motion_controller::MotionController<MEConfig>* controller,
244249
CanClient* can_client, UsageClient* usage_client) {
245-
auto handler = MotionControllerMessageHandler{*controller, *can_client,
246-
*usage_client, evo_disp_count_key};
250+
auto handler = MotionControllerMessageHandler{
251+
*controller, *can_client, *usage_client, evo_disp_count_key};
247252
TaskMessage message{};
248253
bool first_run = true;
249254
for (;;) {

pipettes/core/linear_motor_tasks.cpp

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#include "pipettes/core/linear_motor_tasks.hpp"
22

33
#include "common/core/freertos_task.hpp"
4+
#include "pipettes/core/pipette_type.h"
45
#include "pipettes/core/sensor_tasks.hpp"
56
#include "pipettes/firmware/eeprom_keys.hpp"
6-
#include "pipettes/core/pipette_type.h"
77

88
static auto motion_tasks = linear_motor_tasks::Tasks{};
99
static auto motion_queue_client = linear_motor_tasks::QueueClient{};
@@ -16,11 +16,10 @@ static auto tmc2160_tasks = linear_motor_tasks::tmc2160_driver::Tasks{};
1616
static auto tmc2160_queue_client =
1717
linear_motor_tasks::tmc2160_driver::QueueClient{};
1818

19-
static auto mc_task_builder =
20-
freertos_task::TaskStarter<256,
21-
motion_controller_task::MotionControllerTask, uint16_t>{get_pipette_type() == NINETY_SIX_CHANNEL
22-
? OVERPRESSURE_COUNT_KEY_96
23-
: OVERPRESSURE_COUNT_KEY_SM};
19+
static auto mc_task_builder = freertos_task::TaskStarter<
20+
256, motion_controller_task::MotionControllerTask, uint16_t>{
21+
get_pipette_type() == NINETY_SIX_CHANNEL ? OVERPRESSURE_COUNT_KEY_96
22+
: OVERPRESSURE_COUNT_KEY_SM};
2423
static auto tmc2130_driver_task_builder =
2524
freertos_task::TaskStarter<256, tmc2130::tasks::MotorDriverTask>{};
2625
static auto tmc2160_driver_task_builder =

pipettes/firmware/interfaces.cpp

+9-10
Original file line numberDiff line numberDiff line change
@@ -87,20 +87,19 @@ struct motor_hardware::UsageEEpromConfig plunger_usage_config {
8787
.type_key =
8888
uint16_t(can::ids::MotorUsageValueType::total_error_count),
8989
.length = usage_storage_task::error_count_usage_len},
90+
UsageRequestSet{
91+
.eeprom_key = get_pipette_type() == NINETY_SIX_CHANNEL
92+
? OVERPRESSURE_COUNT_KEY_96
93+
: OVERPRESSURE_COUNT_KEY_SM,
94+
.type_key = uint16_t(
95+
can::ids::MotorUsageValueType::overpressure_error_count),
96+
.length = usage_storage_task::error_count_usage_len},
9097
UsageRequestSet {
91-
.eeprom_key = get_pipette_type() == NINETY_SIX_CHANNEL
92-
? OVERPRESSURE_COUNT_KEY_96
93-
: OVERPRESSURE_COUNT_KEY_SM,
94-
.type_key = uint16_t(
95-
can::ids::MotorUsageValueType::overpressure_error_count),
96-
.length = usage_storage_task::error_count_usage_len
97-
},
98-
UsageRequestSet {
9998
.eeprom_key = get_pipette_type() == NINETY_SIX_CHANNEL
10099
? EVOTIP_DISPENSEC_COUNT_KEY_96
101100
: EVOTIP_DISPENSEC_COUNT_KEY_SM,
102-
.type_key =
103-
uint16_t(can::ids::MotorUsageValueType::resin_tip_dispense_count),
101+
.type_key = uint16_t(
102+
can::ids::MotorUsageValueType::resin_tip_dispense_count),
104103
.length = usage_storage_task::error_count_usage_len
105104
}
106105
}

0 commit comments

Comments
 (0)