core: frontend: mavlink: Skip SET_MESSAGE_INTERVAL when rate is 0 - #4134
Open
joaoantoniocardoso wants to merge 1 commit into
Open
core: frontend: mavlink: Skip SET_MESSAGE_INTERVAL when rate is 0#4134joaoantoniocardoso wants to merge 1 commit into
joaoantoniocardoso wants to merge 1 commit into
Conversation
refreshRate 0 means listen-only (HEARTBEAT). Dividing by zero produced Infinity→null in the POST body and mavlink2rest answered 404 on every load.
joaoantoniocardoso
force-pushed
the
fix/mavlink-zero-refresh-rate
branch
from
August 12, 2026 01:26
69deee6 to
5e63e31
Compare
joaoantoniocardoso
marked this pull request as ready for review
August 12, 2026 01:28
Automated PR Review0. Summary
Adds an early return in No further comments, nice job 👍 Generated by PR Review Bot. This is advisory, a human reviewer must still approve. |
patrickelectric
requested changes
Aug 12, 2026
| } | ||
| // 0 Hz means listen only (e.g. HEARTBEAT). Do not POST SET_MESSAGE_INTERVAL: | ||
| // 1000000 / 0 is Infinity, JSON-serialized as null, and mavlink2rest returns 404. | ||
| if (rate === 0) { |
Member
There was a problem hiding this comment.
I'm not a huge fan of this test, I would recommend checking for:
Suggested change
| if (rate === 0) { | |
| if (rate < 0.01) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MavlinkUpdaterregistersHEARTBEATwithrefreshRate: 0(listen-only).requestMessageRatestill POSTedMAV_CMD_SET_MESSAGE_INTERVALwithparam2 = 1000000 / 0→Infinity→ JSONnull.unable to send message...).rate === 0; websocket listening is unchanged.Test plan
POST /mavlink2rest/mavlinkwithparam2: nullfor HEARTBEAT.SET_MESSAGE_INTERVALPOSTs still return 200.