mirror of https://github.com/ArduPilot/ardupilot
SITL: correct compilation for SimOnHardware
This commit is contained in:
parent
6b40fd11d6
commit
34a55166f8
|
@ -45,14 +45,12 @@ rc 2 1450
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "SIM_SerialProximitySensor.h"
|
||||
|
||||
#ifndef HAL_SIM_PS_RPLIDARA2_ENABLED
|
||||
#define HAL_SIM_PS_RPLIDARA2_ENABLED HAL_SIM_SERIALPROXIMITYSENSOR_ENABLED
|
||||
#endif
|
||||
#include "SIM_config.h"
|
||||
|
||||
#if HAL_SIM_PS_RPLIDARA2_ENABLED || HAL_SIM_PS_RPLIDARA1_ENABLED
|
||||
|
||||
#include "SIM_SerialProximitySensor.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
namespace SITL {
|
||||
|
|
|
@ -43,13 +43,12 @@ rc 2 1450
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "SIM_PS_RPLidar.h"
|
||||
|
||||
#ifndef HAL_SIM_PS_RPLIDARA1_ENABLED
|
||||
#define HAL_SIM_PS_RPLIDARA1_ENABLED HAL_SIM_SERIALPROXIMITYSENSOR_ENABLED
|
||||
#endif
|
||||
#include "SIM_config.h"
|
||||
|
||||
#if HAL_SIM_PS_RPLIDARA1_ENABLED
|
||||
|
||||
#include "SIM_PS_RPLidar.h"
|
||||
|
||||
namespace SITL {
|
||||
|
||||
class PS_RPLidarA1 : public PS_RPLidar {
|
||||
|
|
|
@ -43,6 +43,10 @@ rc 2 1450
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "SIM_config.h"
|
||||
|
||||
#if HAL_SIM_PS_RPLIDARA2_ENABLED
|
||||
|
||||
#include "SIM_PS_RPLidar.h"
|
||||
|
||||
namespace SITL {
|
||||
|
@ -54,3 +58,5 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // HAL_SIM_PS_RPLIDARA2_ENABLED
|
||||
|
|
|
@ -18,11 +18,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AP_HAL/AP_HAL_Boards.h>
|
||||
|
||||
#ifndef HAL_SIM_SERIALPROXIMITYSENSOR_ENABLED
|
||||
#define HAL_SIM_SERIALPROXIMITYSENSOR_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_SITL)
|
||||
#endif
|
||||
#include "SIM_config.h"
|
||||
|
||||
#if HAL_SIM_SERIALPROXIMITYSENSOR_ENABLED
|
||||
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
#pragma once
|
||||
|
||||
#include <AP_HAL/AP_HAL_Boards.h>
|
||||
|
||||
#ifndef HAL_SIM_SERIALPROXIMITYSENSOR_ENABLED
|
||||
#define HAL_SIM_SERIALPROXIMITYSENSOR_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_SITL)
|
||||
#endif
|
||||
|
||||
#ifndef HAL_SIM_PS_RPLIDARA1_ENABLED
|
||||
#define HAL_SIM_PS_RPLIDARA1_ENABLED HAL_SIM_SERIALPROXIMITYSENSOR_ENABLED
|
||||
#endif
|
||||
|
||||
#ifndef HAL_SIM_PS_RPLIDARA2_ENABLED
|
||||
#define HAL_SIM_PS_RPLIDARA2_ENABLED HAL_SIM_SERIALPROXIMITYSENSOR_ENABLED
|
||||
#endif
|
Loading…
Reference in New Issue