Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanthecoder committed Jun 3, 2024
1 parent 269b592 commit 653afd1
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions include/sensors/core/tasks/pressure_driver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,22 +365,21 @@ class MMR920 {

if (echo_this_time) {
auto response_pressure =
std::fabs(pressure) -
std::fabs(current_pressure_baseline_pa);
std::fabs(pressure) - std::fabs(current_pressure_baseline_pa);
#ifdef USE_PRESSURE_MOVE
if (pressure_buffer_index < PRESSURE_SENSOR_BUFFER_SIZE) {
if (pressure_buffer_index < PRESSURE_SENSOR_BUFFER_SIZE) {
(*p_buff).at(pressure_buffer_index) = response_pressure;
pressure_buffer_index++;
}
#else
can_client.send_can_message(
can::ids::NodeId::host,
can::messages::ReadFromSensorResponse{
.message_index = m.message_index,
.sensor = can::ids::SensorType::pressure,
.sensor_id = sensor_id,
.sensor_data = mmr920::reading_to_fixed_point(
response_pressure)});
can_client.send_can_message(
can::ids::NodeId::host,
can::messages::ReadFromSensorResponse{
.message_index = m.message_index,
.sensor = can::ids::SensorType::pressure,
.sensor_id = sensor_id,
.sensor_data =
mmr920::reading_to_fixed_point(response_pressure)});
#endif
}
}
Expand Down

0 comments on commit 653afd1

Please sign in to comment.