SITL: Use SITL singleton
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
This commit is contained in:
parent
00cb588257
commit
f68b07df1f
@ -73,7 +73,7 @@ void ADSB_Vehicle::update(float delta_t)
|
|||||||
void ADSB::update(void)
|
void ADSB::update(void)
|
||||||
{
|
{
|
||||||
if (_sitl == nullptr) {
|
if (_sitl == nullptr) {
|
||||||
_sitl = (SITL *)AP_Param::find_object("SIM_");
|
_sitl = AP::sitl();
|
||||||
return;
|
return;
|
||||||
} else if (_sitl->adsb_plane_count <= 0) {
|
} else if (_sitl->adsb_plane_count <= 0) {
|
||||||
return;
|
return;
|
||||||
|
@ -121,7 +121,7 @@ void Vicon::update_vicon_position_estimate(const Location &loc,
|
|||||||
bool Vicon::init_sitl_pointer()
|
bool Vicon::init_sitl_pointer()
|
||||||
{
|
{
|
||||||
if (_sitl == nullptr) {
|
if (_sitl == nullptr) {
|
||||||
_sitl = (SITL *)AP_Param::find_object("SIM_");
|
_sitl = AP::sitl();
|
||||||
if (_sitl == nullptr) {
|
if (_sitl == nullptr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user