Extra "skip" check.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14760 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
Giovanni Di Sirio 2021-09-13 10:01:18 +00:00
parent 1b95d15504
commit a53ffeb3db
1 changed files with 10 additions and 0 deletions

View File

@ -144,6 +144,16 @@ static void vt_insert_first(virtual_timers_list_t *vtlp,
/* Being the first element inserted in the list the alarm timer
is started.*/
port_timer_start_alarm(chTimeAddX(vtlp->lasttime, delay));
#if !defined(CH_VT_RFCU_DISABLED)
/* Checking if a skip occurred.*/
{
systime_t newnow = chVTGetSystemTimeX();
if (chTimeDiffX(now, newnow) >= delay) {
chRFCUCollectFaultsI(CH_RFCU_VT_INSUFFICIENT_DELTA);
}
}
#endif
}
#endif /* CH_CFG_ST_TIMEDELTA > 0 */