1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-21 23:35:34 +03:00

Jitter enhancements

This commit is contained in:
borisbstyle 2015-09-20 23:55:22 +02:00
parent d8e62d0508
commit af6f9de903
2 changed files with 6 additions and 4 deletions

View file

@ -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;