|
|
|
@ -5,7 +5,18 @@
@@ -5,7 +5,18 @@
|
|
|
|
|
void Copter::do_avoid_action(){ |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
// bool Copter::close_to_EKF_origin(const Location& loc)
|
|
|
|
|
// {
|
|
|
|
|
// // check distance to EKF origin
|
|
|
|
|
// const struct Location &ekf_origin = inertial_nav.get_origin();
|
|
|
|
|
// if (get_distance(ekf_origin, loc) < 15 && ekf_origin.alt < 5000) {
|
|
|
|
|
// // gcs().send_text(MAV_SEVERITY_INFO,"NOTICE: dist:%.2f,alt:%d",get_distance(ekf_origin, loc) ,ekf_origin.alt);
|
|
|
|
|
// return true;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// // close enough to origin
|
|
|
|
|
// return false;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
bool Copter::zr_radio_valid(){ |
|
|
|
|
if(!motors->armed()){ |
|
|
|
@ -66,10 +77,7 @@ void Copter::zr_SuperSlowLoop(){
@@ -66,10 +77,7 @@ void Copter::zr_SuperSlowLoop(){
|
|
|
|
|
relay.off(3); |
|
|
|
|
// rc().set_enable_ch();
|
|
|
|
|
updownStatus =UpDown_TakeOffStart; |
|
|
|
|
mavlink_zr_flying_status_t zr_flying_status_t;
|
|
|
|
|
zr_flying_status_t.updown_status = updownStatus; |
|
|
|
|
//TODO UPDATE COUNTDOWN
|
|
|
|
|
gcs().update_zr_fly_status(&zr_flying_status_t); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
if(before_fly){ |
|
|
|
|
uint8_t cnt,cacl_volt_pst; |
|
|
|
|