AP_RPM: correct SITL backend compilation if RPM disabled in SITL

This commit is contained in:
Peter Barker 2022-09-28 11:38:10 +10:00 committed by Peter Barker
parent e2fd4fc782
commit 855f4fe2d2
2 changed files with 9 additions and 9 deletions

View File

@ -13,12 +13,11 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include "RPM_SITL.h" #include "RPM_SITL.h"
extern const AP_HAL::HAL& hal; #if AP_RPM_SIM_ENABLED
#include <AP_HAL/AP_HAL.h>
/* /*
open the sensor in constructor open the sensor in constructor
@ -46,4 +45,4 @@ void AP_RPM_SITL::update(void)
} }
#endif // CONFIG_HAL_BOARD #endif // AP_RPM_SIM_ENABLED

View File

@ -14,9 +14,10 @@
*/ */
#pragma once #pragma once
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include "AP_RPM.h" #include "AP_RPM.h"
#if AP_RPM_SIM_ENABLED
#include "RPM_Backend.h" #include "RPM_Backend.h"
#include <SITL/SITL.h> #include <SITL/SITL.h>
@ -33,4 +34,4 @@ private:
uint8_t instance; uint8_t instance;
}; };
#endif // CONFIG_HAL_BOARD #endif // AP_RPM_SIM_ENABLED