[all] Overflow when PPM frame length was at maximum with a 4-CH output
This commit is contained in:
@@ -135,6 +135,7 @@ void setupPulsesPPM(PPM_PORT_PARAM) // Don't enable interrupts
|
||||
rest -= v;
|
||||
*ptr++ = v; /* as Pat MacKenzie suggests */
|
||||
}
|
||||
rest = (rest > 65535) ? 65535 : rest;
|
||||
*ptr = rest;
|
||||
*(ptr + 1) = 0;
|
||||
|
||||
|
||||
@@ -176,6 +176,7 @@ void setupPulsesPPM(uint8_t proto)
|
||||
}
|
||||
|
||||
*ptr++ = q;
|
||||
rest = (rest > 65535) ? 65535 : rest;
|
||||
*ptr++ = rest;
|
||||
|
||||
if (proto == PROTO_PPM) {
|
||||
|
||||
Reference in New Issue
Block a user