From 0ee6e41f6e8e0ce341c4671797b25a2d34421f29 Mon Sep 17 00:00:00 2001 From: Pierre Kancir Date: Wed, 27 Jun 2018 21:59:10 +0200 Subject: [PATCH] AP_IRLock: Replace find_object with SITL singleton --- libraries/AP_IRLock/AP_IRLock_SITL.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_IRLock/AP_IRLock_SITL.cpp b/libraries/AP_IRLock/AP_IRLock_SITL.cpp index 5601347e2a..5352b79df8 100644 --- a/libraries/AP_IRLock/AP_IRLock_SITL.cpp +++ b/libraries/AP_IRLock/AP_IRLock_SITL.cpp @@ -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