Browse Source

HAL_ChibiOS: improved reliability of DShot passthru

thanks to WickedShell for debugging this on his Wraith32 ESCs. We were
truncating the last bit on some BLHeli transfers
mission-4.1.18
Andrew Tridgell 7 years ago
parent
commit
f3179e7934
  1. 6
      libraries/AP_HAL_ChibiOS/RCOutput.cpp

6
libraries/AP_HAL_ChibiOS/RCOutput.cpp

@ -1093,10 +1093,12 @@ bool RCOutput::serial_write_bytes(const uint8_t *bytes, uint16_t len) @@ -1093,10 +1093,12 @@ bool RCOutput::serial_write_bytes(const uint8_t *bytes, uint16_t len)
return false;
}
}
serial_group->dma_handle->unlock();
// add a small delay for last word of output to have completely
// finished
hal.scheduler->delay_microseconds(10);
hal.scheduler->delay_microseconds(25);
serial_group->dma_handle->unlock();
return true;
}

Loading…
Cancel
Save