diff --git a/ArduCopter/control_auto.cpp b/ArduCopter/control_auto.cpp index ebb83ed58f..824a9f277e 100644 --- a/ArduCopter/control_auto.cpp +++ b/ArduCopter/control_auto.cpp @@ -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); diff --git a/ArduCopter/defines.h b/ArduCopter/defines.h index b26fda7776..035bfd4779 100644 --- a/ArduCopter/defines.h +++ b/ArduCopter/defines.h @@ -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