Rover: removed closed loop nav

use a jump in the mission instead
This commit is contained in:
Andrew Tridgell 2012-11-28 10:42:10 +11:00
parent 220c357dcb
commit 8a42ceb63b
8 changed files with 6 additions and 44 deletions

View File

@ -10,7 +10,6 @@
#define CLI_ENABLED ENABLED
#define CLI_SLIDER_ENABLED DISABLED
#define CLOSED_LOOP_NAV ENABLED
#define AUTO_WP_RADIUS DISABLED
#define TRACE DISABLED

View File

@ -46,8 +46,6 @@
#define MANUAL_LEVEL DISABLED
#define CLOSED_LOOP_NAV ENABLED // set to ENABLED if closed loop navigation else set to DISABLED (Return To Lauch)
#define MAX_DIST 50 //300 // max distance (in m) for the HEADALT mode
#define SARSEC_BRANCH 50 // Long branch of the SARSEC pattern

View File

@ -47,8 +47,6 @@
#define TURN_GAIN 5
#define CLOSED_LOOP_NAV ENABLED // set to ENABLED if closed loop navigation else set to DISABLED (Return To Lauch)
#define MAX_DIST 50 //300 // max distance (in m) for the HEADALT mode
#define SARSEC_BRANCH 50 // Long branch of the SARSEC pattern
/*

View File

@ -1,6 +1,6 @@
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
#define THISFIRMWARE "ArduRover v2.20b" //New version of the APMrover for the APM v1 or APM v2 and magnetometer + SONAR
#define THISFIRMWARE "ArduRover v2.30"
// This is the APMrover firmware derived from the Arduplane v2.32 by Jean-Louis Naudin (JLN)
/*

View File

@ -122,13 +122,13 @@ public:
k_param_short_fs_action,
k_param_long_fs_action,
k_param_gcs_heartbeat_fs_enabled,
k_param_gcs_heartbeat_fs_enabled,
k_param_throttle_slewrate,
// ************************************************************
// 180: APMrover parameters - JLN update
k_param_closed_loop_nav,
k_param_closed_loop_nav, // unused
k_param_auto_wp_radius,
k_param_sonar_trigger,
k_param_turn_gain,
@ -332,7 +332,6 @@ public:
// ************ ThermoPilot parameters ************************
// - JLN update
AP_Int8 closed_loop_nav;
AP_Int8 auto_wp_radius;
AP_Int16 sonar_trigger;
AP_Int16 turn_gain;
@ -387,21 +386,3 @@ extern const AP_Param::Info var_info[];
#endif // PARAMETERS_H
/* ************ ThermoPilot parameters (old parameters setup ) ************************
low_rate_turn (LOW_RATE_TURN, k_param_low_rate_turn, PSTR("TP_LOWR_TURN")),
medium_rate_turn (MEDIUM_RATE_TURN, k_param_medium_rate_turn, PSTR("TP_MEDR_TURN")),
high_rate_turn (HIGH_RATE_TURN, k_param_high_rate_turn, PSTR("TP_HIGR_TURN")),
search_mode_turn (SEARCH_MODE_TURN, k_param_search_mode_turn, PSTR("TP_SRCM_TURN")),
slope_thermal (SLOPE_THERMAL, k_param_slope_thermal, PSTR("TP_SLOPE_THER")),
auto_thermal (AUTO_THERMAL, k_param_auto_thermal, PSTR("TP_AUTO_THER")),
stab_thermal (STAB_THERMAL, k_param_auto_thermal, PSTR("TP_STAB_THER")),
closed_loop_nav (CLOSED_LOOP_NAV, k_param_closed_loop_nav, PSTR("TP_CL_NAV")),
auto_wp_radius (AUTO_WP_RADIUS, k_param_closed_loop_nav, PSTR("TP_AWPR_NAV")),
min_alt (MIN_ALT, k_param_min_alt, PSTR("TP_MIN_ALT")),
max_alt (MAX_ALT, k_param_max_alt, PSTR("TP_MAX_ALT")),
max_dist (MAX_DIST, k_param_max_dist, PSTR("TP_MAX_DIST")),
sarsec_branch (SARSEC_BRANCH, k_param_sarsec_branch, PSTR("TP_SARSEC")),
************************************************************/

View File

@ -86,8 +86,6 @@ const AP_Param::Info var_info[] PROGMEM = {
// ************************************************************
// APMrover parameters - JLN update
GSCALAR(closed_loop_nav, "ROV_CL_NAV", CLOSED_LOOP_NAV),
GSCALAR(auto_wp_radius, "ROV_AWPR_NAV", AUTO_WP_RADIUS),
GSCALAR(sonar_trigger, "ROV_SONAR_TRIG", SONAR_TRIGGER),
GSCALAR(turn_gain, "ROV_GAIN", TURN_GAIN),

View File

@ -109,12 +109,8 @@ static void handle_process_do_command()
static void handle_no_commands()
{
gcs_send_text_fmt(PSTR("Returning to Home"));
next_nav_command = home;
next_nav_command.id = MAV_CMD_NAV_LOITER_UNLIM;
nav_command_ID = MAV_CMD_NAV_LOITER_UNLIM;
non_nav_command_ID = WAIT_COMMAND;
handle_process_nav_cmd();
gcs_send_text_fmt(PSTR("No commands - setting MANUAL"));
set_mode(MANUAL);
}
/********************************************************************************/

View File

@ -65,15 +65,7 @@ static void process_next_command()
gcs_send_text_fmt(PSTR("Nav command index updated to #%i"),nav_command_index);
if(nav_command_index > g.command_total){
// we are out of commands!
gcs_send_text_P(SEVERITY_LOW,PSTR("out of commands!"));
if (g.closed_loop_nav) { // JLN update - replay the FPL (CLOSED_LOOP_NAV)
restart_nav();
return;
} else {
handle_no_commands();
}
handle_no_commands();
} else {
next_nav_command = temp;
nav_command_ID = next_nav_command.id;