diff --git a/src/drivers/ulanding/ulanding.cpp b/src/drivers/ulanding/ulanding.cpp index 31b2863f72..32b82b5f09 100644 --- a/src/drivers/ulanding/ulanding.cpp +++ b/src/drivers/ulanding/ulanding.cpp @@ -328,7 +328,7 @@ bool Radar::read_and_parse(uint8_t *buf, int len, float *range) bool ret = false; // write new data into a ring buffer - for (unsigned i = 0; i < len; i++) { + for (int i = 0; i < len; i++) { _head++; @@ -357,7 +357,7 @@ bool Radar::read_and_parse(uint8_t *buf, int len, float *range) // go through the buffer backwards starting from the newest byte // if we find a header byte and the previous two bytes weren't header bytes // then we found the newest package. - for (unsigned i = 0; i < num_bytes; i++) { + for (int i = 0; i < num_bytes; i++) { if (is_header_byte(_buf[index])) { if (no_header_counter >= BUF_LEN / 3 - 1) { if (ULANDING_VERSION == 1) {