SITL: use SIM_config for ship and adsb simulations

This commit is contained in:
Peter Barker 2023-05-12 15:53:31 +10:00 committed by Peter Barker
parent 9ee6be8a55
commit 320bd43334
5 changed files with 16 additions and 12 deletions

View File

@ -16,10 +16,12 @@
ADSB simulator class for MAVLink ADSB peripheral
*/
#include "SIM_ADSB.h"
#include "SIM_config.h"
#if HAL_SIM_ADSB_ENABLED
#include "SIM_ADSB.h"
#include "SITL.h"
#include <stdio.h>

View File

@ -18,11 +18,7 @@
#pragma once
#include <AP_HAL/AP_HAL_Boards.h>
#ifndef HAL_SIM_ADSB_ENABLED
#define HAL_SIM_ADSB_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_SITL)
#endif
#include "SIM_config.h"
#if HAL_SIM_ADSB_ENABLED

View File

@ -16,10 +16,12 @@
simulate ship takeoff/landing
*/
#include "SIM_Ship.h"
#include "SIM_config.h"
#if AP_SIM_SHIP_ENABLED
#include "SIM_Ship.h"
#include "SITL.h"
#include <stdio.h>

View File

@ -18,11 +18,7 @@
#pragma once
#include <AP_HAL/AP_HAL_Boards.h>
#ifndef AP_SIM_SHIP_ENABLED
#define AP_SIM_SHIP_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_SITL)
#endif
#include "SIM_config.h"
#if AP_SIM_SHIP_ENABLED

View File

@ -2,6 +2,10 @@
#include <AP_HAL/AP_HAL_Boards.h>
#ifndef HAL_SIM_ADSB_ENABLED
#define HAL_SIM_ADSB_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_SITL)
#endif
#ifndef HAL_SIM_SERIALPROXIMITYSENSOR_ENABLED
#define HAL_SIM_SERIALPROXIMITYSENSOR_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_SITL)
#endif
@ -17,3 +21,7 @@
#ifndef AP_SIM_IS31FL3195_ENABLED
#define AP_SIM_IS31FL3195_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_SITL)
#endif
#ifndef AP_SIM_SHIP_ENABLED
#define AP_SIM_SHIP_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_SITL)
#endif