Latency optimization using hearbeat bugfix

This commit is contained in:
Bertrand Songis
2019-06-11 12:53:45 +02:00
parent e3ec3fa45e
commit 02302bdc14
4 changed files with 11 additions and 7 deletions
@@ -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;