smashyanand / ardupilot-mega

Automatically exported from code.google.com/p/ardupilot-mega
0 stars 0 forks source link

startup_ground called twice when ENABLE_AIRSTART = 0 #108

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set ENABLE_AIRSTART = 0

What is the expected output? What do you see instead?
I expect the APM to ground_start exactly once.  Instead, it ground_starts at 
the end of init_ardupilot, and again when 5 valid GPS points have been taken in 
update_GPS()

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

Suggestion:
Change

if(ENABLE_AIR_START == 1){
    if ((ground_start_avg / 5) < SPEEDFILT){
        startup_ground();
        init_home();
    }
}else{
    startup_ground();
    init_home();
}

...to:

if(ENABLE_AIR_START == 1){
    if ((ground_start_avg / 5) < SPEEDFILT){
        startup_ground();
        init_home();
    }
}else{
    init_home();
}

Original issue reported on code.google.com by bjpcalt...@gmail.com on 18 Sep 2010 at 12:15

GoogleCodeExporter commented 9 years ago
OOPS! How did that get in there.  Thanks for the catch.

Original comment by dewei...@gmail.com on 18 Sep 2010 at 12:45

GoogleCodeExporter commented 9 years ago
This issue arose from fixing Issue 102 :)

Original comment by bjpcalt...@gmail.com on 18 Sep 2010 at 12:57

GoogleCodeExporter commented 9 years ago
Fixed - R888

Original comment by dewei...@gmail.com on 18 Sep 2010 at 3:09