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.

This commit is contained in:
Vlad Radulescu 2017-01-16 23:19:19 +02:00 committed by Lorenz Meier
parent 569b20d184
commit ec104bb7ac

View File

@ -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];
}