Minor changes made to FMU module and the DSM code to properly catch Spekrum DSM data.

This commit is contained in:
Andrew C. Smith
2017-01-21 12:13:40 +01:00
committed by Lorenz Meier
parent 42c5684a06
commit 12a34c9fcf
2 changed files with 19 additions and 10 deletions
+3 -1
View File
@@ -691,7 +691,9 @@ dsm_parse(uint64_t now, uint8_t *frame, unsigned len, uint16_t *values,
}
if (decode_ret) {
*num_values = dsm_chan_count;
/* num values should not decrease, only increase */
if (dsm_chan_count > *num_values)
*num_values = dsm_chan_count;
memcpy(&values[0], &dsm_chan_buf[0], dsm_chan_count * sizeof(dsm_chan_buf[0]));
#ifdef DSM_DEBUG