Repository navigation
Conversation
|
@djnugent can you please review? |
There was a problem hiding this comment.
Shouldn't 'system_status' be added to the self._on_change()?
There was a problem hiding this comment.
I think you are right, let me ponder on this for a bit.
There was a problem hiding this comment.
I think its only use is to have the ability to add an attribute_observer. I think you should add it to keep consistent with the other attributes.
|
The thing to remember about mode is that it's quite broad. APM indicates more specifically what is happening in status using the status bits and the custom_mode ie. LAND or RTL indicates probably a failsafe in action. |
|
@billbonney Can you point me point me to the status bits documentation? Perhaps we can provide additional states through the API for these. Whatever we do we need to be able to access this information through DroneKit (at the moment since we only have send_message without any way to get/parse a result I don't see how we could get this information). |
|
On looking I only see status bit as part of the dataflash logs. I was under the impression that the onboard_control_sensors_health bits contained this information i.e. when it's landed. I'll talk with Randy/Tridge if there is some message they are sending. That said, most states are inferred through information from the telemetry. Send Message is like giving instructions to your kids, you are never sure they have heard you, or going to do what you ask, until you see them doing it. ;) |
|
@billbonney Thanks very much - interested to find out what you find out. It may be that we can do some of the "inferring" behind the scenes/within the API. |
|
@mrpollo What happens if we lose the heartbeat - will this return NONE? |
|
@mrpollo OK, as you can see above, documentation added. This includes updates to the example code, example code doc, guide on setting states. I've tried to make it clear that this is broad information by adding (in reference) that "This attribute provides high-level information about whether the vehicle is on the ground, flying, in failsafe, etc. ". Depending on what @billbonney comes back with we might add a whole separate guide topic on "How to deal with fail safe conditions" The vehicle_state.py example code adds a function to print out a human-readable string for the different MAV_STATE values. I think this is enough to show how you would use the API. Ready to pull. |
|
Inspired by the conversation I made some small changes to the value of @hamishwillee would you be able to check the docs I'm not sure that I did it right |
20e1f0f to
9494f07
Compare
|
@mrpollo I updated the docs and then attempted to rebase to master. Unfortunately I'm not sure I did this right. The file comparison - as though a lot of new content was discovered. However the files themselves look fine. Can you please sanity check? |
…s field from the most recently received heartbeat msg handy for checking whether they vehicle is on the ground, flying, in failsafe, etc
updated vehicle_state.py example to reflect this change
d303c28 to
332ea75
Compare
|
It appears that the line endings on a few items was incorrect. I fixed them and pushed. The target of this PR will be the "minor" branch once it's updated. I'll take a look sometime next week. |
|
Replaced by #441. |
exposes the
system_statusfield from the most recently received heartbeat messagehandy for checking whether they vehicle is on the ground, flying, in failsafe, etc
possible values:
@hamishwillee can you update this branch with docs to match this change please?
big thanks to @liamstask for the contribution.