1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 20:35:33 +03:00

Converted currentTime to currentTimeUs

This commit is contained in:
Martin Budden 2016-12-01 18:57:20 +00:00
parent ec0b52aea1
commit 8d3c825646
38 changed files with 197 additions and 165 deletions

View file

@ -897,16 +897,16 @@ static void cmsUpdate(uint32_t currentTimeUs)
lastCalledMs = currentTimeMs;
}
void cmsHandler(uint32_t currentTime)
void cmsHandler(timeUs_t currentTimeUs)
{
if (cmsDeviceCount < 0)
return;
static uint32_t lastCalled = 0;
static timeUs_t lastCalledUs = 0;
if (currentTime >= lastCalled + CMS_UPDATE_INTERVAL_US) {
lastCalled = currentTime;
cmsUpdate(currentTime);
if (currentTimeUs >= lastCalledUs + CMS_UPDATE_INTERVAL_US) {
lastCalledUs = currentTimeUs;
cmsUpdate(currentTimeUs);
}
}