Latency optimization using hearbeat bugfix
This commit is contained in:
@@ -273,11 +273,11 @@ void extmoduleSendNextFrame();
|
||||
#if defined(INTMODULE_HEARTBEAT_GPIO)
|
||||
void init_intmodule_heartbeat();
|
||||
void stop_intmodule_heartbeat();
|
||||
void check_xjt_heartbeat();
|
||||
void check_intmodule_heartbeat();
|
||||
#else
|
||||
#define init_intmodule_heartbeat()
|
||||
#define stop_intmodule_heartbeat()
|
||||
#define check_xjt_heartbeat()
|
||||
#define check_intmodule_heartbeat()
|
||||
#endif
|
||||
|
||||
// SBUS
|
||||
|
||||
@@ -46,7 +46,7 @@ void intmoduleSendNextFrame()
|
||||
{
|
||||
uint32_t last = intmodulePulsesData.pxx.getLast();
|
||||
if (heartbeatCapture.valid) {
|
||||
if (TIMER_2MHz_TIMER->CNT - heartbeatCapture.timestamp > HEARBEAT_OFFSET)
|
||||
if (getTmr2MHz() - heartbeatCapture.timestamp > HEARBEAT_OFFSET)
|
||||
last -= 21;
|
||||
else
|
||||
last += 19;
|
||||
|
||||
Reference in New Issue
Block a user