Skip to content

Commit

Permalink
cast buffer size to int
Browse files Browse the repository at this point in the history
  • Loading branch information
caila-marashaj committed Jun 13, 2024
1 parent 856ea88 commit 22acb24
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions include/sensors/core/tasks/pressure_driver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,12 +289,10 @@ class MMR920 {
}

void send_accumulated_sensor_data(uint32_t message_index) {
if (SENSOR_BUFFER_SIZE == 0) {
return;
}
for (size_t i = 0; i < SENSOR_BUFFER_SIZE; i++) {
for (int i = 0; i < static_cast<int>(SENSOR_BUFFER_SIZE); i++) {
// send over buffer and then clear buffer values
int current_index = (i + sensor_buffer_index) % SENSOR_BUFFER_SIZE;
// NOLINTNEXTLINE(div-by-zero)
int current_index = (i + sensor_buffer_index) % static_cast<int>(SENSOR_BUFFER_SIZE);

can_client.send_can_message(
can::ids::NodeId::host,
Expand Down

0 comments on commit 22acb24

Please sign in to comment.