AP_IRLock: Replace find_object with SITL singleton

This commit is contained in:
Pierre Kancir 2018-06-27 21:59:10 +02:00 committed by Tom Pittenger
parent b66b4775bc
commit 0ee6e41f6e
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ AP_IRLock_SITL::AP_IRLock_SITL() :
void AP_IRLock_SITL::init(int8_t bus)
{
SITL::SITL *sitl = (SITL::SITL *)AP_Param::find_object("SIM_");
SITL::SITL *sitl = AP::sitl();
// try to bind to a specific port so that if we restart ArduPilot
// Gazebo keeps sending us packets. Not strictly necessary but
// useful for debugging