|
|
|
@ -149,8 +149,10 @@ void Copter::do_avoid_action(){
@@ -149,8 +149,10 @@ void Copter::do_avoid_action(){
|
|
|
|
|
AP_Proximity *proximity = AP::proximity(); |
|
|
|
|
if(proximity == nullptr) |
|
|
|
|
return; |
|
|
|
|
proximity->get_horizontal_distance(0,proxy_dist); |
|
|
|
|
|
|
|
|
|
bool get_new_dist = proximity->get_horizontal_distance(0,proxy_dist); |
|
|
|
|
if(get_new_dist == false){ |
|
|
|
|
proxy_dist = avoid.get_zr_avd_max() + 1.0; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if(avoid.get_zr_mode() == 2){ |
|
|
|
|
uint16_t rc10_in = RC_Channels::rc_channel(CH_12)->get_radio_in(); |
|
|
|
|