MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / process_pulse_list

Method process_pulse_list

libraries/AP_RCProtocol/AP_RCProtocol.cpp:215–233  ·  view source on GitHub ↗

process an array of pulses. n must be even */

Source from the content-addressed store, hash-verified

213 process an array of pulses. n must be even
214 */
215void AP_RCProtocol::process_pulse_list(const uint32_t *widths, uint16_t n, bool need_swap)
216{
217 if (n & 1) {
218 return;
219 }
220 while (n) {
221 uint32_t widths0 = widths[0];
222 uint32_t widths1 = widths[1];
223 if (need_swap) {
224 uint32_t tmp = widths1;
225 widths1 = widths0;
226 widths0 = tmp;
227 }
228 widths1 -= widths0;
229 process_pulse(widths0, widths1);
230 widths += 2;
231 n -= 2;
232 }
233}
234
235bool AP_RCProtocol::process_byte(uint8_t byte, uint32_t baudrate)
236{

Callers 1

_timer_tickMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected