From 0de3700a4a0f1d0e128b8b8706dceb32d67f9f38 Mon Sep 17 00:00:00 2001 From: Caila Marashaj <98041399+caila-marashaj@users.noreply.github.com> Date: Wed, 26 Jun 2024 11:45:37 -0400 Subject: [PATCH] refactor(sensors): rename shared-sensor to using-both-sensors (#787) --- include/sensors/core/tasks/capacitive_driver.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/sensors/core/tasks/capacitive_driver.hpp b/include/sensors/core/tasks/capacitive_driver.hpp index 7e890a16b..21efa5164 100644 --- a/include/sensors/core/tasks/capacitive_driver.hpp +++ b/include/sensors/core/tasks/capacitive_driver.hpp @@ -41,14 +41,15 @@ class FDC1004 { public: FDC1004(I2CQueueWriter &writer, I2CQueuePoller &poller, CanClient &can_client, OwnQueue &own_queue, - sensors::hardware::SensorHardwareBase &hardware, bool shared_sensor, + sensors::hardware::SensorHardwareBase &hardware, + bool using_both_sensors, std::array *sensor_buffer) : writer(writer), poller(poller), can_client(can_client), own_queue(own_queue), hardware(hardware), - shared_sensor(shared_sensor), + using_both_sensors(using_both_sensors), sensor_buffer(sensor_buffer) {} [[nodiscard]] auto initialized() const -> bool { return _initialized; } @@ -82,7 +83,7 @@ class FDC1004 { auto get_sensor_id() -> can::ids::SensorId { return sensor_id; } auto set_sensor_id(can::ids::SensorId _id) -> void { - if (shared_sensor && sensor_id != _id) { + if (using_both_sensors && sensor_id != _id) { if (_id == can::ids::SensorId::S1) { measure_mode = fdc1004::MeasureConfigMode::TWO; } else { @@ -398,7 +399,7 @@ class FDC1004 { fdc1004::MeasureConfigMode measure_mode = fdc1004::MeasureConfigMode::ONE; fdc1004::MeasurementRate measurement_rate = fdc1004::MeasurementRate::ONE_HUNDRED_SAMPLES_PER_SECOND; - bool shared_sensor = false; + bool using_both_sensors = false; float current_offset_pf = 0; float zero_threshold_pf = 30;