mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-23 00:05:28 +03:00
Fix incorrect time types
This commit is contained in:
parent
409ba6cc7e
commit
fc7c073b79
2 changed files with 5 additions and 5 deletions
|
@ -1241,9 +1241,9 @@ static navigationFSMState_t navSetNewFSMState(navigationFSMState_t newState)
|
|||
|
||||
static void navProcessFSMEvents(navigationFSMEvent_t injectedEvent)
|
||||
{
|
||||
const uint32_t currentMillis = millis();
|
||||
const timeMs_t currentMillis = millis();
|
||||
navigationFSMState_t previousState;
|
||||
static uint32_t lastStateProcessTime = 0;
|
||||
static timeMs_t lastStateProcessTime = 0;
|
||||
|
||||
/* If timeout event defined and timeout reached - switch state */
|
||||
if ((navFSM[posControl.navState].timeoutMs > 0) && (navFSM[posControl.navState].onEvent[NAV_FSM_EVENT_TIMEOUT] != NAV_STATE_UNDEFINED) &&
|
||||
|
|
|
@ -221,7 +221,7 @@ static void inavFilterCorrectVel(int axis, float dt, float e, float w)
|
|||
|
||||
#define resetTimer(tim, currentTimeUs) { (tim)->deltaTime = 0; (tim)->lastTriggeredTime = currentTimeUs; }
|
||||
#define getTimerDeltaMicros(tim) ((tim)->deltaTime)
|
||||
static bool updateTimer(navigationTimer_t * tim, uint32_t interval, timeUs_t currentTimeUs)
|
||||
static bool updateTimer(navigationTimer_t * tim, timeUs_t interval, timeUs_t currentTimeUs)
|
||||
{
|
||||
if ((currentTimeUs - tim->lastTriggeredTime) >= interval) {
|
||||
tim->deltaTime = currentTimeUs - tim->lastTriggeredTime;
|
||||
|
@ -254,7 +254,7 @@ static bool shouldResetReferenceAltitude(void)
|
|||
* Don't overload your GPS in its config with trash, choose a Hz rate that it can deliver at a sustained rate.
|
||||
* (c) CrashPilot1000
|
||||
*/
|
||||
static uint32_t getGPSDeltaTimeFilter(uint32_t dTus)
|
||||
static timeUs_t getGPSDeltaTimeFilter(timeUs_t dTus)
|
||||
{
|
||||
if (dTus >= 225000 && dTus <= 275000) return HZ2US(4); // 4Hz Data 250ms
|
||||
if (dTus >= 180000 && dTus <= 220000) return HZ2US(5); // 5Hz Data 200ms
|
||||
|
@ -313,7 +313,7 @@ static bool detectGPSGlitch(timeUs_t currentTimeUs)
|
|||
*/
|
||||
void onNewGPSData(void)
|
||||
{
|
||||
static uint32_t lastGPSNewDataTime;
|
||||
static timeUs_t lastGPSNewDataTime;
|
||||
static int32_t previousLat;
|
||||
static int32_t previousLon;
|
||||
static int32_t previousAlt;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue