-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow using system ids other than 1 #1581
Conversation
core/libs/commonwealth/commonwealth/mavlink_comm/MavlinkComm.py
Outdated
Show resolved
Hide resolved
12f9d6c
to
ff91798
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks good to me, although I haven't tested it.
I've left a couple of comments / suggestions :-)
core/libs/commonwealth/commonwealth/mavlink_comm/MavlinkComm.py
Outdated
Show resolved
Hide resolved
core/libs/commonwealth/commonwealth/mavlink_comm/MavlinkComm.py
Outdated
Show resolved
Hide resolved
core/libs/commonwealth/commonwealth/mavlink_comm/MavlinkComm.py
Outdated
Show resolved
Hide resolved
@@ -205,7 +205,7 @@ export default Vue.extend({ | |||
}, | |||
mounted() { | |||
mavlink2rest.startListening('HEARTBEAT').setCallback((message) => { | |||
if (message?.header.system_id !== 1 || message?.header.component_id !== 1) { | |||
if (message?.message.mavtype.type === 'MAV_TYPE_GCS' || message?.header.component_id !== 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not certain what this mounted
function is for. Is it supposed to indicate that the vehicle is connected to a topside computer, or is it supposed to show that an autopilot is connected and running well, or something else?
Does the current non-zero component ID check mean that being connected to the onboard camera manager counts as being mounted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this makes the Heartbeat icon beat. This change makes it beat with anything sending a heartbeat that is not a GCS.
We should filter for all valid types here, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, I think I misunderstood the logic - your description clarified what it's actually doing, thanks :-)
That said, I don't think the heartbeat icon should beat if only the camera manager is present, so it should only be beating if there's a valid autopilot connected. Presumably that's what you meant by filtering for valid types?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should also remove:
MAV_TYPE_GENERIC
MAV_TYPE_ONBOARD_CONTROLLER
MAV_TYPE_GIMBAL
MAV_TYPE_ADSB
and everything after:
MAV_TYPE_CAMERA
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
core/libs/commonwealth/commonwealth/mavlink_comm/MavlinkComm.py
Outdated
Show resolved
Hide resolved
core/libs/commonwealth/commonwealth/mavlink_comm/MavlinkComm.py
Outdated
Show resolved
Hide resolved
This goes on the assumption that the vehicle is only one system with multiple components. it relies on mavlink2rest to detect the most recent message received and locks on to that ID
@@ -205,7 +205,7 @@ export default Vue.extend({ | |||
}, | |||
mounted() { | |||
mavlink2rest.startListening('HEARTBEAT').setCallback((message) => { | |||
if (message?.header.system_id !== 1 || message?.header.component_id !== 1) { | |||
if (message?.message.mavtype.type === 'MAV_TYPE_GCS' || message?.header.component_id !== 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should also remove:
MAV_TYPE_GENERIC
MAV_TYPE_ONBOARD_CONTROLLER
MAV_TYPE_GIMBAL
MAV_TYPE_ADSB
and everything after:
MAV_TYPE_CAMERA
There are some points where the Isn't safer and simpler to use the |
Things get messy as the parameter can be changed in multiple places, such as QGC.
|
I'd like to get this in as is (scope-wise), then as I get the dialog in #1582, I intend to introduce some other vehicle-related configuration in there, as the expected system id |
This goes on the assumption that the vehicle is only one system with multiple components.
it relies on mavlink2rest to detect the most recent message received and locks on to that ID
Relevant to #1466