ulanding fix sign-compare

This commit is contained in:
Daniel Agar
2017-09-07 10:27:36 +02:00
committed by Beat Küng
parent 5fedab7531
commit fc4a8ebb2a
+2 -2
View File
@@ -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) {