Browse Source

Copter: log error if circle does not initialise correctly

mission-4.1.18
Randy Mackay 9 years ago
parent
commit
3d31c3b936
  1. 1
      ArduCopter/control_auto.cpp
  2. 1
      ArduCopter/defines.h

1
ArduCopter/control_auto.cpp

@ -456,6 +456,7 @@ void Copter::auto_circle_movetoedge_start(const Location_Class &circle_center, f @@ -456,6 +456,7 @@ void Copter::auto_circle_movetoedge_start(const Location_Class &circle_center, f
if (!circle_center.get_vector_from_origin_NEU(circle_center_neu)) {
// default to current position and log error
circle_center_neu = inertial_nav.get_position();
Log_Write_Error(ERROR_SUBSYSTEM_NAVIGATION, ERROR_CODE_FAILED_CIRCLE_INIT);
}
circle_nav.set_center(circle_center_neu);

1
ArduCopter/defines.h

@ -407,6 +407,7 @@ enum ThrowModeState { @@ -407,6 +407,7 @@ enum ThrowModeState {
// subsystem specific error codes -- navigation
#define ERROR_CODE_FAILED_TO_SET_DESTINATION 2
#define ERROR_CODE_RESTARTED_RTL 3
#define ERROR_CODE_FAILED_CIRCLE_INIT 4
// parachute failed to deploy because of low altitude or landed
#define ERROR_CODE_PARACHUTE_TOO_LOW 2

Loading…
Cancel
Save