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

AP_Frsky_Telem: fix for protocol=4 GAlt=0 and GSPd=0 #13846

Merged
merged 1 commit into from
Mar 31, 2020

Conversation

yaapu
Copy link
Contributor

@yaapu yaapu commented Mar 20, 2020

This fixes serial_protocol 4 GPS altitude and speed error, both were reported as constant 0
for calc_gps_position() was never called.
Issue introduced after adding support for VSpd and trying to execute "slow" code when there was no serial input to process.

@peterbarker
Copy link
Contributor

Would be nice to fill in some of the validators here: https://github.com/ardupilot/ardupilot/blob/master/Tools/autotest/common.py#L4850

Will catch some regressions, at least.

@yaapu
Copy link
Contributor Author

yaapu commented Mar 20, 2020

something like tfp_validate_vel_and_yaw(self, value)?

EDIT: I created a PR #13850 to test serial protocol 4, and not surprisingly that test would have failed on this code :-)

@@ -206,11 +206,12 @@ class AP_Frsky_Telem {
struct
{
bool sport_status;
bool gps_refresh = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need the init of these vars, it just wastes flash

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok bool initialization fixed

This fixes protocol 4 GPS altitude and speed error, both were reported as constant 0
for cal_gps_position() was never called
@yaapu yaapu force-pushed the pr-frsky_telem_proto4_fix_galt branch from cb76fe8 to 89fafe3 Compare March 31, 2020 00:23
@peterbarker peterbarker merged commit fed8ecc into ArduPilot:master Mar 31, 2020
@peterbarker
Copy link
Contributor

@yaapu could you rebase the testing PR, please?

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

Successfully merging this pull request may close these issues.

None yet

4 participants