Skip to content

Incorrect reading of Notifystate bitmask in canbus monitor #36

@steffensol

Description

@steffensol

Hi all,

I've been working on a system that needs to read the incoming Notifystate from the autopilot, and during my testing, I found out that the bitmask is misread by the GUI tool.

First, lets have a look at this bitmask as defined in the dronecan standard;
image

I had a test autopilot lying on the bench and armed it in acro mode (which doesn't require any GPS, position estimate etc.). Powered through a power brick with current + volt sensing. The current / voltage limits were not outside of the min_voltage parameters set up in the autopilot as seen in the screenshot below.

My understanding is that the VehicleState message bitmask of 26 should have represented "PREARM + PREARM_GPS + ARMED" - however the tool seems to indicate Flying, failsafe_batt and gps_glitch. As this is in acro mode, there is no need for GPS, and the voltage was within acceptable limits, and should not have flagged failsafe_batt. As I managed to arm the autopilot, the prearm must have been OK, and since i was in acro mode - no requirement for GPS exists, and therefore PREARM_GPS is also OK.

image

Unfortunately, my coding skills are not up to the level of debugging where this GUI tool depends on other libraries, and this error could be caused by incorrect code in those libraries.

If someone would like to have a look at this, it could greatly benefit others.
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions