Skip to content

Commit

Permalink
fix(pipettes): changes to enable the correct sync line ports for the …
Browse files Browse the repository at this point in the history
…96-channel (#728)
  • Loading branch information
ahiuchingau authored Oct 4, 2023
1 parent 982f0ab commit 25a8e1d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/sensors/core/tasks/pressure_driver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 4 additions & 2 deletions pipettes/firmware/utility_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

Expand Down Expand Up @@ -156,7 +158,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};
Expand All @@ -168,7 +170,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;
Expand Down

0 comments on commit 25a8e1d

Please sign in to comment.