Copter: log error if circle does not initialise correctly
This commit is contained in:
parent
85963cecb4
commit
3d31c3b936
@ -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);
|
||||
|
||||
|
@ -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…
Reference in New Issue
Block a user