From ec104bb7acc8c07fd45e8daeb9e302944d910622 Mon Sep 17 00:00:00 2001 From: Vlad Radulescu Date: Mon, 16 Jan 2017 23:19:19 +0200 Subject: [PATCH] Corrected a tiny spelling mistake and modifed the PPM_MIN_CHANNELS check so it accepts a minimum of 5 channels. It seems that was the initial intention. --- src/drivers/stm32/drv_hrt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drivers/stm32/drv_hrt.c b/src/drivers/stm32/drv_hrt.c index 6a5393e511..00cb21621a 100644 --- a/src/drivers/stm32/drv_hrt.c +++ b/src/drivers/stm32/drv_hrt.c @@ -462,7 +462,7 @@ hrt_ppm_decode(uint32_t status) goto error; } - /* how long since the last edge? - this handles counter wrapping implicitely. */ + /* how long since the last edge? - this handles counter wrapping implicitly. */ width = count - ppm.last_edge; #if PPM_DEBUG @@ -506,7 +506,7 @@ hrt_ppm_decode(uint32_t status) } else { /* frame channel count matches expected, let's use it */ - if (ppm.next_channel > PPM_MIN_CHANNELS) { + if (ppm.next_channel >= PPM_MIN_CHANNELS) { for (i = 0; i < ppm.next_channel; i++) { ppm_buffer[i] = ppm_temp_buffer[i]; }