From 34af368b8ae6d07444bd48d80fc2b8df9b763d25 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 10 Nov 2011 16:23:49 +1100 Subject: [PATCH 1/4] desktop: don't start alarm till setup() has finished --- libraries/Desktop/support/main.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/libraries/Desktop/support/main.cpp b/libraries/Desktop/support/main.cpp index b380cfda7e..d18d17c712 100644 --- a/libraries/Desktop/support/main.cpp +++ b/libraries/Desktop/support/main.cpp @@ -51,9 +51,6 @@ int main(int argc, char * const argv[]) } signal(SIGALRM, sig_alarm); - if (!desktop_state.slider) { - alarm(5); - } // run main setup() function from sketch setup(); From 48eb35c45a6dc78a542cf48cda039bc80d53232a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 10 Nov 2011 22:01:09 +1100 Subject: [PATCH 2/4] fixed build error the prototype extractor was finding the commented out version of cross_track_test(), which had a different prototype --- ArduCopter/navigation.pde | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ArduCopter/navigation.pde b/ArduCopter/navigation.pde index 1b45ba21ae..612d63eff2 100644 --- a/ArduCopter/navigation.pde +++ b/ArduCopter/navigation.pde @@ -212,9 +212,9 @@ static void update_crosstrack(void) } } -static long cross_track_test() +static int32_t cross_track_test() { - long temp = target_bearing - original_target_bearing; + int32_t temp = target_bearing - original_target_bearing; temp = wrap_180(temp); return abs(temp); } From d6cd8a67aedc6744e83835366ee12cfbd6053879 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 10 Nov 2011 22:34:54 +1100 Subject: [PATCH 3/4] autotest: ensure we have a VFR_HUD msgs before getting location --- Tools/autotest/arducopter.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Tools/autotest/arducopter.py b/Tools/autotest/arducopter.py index 355c9e1075..c13d29e7ce 100644 --- a/Tools/autotest/arducopter.py +++ b/Tools/autotest/arducopter.py @@ -64,6 +64,9 @@ def get_bearing(loc1, loc2): def current_location(mav): '''return current location''' + # ensure we have a position + mav.recv_match(type='VFR_HUD', blocking=True) + mav.recv_match(type='GPS_RAW', blocking=True) return location(mav.messages['GPS_RAW'].lat, mav.messages['GPS_RAW'].lon, mav.messages['VFR_HUD'].alt) From b783e2dedbfd80ae157d363464d6dedeffd909b6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 10 Nov 2011 22:58:02 +1100 Subject: [PATCH 4/4] autotest: longer timeout writing logs the flash logs are getting pretty big now --- Tools/autotest/autotest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/autotest/autotest.py b/Tools/autotest/autotest.py index 3f834ebdb1..4353aff36a 100755 --- a/Tools/autotest/autotest.py +++ b/Tools/autotest/autotest.py @@ -42,7 +42,7 @@ def dump_logs(atype): mavproxy.expect("Log]") for i in range(numlogs): mavproxy.send("dump %u\n" % (i+1)) - mavproxy.expect("logs enabled:") + mavproxy.expect("logs enabled:", timeout=120) mavproxy.expect("Log]") util.pexpect_close(mavproxy) util.pexpect_close(sil)