mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-24 16:55:29 +03:00
Add and extra check to not used frames
This commit is contained in:
parent
098c2f6f33
commit
3329a7075b
1 changed files with 6 additions and 0 deletions
|
@ -215,6 +215,12 @@ static bool ghstDetectFailsafe(void)
|
|||
// as a failsafe condition
|
||||
|
||||
for (pktIdx = 0; pktIdx < GHST_UL_RC_CHANS_FRAME_COUNT; pktIdx++) {
|
||||
|
||||
// If a frame was not seen at least once, it's not sent and we should not detaect failsafe based on that
|
||||
if (ghstFsTracker[pktIdx].lastSeenMs == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Packet timeout. We didn't receive the packet containing the channel data within GHST_RC_FRAME_TIMEOUT_MS
|
||||
// This is a consistent signal loss, reset the recovery packet counter and report signal loss condition
|
||||
if ((currentTimeMs - ghstFsTracker[pktIdx].lastSeenMs) >= GHST_RC_FRAME_TIMEOUT_MS) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue