Skip to content

Commit

Permalink
SITL: give crc functions crc[N]_ prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
tpwrules committed Jun 22, 2024
1 parent e5c2955 commit 030ccb9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libraries/SITL/SIM_RF_Lanbao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ uint32_t RF_Lanbao::packet_for_alt(uint16_t alt_cm, uint8_t *buffer, uint8_t buf
buffer[2] = (alt_cm * 10) >> 8;
buffer[3] = (alt_cm * 10) & 0xff;

const uint16_t crc = calc_crc_modbus(buffer, 4);
const uint16_t crc = crc_modbus(buffer, 4);
buffer[4] = crc & 0xff;
buffer[5] = crc >> 8;

Expand Down
2 changes: 1 addition & 1 deletion libraries/SITL/SIM_RF_LeddarOne.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ uint32_t RF_LeddarOne::packet_for_alt(uint16_t alt_cm, uint8_t *buffer, uint8_t
buffer[21] = third_amplitude >> 8;
buffer[22] = third_amplitude & 0xff;

const uint16_t crc = calc_crc_modbus(buffer, 23);
const uint16_t crc = crc_modbus(buffer, 23);
buffer[23] = crc & 0xff;
buffer[24] = crc >> 8;

Expand Down

0 comments on commit 030ccb9

Please sign in to comment.