Skip to content

Commit 5cc9589

Browse files
committed
fix(dronecan): send elapsed ms since last seen in MSP2_INAV_DRONECAN_NODES
Previously last_seen_ms was the raw millis() timestamp when the node was last heard from, which equals FC uptime for active nodes. Configurators had no way to compute elapsed time without knowing current FC millis(). Now sends millis() - last_seen_ms so the field means "ms since this node was last heard from". Unsigned subtraction handles millis() wraparound correctly.
1 parent a6f738f commit 5cc9589

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/fc/fc_msp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1899,7 +1899,7 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
18991899
.nodeID = node->nodeID,
19001900
.health = node->health,
19011901
.mode = node->mode,
1902-
.last_seen_ms = node->last_seen_ms,
1902+
.last_seen_ms = millis() - node->last_seen_ms,
19031903
}, sizeof(dronecanNodeStatus_t));
19041904
}
19051905
}

0 commit comments

Comments
 (0)