Skip to content
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

PX4 Flight Mode in the Upper Word of the Custom Mode, Not the Lower Word as Coded #125

Open
GoogleCodeExporter opened this issue Oct 24, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Use the Mavlink Inspector in QGroundControl and observe the value for the 
ALTCTL mode in the upper word.  The main branch of the PX4 code base was used 
on a Pixhawk board.

What is the expected output? What do you see instead?
The current code will only display a flight mode of "stab" for all flight modes 
of the PX4 main branch.  The current minimosd-extra source code uses the lower 
word of the custom mode, which is zero for all flight modes.  See below for a 
code change which resolved the problem.


What version of the product are you using? On what operating system?
r727


Please provide any additional information below.
I have included a code change below which resolved the problem for me:

                 //   apm_mav_type      = mavlink_msg_heartbeat_get_type(&msg);            
                 //   osd_mode = mavlink_msg_heartbeat_get_custom_mode(&msg);
                 // JYW: The osd_mode is stored in the upper word in the PX4 code.
                    osd_mode = (uint8_t)(mavlink_msg_heartbeat_get_custom_mode(&msg) >> 16);                 
                 //   osd_mode = (uint8_t)mavlink_msg_heartbeat_get_custom_mode(&msg);





Original issue reported on code.google.com by [email protected] on 6 Apr 2015 at 12:29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant