mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 20:35:33 +03:00
Rebased
This commit is contained in:
commit
0cbe440cea
185 changed files with 2217 additions and 1943 deletions
|
@ -947,16 +947,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue