Skip to content

[backport/1.4] frontend: Discard tray MAVLink listeners on destroy - #4068

Open
joaoantoniocardoso wants to merge 1 commit into
bluerobotics:1.4-devfrom
joaoantoniocardoso:backports/1.4/discard-tray-mavlink-listeners
Open

[backport/1.4] frontend: Discard tray MAVLink listeners on destroy#4068
joaoantoniocardoso wants to merge 1 commit into
bluerobotics:1.4-devfrom
joaoantoniocardoso:backports/1.4/discard-tray-mavlink-listeners

Conversation

@joaoantoniocardoso

Copy link
Copy Markdown
Member

This is a backport of #4046 into 1.4.

Store HEARTBEAT/GPS listeners with markRaw and discard them in
beforeDestroy so remounts do not stack callbacks on shared endpoints.
@github-actions

Copy link
Copy Markdown

Automated PR Review

0. Summary

  • Verdict: LGTM :shipit:

Backport of #4046 into 1.4-dev. Stores the HEARTBEAT listener in HealthTrayMenu.vue and the GLOBAL_POSITION_INT / GPS_RAW_INT|GPS2_RAW listeners in GpsTrayMenu.vue, wrapping each in markRaw (so Endpoint.latestData isn't deep-observed every frame) and calling .discard() in beforeDestroy to prevent listener stacking across remounts/HMR. Diff applies cleanly on 1.4-dev (Listener.discard() already exists there), and the only deviation from the master version — this.last_heartbeat_date = new Date() instead of autopilot_data.setLastHeartbeatDate(new Date()) — correctly matches the pre-centralization state of the 1.4 branch.

No further comments, nice job 👍

Generated by PR Review Bot. This is advisory, a human reviewer must still approve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant