mirror of https://github.com/ArduPilot/ardupilot
AP_Avoidance: stop copying adsb vehicle onto stack in src_id_for_adsb_vehicle
This commit is contained in:
parent
0952ca0abc
commit
c6126ec720
|
@ -252,7 +252,7 @@ void AP_Avoidance::add_obstacle(const uint32_t obstacle_timestamp_ms,
|
|||
return add_obstacle(obstacle_timestamp_ms, src, src_id, loc, vel);
|
||||
}
|
||||
|
||||
uint32_t AP_Avoidance::src_id_for_adsb_vehicle(AP_ADSB::adsb_vehicle_t vehicle) const
|
||||
uint32_t AP_Avoidance::src_id_for_adsb_vehicle(const AP_ADSB::adsb_vehicle_t &vehicle) const
|
||||
{
|
||||
// TODO: need to include squawk code and callsign
|
||||
return vehicle.info.ICAO_address;
|
||||
|
|
|
@ -156,7 +156,7 @@ private:
|
|||
void deinit();
|
||||
|
||||
// get unique id for adsb
|
||||
uint32_t src_id_for_adsb_vehicle(AP_ADSB::adsb_vehicle_t vehicle) const;
|
||||
uint32_t src_id_for_adsb_vehicle(const AP_ADSB::adsb_vehicle_t &vehicle) const;
|
||||
|
||||
void check_for_threats();
|
||||
void update_threat_level(const Location &my_loc,
|
||||
|
|
Loading…
Reference in New Issue