Sub: Remove VELHOLD mode

Obsolete since GUIDED implemented
This commit is contained in:
Jacob Walser
2017-03-23 01:36:17 -04:00
parent 5b4ec88f11
commit b0e5a93099
5 changed files with 2 additions and 241 deletions
-2
View File
@@ -49,7 +49,6 @@ NOINLINE void Sub::send_heartbeat(mavlink_channel_t chan)
base_mode = MAV_MODE_FLAG_STABILIZE_ENABLED;
switch (control_mode) {
case AUTO:
case VELHOLD:
case GUIDED:
case CIRCLE:
case POSHOLD:
@@ -140,7 +139,6 @@ NOINLINE void Sub::send_extended_status1(mavlink_channel_t chan)
case ALT_HOLD:
case AUTO:
case GUIDED:
case VELHOLD:
case CIRCLE:
case SURFACE:
case POSHOLD:
+1 -2
View File
@@ -610,8 +610,7 @@ private:
void guided_limit_set(uint32_t timeout_ms, float alt_min_cm, float alt_max_cm, float horiz_max_cm);
void guided_limit_init_time_and_pos();
bool guided_limit_check();
bool velhold_init(bool ignore_checks);
void velhold_run();
bool poshold_init(bool ignore_checks);
void poshold_run();
File diff suppressed because it is too large Load Diff
-1
View File
@@ -40,7 +40,6 @@ enum control_mode_t {
ALT_HOLD = 2, // manual angle with automatic depth/throttle
AUTO = 3, // not implemented in sub // fully automatic waypoint control using mission commands
GUIDED = 4, // not implemented in sub // fully automatic fly to coordinate or fly at velocity/direction using GCS immediate commands
VELHOLD = 5, // automatic x/y velocity control and automatic depth/throttle
CIRCLE = 7, // not implemented in sub // automatic circular flight with automatic throttle
SURFACE = 9, // automatically return to surface, pilot maintains horizontal control
POSHOLD = 16, // automatic position hold with manual override, with automatic throttle
+1 -13
View File
@@ -45,10 +45,6 @@ bool Sub::set_mode(control_mode_t mode, mode_reason_t reason)
success = circle_init(ignore_checks);
break;
case VELHOLD:
success = velhold_init(ignore_checks);
break;
case GUIDED:
success = guided_init(ignore_checks);
break;
@@ -132,10 +128,6 @@ void Sub::update_flight_mode()
circle_run();
break;
case VELHOLD:
velhold_run();
break;
case GUIDED:
guided_run();
break;
@@ -179,7 +171,6 @@ bool Sub::mode_requires_GPS(control_mode_t mode)
switch (mode) {
case AUTO:
case GUIDED:
case VELHOLD:
case CIRCLE:
case POSHOLD:
return true;
@@ -209,7 +200,7 @@ bool Sub::mode_has_manual_throttle(control_mode_t mode)
// arming_from_gcs should be set to true if the arming request comes from the ground station
bool Sub::mode_allows_arming(control_mode_t mode, bool arming_from_gcs)
{
if (mode_has_manual_throttle(mode) || mode == VELHOLD || mode == ALT_HOLD || mode == POSHOLD || (arming_from_gcs && mode == GUIDED)) {
if (mode_has_manual_throttle(mode) || mode == ALT_HOLD || mode == POSHOLD || (arming_from_gcs && mode == GUIDED)) {
return true;
}
return false;
@@ -254,9 +245,6 @@ void Sub::print_flight_mode(AP_HAL::BetterStream *port, uint8_t mode)
case GUIDED:
port->print("GUIDED");
break;
case VELHOLD:
port->print("VELHOLD");
break;
case CIRCLE:
port->print("CIRCLE");
break;