Browse Source

AP_IOMCU: run main loop at max rate

removed delay in main loop to reduce latency of RC input. This works
as we only have one thread
master
Andrew Tridgell 6 years ago
parent
commit
a7c5ac8902
  1. 4
      libraries/AP_IOMCU/iofirmware/iofirmware.cpp

4
libraries/AP_IOMCU/iofirmware/iofirmware.cpp

@ -178,7 +178,9 @@ void AP_IOMCU_FW::init() @@ -178,7 +178,9 @@ void AP_IOMCU_FW::init()
void AP_IOMCU_FW::update()
{
eventmask_t mask = chEvtWaitAnyTimeout(~0, chTimeMS2I(1));
// we are not running any other threads, so we can use an
// immediate timeout here for lowest latency
eventmask_t mask = chEvtWaitAnyTimeout(~0, TIME_IMMEDIATE);
// we get the timestamp once here, and avoid fetching it
// within the DMA callbacks

Loading…
Cancel
Save