ArduPilot / ArduPilot/MissionPlanner

Bitmask window incorrectly calculating values past 2^23 causing incorrect parameter setting

Open
#3,696 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
2.4k
Forks
2.9k
Avg merge
19h 16m
Merged PRs (30d)
4

Description

When using the pop out bitmask in the Full Parameter List, the bitmask value is incorrectly calculated when selecting servo 25 and above:

Image

Image

If you close and reopen the bitmask window, it will correctly read the incorrectly written value:

Image

A work around exists by manually entering the numerical bitmask value calculated seperately, however if the bitmask window is interacted with, it will incorrectly update the bitmask window before closing.

I have had this present issues when operating a UA with the motor channels mapped to servos 20-27. It resulted in a servo channel being incorrectly unselected and not being passed through to CAN (CAN_D1_UC_SRV_BM).

This issue also exists for the servo bitmask option in the same way so I am presuming it is an error with bitmasks past a certain size.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the Full Parameter List's pop-out bitmask window and reproduce the calculation by selecting servo 25 or above, including the servo bitmask option. Check the value before and after closing and reopening the window, especially for CAN_D1_UC_SRV_BM and servo channels 20–27. Done means selections remain correct and the written bitmask matches the selected channels.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.