From 050ae6f5485534abb3861a00a75b30af67c531f4 Mon Sep 17 00:00:00 2001 From: Felix Ruess Date: Tue, 13 Mar 2012 03:27:20 +0100 Subject: [PATCH] fixedwing control new: fix guidance_v_n after Christophe made min/max auto cruise throttle vars to set via settings --- conf/settings/tuning_ctl_new.xml | 2 ++ conf/settings/tuning_ins.xml | 2 +- sw/airborne/firmwares/fixedwing/guidance/guidance_v_n.c | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/conf/settings/tuning_ctl_new.xml b/conf/settings/tuning_ctl_new.xml index 192fdb2fe5..3b87c1c32d 100644 --- a/conf/settings/tuning_ctl_new.xml +++ b/conf/settings/tuning_ctl_new.xml @@ -42,6 +42,8 @@ + + diff --git a/conf/settings/tuning_ins.xml b/conf/settings/tuning_ins.xml index c7a7e30b22..57af459d9b 100644 --- a/conf/settings/tuning_ins.xml +++ b/conf/settings/tuning_ins.xml @@ -57,7 +57,7 @@ - + diff --git a/sw/airborne/firmwares/fixedwing/guidance/guidance_v_n.c b/sw/airborne/firmwares/fixedwing/guidance/guidance_v_n.c index b036b03399..38b90db444 100644 --- a/sw/airborne/firmwares/fixedwing/guidance/guidance_v_n.c +++ b/sw/airborne/firmwares/fixedwing/guidance/guidance_v_n.c @@ -52,6 +52,8 @@ uint8_t v_ctl_auto_throttle_submode; /* "auto throttle" inner loop parameters */ float v_ctl_auto_throttle_cruise_throttle; float v_ctl_auto_throttle_nominal_cruise_throttle; +float v_ctl_auto_throttle_min_cruise_throttle; +float v_ctl_auto_throttle_max_cruise_throttle; float v_ctl_auto_throttle_climb_throttle_increment; float v_ctl_auto_throttle_pgain; float v_ctl_auto_throttle_igain; @@ -128,6 +130,8 @@ void v_ctl_init( void ) { /* "auto throttle" inner loop parameters */ v_ctl_auto_throttle_nominal_cruise_throttle = V_CTL_AUTO_THROTTLE_NOMINAL_CRUISE_THROTTLE; v_ctl_auto_throttle_cruise_throttle = v_ctl_auto_throttle_nominal_cruise_throttle; + v_ctl_auto_throttle_min_cruise_throttle = V_CTL_AUTO_THROTTLE_MIN_CRUISE_THROTTLE; + v_ctl_auto_throttle_max_cruise_throttle = V_CTL_AUTO_THROTTLE_MAX_CRUISE_THROTTLE; v_ctl_auto_throttle_climb_throttle_increment = V_CTL_AUTO_THROTTLE_CLIMB_THROTTLE_INCREMENT; v_ctl_auto_throttle_pgain = V_CTL_AUTO_THROTTLE_PGAIN; v_ctl_auto_throttle_igain = V_CTL_AUTO_THROTTLE_IGAIN;