From fa0e8729288e5a4bc1f9ea5071ea8e6a5ca5c07a Mon Sep 17 00:00:00 2001 From: dave Date: Mon, 12 Nov 2018 18:17:09 -0500 Subject: [PATCH] minor fix on gohome --- buzz_scripts/include/act/states.bzz | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/buzz_scripts/include/act/states.bzz b/buzz_scripts/include/act/states.bzz index bd5cbd6..6d15a11 100644 --- a/buzz_scripts/include/act/states.bzz +++ b/buzz_scripts/include/act/states.bzz @@ -19,6 +19,7 @@ WP_STIG = 8 path_it = 0 pic_time = 0 g_it = 0 +homegps = {} # Core state function when on the ground function turnedoff() { @@ -35,7 +36,8 @@ function launch() { BVMSTATE = "LAUNCH" log("AUTO_LAUNCH_STATE: ", AUTO_LAUNCH_STATE) if(V_TYPE == 0 or V_TYPE == 1) { # flying vehicle so TAKE_OFF - homegps = {.lat=pose.position.latitude, .long=pose.position.longitude} + homegps = {.lat=pose.position.latitude, .lng=pose.position.longitude} + log("Recorded home point: ",homegps.lat, homegps.lng) if(pose.position.altitude >= TARGET_ALTITUDE-TARGET_ALTITUDE/20.0) { barrier_set(ROBOTS, AUTO_LAUNCH_STATE, "STOP", 22) barrier_ready(22)