mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-21 23:35:34 +03:00
Jitter enhancements
This commit is contained in:
parent
d8e62d0508
commit
af6f9de903
2 changed files with 6 additions and 4 deletions
|
@ -93,6 +93,7 @@ enum {
|
|||
/* IBat monitoring interval (in microseconds) - 6 default looptimes */
|
||||
#define IBATINTERVAL (6 * 3500)
|
||||
#define GYRO_WATCHDOG_DELAY 100 // Watchdog for boards without interrupt for gyro
|
||||
#define PREVENT_RX_PROCESS_PRE_LOOP_TRIGGER 90 // Prevent RX processing before expected loop trigger
|
||||
|
||||
uint32_t currentTime = 0;
|
||||
uint32_t previousTime = 0;
|
||||
|
@ -733,7 +734,7 @@ void loop(void)
|
|||
|
||||
updateRx(currentTime);
|
||||
|
||||
if (shouldProcessRx(currentTime)) {
|
||||
if (shouldProcessRx(currentTime) && !((int32_t)(currentTime - (loopTime - PREVENT_RX_PROCESS_PRE_LOOP_TRIGGER)) >= 0)) {
|
||||
processRx();
|
||||
isRXDataNew = true;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue