Skip to content

Dronekit exception sending messages to system IDs > 127 #443

@seanmcleod

Description

@seanmcleod

When we connect the Tower application to a Pixhawk which also has APM Planner 2 connected we see an exception in the Tower application in a call to:

packet.payload.putUnsignedByte(target_system);

The issue is that the system ID of APM Planner 2 is 252 and the dronekit-android throws an exception since it sees the target_system as -4 which fails the following check in putUnsignedByte() when trying to send a message to APM Planner:

if(data < UNSIGNED_BYTE_MIN_VALUE || data > UNSIGNED_BYTE_MAX_VALUE){ throw new IllegalArgumentException("Value is outside of the range of an unsigned byte: " + data); }

Presumably there shouldn't be a limit in dronekit preventing it from sending Mavlink messages to system IDs > 127?

Regards

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