From f40cddb721b0779f7e7a323062126c8a0e6870bf Mon Sep 17 00:00:00 2001 From: ahiuchingau <20424172+ahiuchingau@users.noreply.github.com> Date: Mon, 2 Oct 2023 16:24:28 -0400 Subject: [PATCH 1/4] report internal threshold --- include/sensors/core/tasks/pressure_driver.hpp | 2 +- pipettes/firmware/utility_gpio.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/sensors/core/tasks/pressure_driver.hpp b/include/sensors/core/tasks/pressure_driver.hpp index 7e4540814..4d7a95992 100644 --- a/include/sensors/core/tasks/pressure_driver.hpp +++ b/include/sensors/core/tasks/pressure_driver.hpp @@ -404,7 +404,7 @@ class MMR920C04 { .offset_average = pressure_fixed_point}); set_threshold(current_pressure_baseline_pa, can::ids::SensorThresholdMode::auto_baseline, - m.message_index, false); + m.message_index, true); } else { auto message = can::messages::ReadFromSensorResponse{ .message_index = m.message_index, diff --git a/pipettes/firmware/utility_gpio.c b/pipettes/firmware/utility_gpio.c index aea32ed6d..e35d38856 100644 --- a/pipettes/firmware/utility_gpio.c +++ b/pipettes/firmware/utility_gpio.c @@ -156,7 +156,7 @@ static void sync_drive_gpio_init() { PipetteHardwarePin sync_in_hardware = pipette_hardware_get_gpio(pipette_type, pipette_hardware_device_sync_in); /* GPIO Ports Clock Enable */ - enable_gpio_port(GPIOB); + enable_gpio_port(sync_in_hardware.port); /*Configure GPIO pin*/ GPIO_InitTypeDef sync_in_init = {0}; @@ -168,7 +168,7 @@ static void sync_drive_gpio_init() { PipetteHardwarePin sync_out_hardware = pipette_hardware_get_gpio(pipette_type, pipette_hardware_device_sync_out); - enable_gpio_port(GPIOC); + enable_gpio_port(sync_out_hardware.port); GPIO_InitTypeDef sync_out_init = {0}; sync_out_init.Pin = sync_out_hardware.pin; From b12a69ad49260272191333068a00d6659bf0e8b7 Mon Sep 17 00:00:00 2001 From: ahiuchingau <20424172+ahiuchingau@users.noreply.github.com> Date: Mon, 2 Oct 2023 18:59:38 -0400 Subject: [PATCH 2/4] report correct sensor type --- include/sensors/core/tasks/pressure_driver.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sensors/core/tasks/pressure_driver.hpp b/include/sensors/core/tasks/pressure_driver.hpp index 4d7a95992..3385c51da 100644 --- a/include/sensors/core/tasks/pressure_driver.hpp +++ b/include/sensors/core/tasks/pressure_driver.hpp @@ -400,7 +400,7 @@ class MMR920C04 { can::ids::NodeId::host, can::messages::BaselineSensorResponse{ .message_index = m.message_index, - .sensor = can::ids::SensorType::pressure_temperature, + .sensor = can::ids::SensorType::pressure, .offset_average = pressure_fixed_point}); set_threshold(current_pressure_baseline_pa, can::ids::SensorThresholdMode::auto_baseline, From e0d54f13bcd7ef8d97531e97c3d9e1f893ea4e83 Mon Sep 17 00:00:00 2001 From: ahiuchingau <20424172+ahiuchingau@users.noreply.github.com> Date: Tue, 3 Oct 2023 14:27:03 -0400 Subject: [PATCH 3/4] enabling GPIOD clock for 96-chan sync out --- pipettes/firmware/utility_gpio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pipettes/firmware/utility_gpio.c b/pipettes/firmware/utility_gpio.c index e35d38856..2d10c5ec5 100644 --- a/pipettes/firmware/utility_gpio.c +++ b/pipettes/firmware/utility_gpio.c @@ -12,6 +12,8 @@ static void enable_gpio_port(void* port) { __HAL_RCC_GPIOB_CLK_ENABLE(); } else if (port == GPIOC) { __HAL_RCC_GPIOC_CLK_ENABLE(); + } else if (port == GPIOD) { + __HAL_RCC_GPIOD_CLK_ENABLE(); } } From 82585328c4c1febe00bb4e3ff38b9bc722f3d6e2 Mon Sep 17 00:00:00 2001 From: ahiuchingau <20424172+ahiuchingau@users.noreply.github.com> Date: Tue, 3 Oct 2023 17:13:44 -0400 Subject: [PATCH 4/4] do not need to report --- include/sensors/core/tasks/pressure_driver.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sensors/core/tasks/pressure_driver.hpp b/include/sensors/core/tasks/pressure_driver.hpp index 3385c51da..5b3a62d4b 100644 --- a/include/sensors/core/tasks/pressure_driver.hpp +++ b/include/sensors/core/tasks/pressure_driver.hpp @@ -404,7 +404,7 @@ class MMR920C04 { .offset_average = pressure_fixed_point}); set_threshold(current_pressure_baseline_pa, can::ids::SensorThresholdMode::auto_baseline, - m.message_index, true); + m.message_index, false); } else { auto message = can::messages::ReadFromSensorResponse{ .message_index = m.message_index,