From d34e6049c96ce72dbbd20e37cfa45c36300f259b Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 29 Nov 2023 13:02:03 +1100 Subject: [PATCH] AP_Math: rename crc_sum8 to crc_sum8_with_carry the name "sum8" is usually used for "sum all bytes into a uint8_t discarding carry" --- libraries/AP_Math/crc.cpp | 2 +- libraries/AP_Math/crc.h | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/libraries/AP_Math/crc.cpp b/libraries/AP_Math/crc.cpp index 0b283b0515..985a02c290 100644 --- a/libraries/AP_Math/crc.cpp +++ b/libraries/AP_Math/crc.cpp @@ -481,7 +481,7 @@ uint32_t crc_crc24(const uint8_t *bytes, uint16_t len) } // simple 8 bit checksum used by FPort -uint8_t crc_sum8(const uint8_t *p, uint8_t len) +uint8_t crc_sum8_with_carry(const uint8_t *p, uint8_t len) { uint16_t sum = 0; for (uint8_t i=0; i