Browse Source

SITL: provide HAL_x_ENABLED for many SITL features

This allows for the feature to be compiled out
gps-1.3.1
Peter Barker 3 years ago committed by Peter Barker
parent
commit
90f8cbde13
  1. 5
      libraries/SITL/SIM_ADSB.cpp
  2. 10
      libraries/SITL/SIM_ADSB.h
  3. 6
      libraries/SITL/SIM_AIS.cpp
  4. 10
      libraries/SITL/SIM_AIS.h
  5. 4
      libraries/SITL/SIM_AirSim.cpp
  6. 10
      libraries/SITL/SIM_AirSim.h
  7. 4
      libraries/SITL/SIM_CRRCSim.cpp
  8. 10
      libraries/SITL/SIM_CRRCSim.h
  9. 4
      libraries/SITL/SIM_FlightAxis.cpp
  10. 10
      libraries/SITL/SIM_FlightAxis.h
  11. 5
      libraries/SITL/SIM_Gazebo.cpp
  12. 11
      libraries/SITL/SIM_Gazebo.h
  13. 4
      libraries/SITL/SIM_Gimbal.cpp
  14. 10
      libraries/SITL/SIM_Gimbal.h
  15. 4
      libraries/SITL/SIM_JSBSim.cpp
  16. 10
      libraries/SITL/SIM_JSBSim.h
  17. 4
      libraries/SITL/SIM_JSON.cpp
  18. 10
      libraries/SITL/SIM_JSON.h
  19. 6
      libraries/SITL/SIM_JSON_Master.cpp
  20. 10
      libraries/SITL/SIM_JSON_Master.h
  21. 4
      libraries/SITL/SIM_Morse.cpp
  22. 11
      libraries/SITL/SIM_Morse.h
  23. 8
      libraries/SITL/SIM_PS_LightWare.h
  24. 4
      libraries/SITL/SIM_PS_LightWare_SF45B.cpp
  25. 8
      libraries/SITL/SIM_PS_LightWare_SF45B.h
  26. 4
      libraries/SITL/SIM_PS_RPLidarA2.cpp
  27. 8
      libraries/SITL/SIM_PS_RPLidarA2.h
  28. 4
      libraries/SITL/SIM_PS_TeraRangerTower.cpp
  29. 8
      libraries/SITL/SIM_PS_TeraRangerTower.h
  30. 4
      libraries/SITL/SIM_Scrimmage.cpp
  31. 10
      libraries/SITL/SIM_Scrimmage.h
  32. 4
      libraries/SITL/SIM_SerialProximitySensor.cpp
  33. 10
      libraries/SITL/SIM_SerialProximitySensor.h
  34. 4
      libraries/SITL/SIM_SilentWings.cpp
  35. 10
      libraries/SITL/SIM_SilentWings.h
  36. 4
      libraries/SITL/SIM_Webots.cpp
  37. 11
      libraries/SITL/SIM_Webots.h
  38. 4
      libraries/SITL/SIM_XPlane.cpp
  39. 11
      libraries/SITL/SIM_XPlane.h
  40. 4
      libraries/SITL/SIM_last_letter.cpp
  41. 10
      libraries/SITL/SIM_last_letter.h

5
libraries/SITL/SIM_ADSB.cpp

@ -17,6 +17,9 @@ @@ -17,6 +17,9 @@
*/
#include "SIM_ADSB.h"
#if HAL_SIM_ADSB_ENABLED
#include "SITL.h"
#include <stdio.h>
@ -270,3 +273,5 @@ void ADSB::send_report(void) @@ -270,3 +273,5 @@ void ADSB::send_report(void)
}
} // namespace SITL
#endif // HAL_SIM_ADSB_ENABLED

10
libraries/SITL/SIM_ADSB.h

@ -18,6 +18,14 @@ @@ -18,6 +18,14 @@
#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
#if HAL_SIM_ADSB_ENABLED
#include <AP_HAL/utility/Socket.h>
#include "SIM_Aircraft.h"
@ -79,3 +87,5 @@ private: @@ -79,3 +87,5 @@ private:
};
} // namespace SITL
#endif // HAL_SIM_ADSB_ENABLED

6
libraries/SITL/SIM_AIS.cpp

@ -21,8 +21,10 @@ @@ -21,8 +21,10 @@
*/
#include "SIM_AIS.h"
#include <SITL/SITL.h>
#if HAL_SIM_AIS_ENABLED
#include <SITL/SITL.h>
extern const AP_HAL::HAL& hal;
@ -73,3 +75,5 @@ void AIS::update() @@ -73,3 +75,5 @@ void AIS::update()
write_to_autopilot(line, strlen(line));
}
#endif // HAL_SIM_AIS_ENABLED

10
libraries/SITL/SIM_AIS.h

@ -22,6 +22,14 @@ @@ -22,6 +22,14 @@
#pragma once
#include <AP_HAL/AP_HAL_Boards.h>
#ifndef HAL_SIM_AIS_ENABLED
#define HAL_SIM_AIS_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_SITL)
#endif
#if HAL_SIM_AIS_ENABLED
#include "SIM_SerialDevice.h"
#include <SITL/SITL.h>
@ -42,3 +50,5 @@ private: @@ -42,3 +50,5 @@ private:
};
}
#endif // HAL_SIM_AIS_ENABLED

4
libraries/SITL/SIM_AirSim.cpp

@ -18,6 +18,8 @@ @@ -18,6 +18,8 @@
#include "SIM_AirSim.h"
#if HAL_SIM_AIRSIM_ENABLED
#include <stdio.h>
#include <arpa/inet.h>
#include <errno.h>
@ -423,3 +425,5 @@ void AirSim::report_FPS(void) @@ -423,3 +425,5 @@ void AirSim::report_FPS(void)
last_frame_count = state.timestamp;
}
}
#endif // HAL_SIM_AIRSIM_ENABLED

10
libraries/SITL/SIM_AirSim.h

@ -18,6 +18,14 @@ @@ -18,6 +18,14 @@
#pragma once
#include <AP_HAL/AP_HAL_Boards.h>
#ifndef HAL_SIM_AIRSIM_ENABLED
#define HAL_SIM_AIRSIM_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_SITL)
#endif
#if HAL_SIM_AIRSIM_ENABLED
#include <AP_HAL/utility/Socket.h>
#include "SIM_Aircraft.h"
@ -150,3 +158,5 @@ private: @@ -150,3 +158,5 @@ private:
};
}
#endif // HAL_SIM_AIRSIM_ENABLED

4
libraries/SITL/SIM_CRRCSim.cpp

@ -18,6 +18,8 @@ @@ -18,6 +18,8 @@
#include "SIM_CRRCSim.h"
#if HAL_SIM_CRRCSIM_ENABLED
#include <stdio.h>
#include <AP_HAL/AP_HAL.h>
@ -154,3 +156,5 @@ void CRRCSim::update(const struct sitl_input &input) @@ -154,3 +156,5 @@ void CRRCSim::update(const struct sitl_input &input)
}
} // namespace SITL
#endif // HAL_SIM_CRRCSIM_ENABLED

10
libraries/SITL/SIM_CRRCSim.h

@ -18,6 +18,14 @@ @@ -18,6 +18,14 @@
#pragma once
#include <AP_HAL/AP_HAL_Boards.h>
#ifndef HAL_SIM_CRRCSIM_ENABLED
#define HAL_SIM_CRRCSIM_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_SITL)
#endif
#if HAL_SIM_CRRCSIM_ENABLED
#include <AP_HAL/utility/Socket.h>
#include "SIM_Aircraft.h"
@ -77,3 +85,5 @@ private: @@ -77,3 +85,5 @@ private:
};
} // namespace SITL
#endif // HAL_SIM_CRRCSIM_ENABLED

4
libraries/SITL/SIM_FlightAxis.cpp

@ -18,6 +18,8 @@ @@ -18,6 +18,8 @@
#include "SIM_FlightAxis.h"
#if HAL_SIM_FLIGHTAXIS_ENABLED
#include <arpa/inet.h>
#include <errno.h>
#include <fcntl.h>
@ -588,3 +590,5 @@ void FlightAxis::socket_creator(void) @@ -588,3 +590,5 @@ void FlightAxis::socket_creator(void)
pthread_mutex_unlock(&sockmtx);
}
}
#endif // HAL_SIM_FLIGHTAXIS_ENABLED

10
libraries/SITL/SIM_FlightAxis.h

@ -18,6 +18,14 @@ @@ -18,6 +18,14 @@
#pragma once
#include <AP_HAL/AP_HAL_Boards.h>
#ifndef HAL_SIM_FLIGHTAXIS_ENABLED
#define HAL_SIM_FLIGHTAXIS_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_SITL)
#endif
#if HAL_SIM_FLIGHTAXIS_ENABLED
#include <AP_HAL/utility/Socket.h>
#include "SIM_Aircraft.h"
@ -194,3 +202,5 @@ private: @@ -194,3 +202,5 @@ private:
} // namespace SITL
#endif // HAL_SIM_FLIGHTAXIS_ENABLED

5
libraries/SITL/SIM_Gazebo.cpp

@ -18,6 +18,8 @@ @@ -18,6 +18,8 @@
#include "SIM_Gazebo.h"
#if HAL_SIM_GAZEBO_ENABLED
#include <stdio.h>
#include <errno.h>
@ -171,3 +173,6 @@ void Gazebo::update(const struct sitl_input &input) @@ -171,3 +173,6 @@ void Gazebo::update(const struct sitl_input &input)
}
} // namespace SITL
#endif // HAL_SIM_GAZEBO_ENABLED

11
libraries/SITL/SIM_Gazebo.h

@ -18,6 +18,14 @@ @@ -18,6 +18,14 @@
#pragma once
#include <AP_HAL/AP_HAL_Boards.h>
#ifndef HAL_SIM_GAZEBO_ENABLED
#define HAL_SIM_GAZEBO_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_SITL)
#endif
#if HAL_SIM_GAZEBO_ENABLED
#include "SIM_Aircraft.h"
#include <AP_HAL/utility/Socket.h>
@ -75,3 +83,6 @@ private: @@ -75,3 +83,6 @@ private:
};
} // namespace SITL
#endif // HAL_SIM_GAZEBO_ENABLED

4
libraries/SITL/SIM_Gimbal.cpp

@ -18,6 +18,8 @@ @@ -18,6 +18,8 @@
#include "SIM_Gimbal.h"
#if HAL_SIM_GIMBAL_ENABLED
#include <stdio.h>
#include "SIM_Aircraft.h"
@ -413,3 +415,5 @@ void Gimbal::send_report(void) @@ -413,3 +415,5 @@ void Gimbal::send_report(void)
}
} // namespace SITL
#endif // HAL_SIM_GIMBAL_ENABLED

10
libraries/SITL/SIM_Gimbal.h

@ -18,6 +18,14 @@ @@ -18,6 +18,14 @@
#pragma once
#include <AP_HAL/AP_HAL_Boards.h>
#ifndef HAL_SIM_GIMBAL_ENABLED
#define HAL_SIM_GIMBAL_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_SITL)
#endif
#if HAL_SIM_GIMBAL_ENABLED
#include <AP_HAL/utility/Socket.h>
#include "SIM_Aircraft.h"
@ -111,3 +119,5 @@ private: @@ -111,3 +119,5 @@ private:
};
} // namespace SITL
#endif // HAL_SIM_GIMBAL_ENABLED

4
libraries/SITL/SIM_JSBSim.cpp

@ -18,6 +18,8 @@ @@ -18,6 +18,8 @@
#include "SIM_JSBSim.h"
#if HAL_SIM_JSBSIM_ENABLED
#include <arpa/inet.h>
#include <errno.h>
#include <fcntl.h>
@ -482,3 +484,5 @@ void JSBSim::update(const struct sitl_input &input) @@ -482,3 +484,5 @@ void JSBSim::update(const struct sitl_input &input)
}
} // namespace SITL
#endif // HAL_SIM_JSBSIM_ENABLED

10
libraries/SITL/SIM_JSBSim.h

@ -18,6 +18,14 @@ @@ -18,6 +18,14 @@
#pragma once
#include <AP_HAL/AP_HAL_Boards.h>
#ifndef HAL_SIM_JSBSIM_ENABLED
#define HAL_SIM_JSBSIM_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_SITL)
#endif
#if HAL_SIM_JSBSIM_ENABLED
#include <AP_HAL/utility/Socket.h>
#include "SIM_Aircraft.h"
@ -176,3 +184,5 @@ public: @@ -176,3 +184,5 @@ public:
};
} // namespace SITL
#endif // HAL_SIM_JSBSIM_ENABLED

4
libraries/SITL/SIM_JSON.cpp

@ -18,6 +18,8 @@ @@ -18,6 +18,8 @@
#include "SIM_JSON.h"
#if HAL_SIM_JSON_ENABLED
#include <stdio.h>
#include <arpa/inet.h>
#include <errno.h>
@ -448,3 +450,5 @@ void JSON::update(const struct sitl_input &input) @@ -448,3 +450,5 @@ void JSON::update(const struct sitl_input &input)
}
#endif
}
#endif // HAL_SIM_JSON_ENABLED

10
libraries/SITL/SIM_JSON.h

@ -14,6 +14,14 @@ @@ -14,6 +14,14 @@
*/
#pragma once
#include <AP_HAL/AP_HAL_Boards.h>
#ifndef HAL_SIM_JSON_ENABLED
#define HAL_SIM_JSON_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_SITL)
#endif
#if HAL_SIM_JSON_ENABLED
#include <AP_HAL/utility/Socket.h>
#include "SIM_Aircraft.h"
@ -143,3 +151,5 @@ private: @@ -143,3 +151,5 @@ private:
};
}
#endif // HAL_SIM_JSON_ENABLED

6
libraries/SITL/SIM_JSON_Master.cpp

@ -17,6 +17,9 @@ @@ -17,6 +17,9 @@
*/
#include "SIM_JSON_Master.h"
#if HAL_SIM_JSON_MASTER_ENABLED
#include <AP_Logger/AP_Logger.h>
#include <errno.h>
@ -183,3 +186,6 @@ void JSON_Master::send(const struct sitl_fdm &output, const Vector3d &position) @@ -183,3 +186,6 @@ void JSON_Master::send(const struct sitl_fdm &output, const Vector3d &position)
list->sock_out.send(json_out,length);
}
}
#endif // HAL_SIM_JSON_MASTER_ENABLED

10
libraries/SITL/SIM_JSON_Master.h

@ -18,6 +18,14 @@ @@ -18,6 +18,14 @@
#pragma once
#include <AP_HAL/AP_HAL_Boards.h>
#ifndef HAL_SIM_JSON_MASTER_ENABLED
#define HAL_SIM_JSON_MASTER_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_SITL)
#endif
#if HAL_SIM_JSON_MASTER_ENABLED
#include "SITL_Input.h"
#include <AP_HAL/utility/Socket.h>
#include <AP_Math/AP_Math.h>
@ -54,3 +62,5 @@ private: @@ -54,3 +62,5 @@ private:
};
}
#endif // HAL_SIM_JSON_MASTER_ENABLED

4
libraries/SITL/SIM_Morse.cpp

@ -18,6 +18,8 @@ @@ -18,6 +18,8 @@
#include "SIM_Morse.h"
#if HAL_SIM_MORSE_ENABLED
#include <arpa/inet.h>
#include <errno.h>
#include <fcntl.h>
@ -671,3 +673,5 @@ void Morse::send_report(void) @@ -671,3 +673,5 @@ void Morse::send_report(void)
}
}
#endif // HAL_SIM_MORSE_ENABLED

11
libraries/SITL/SIM_Morse.h

@ -18,6 +18,14 @@ @@ -18,6 +18,14 @@
#pragma once
#include <AP_HAL/AP_HAL_Boards.h>
#ifndef HAL_SIM_MORSE_ENABLED
#define HAL_SIM_MORSE_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_SITL)
#endif
#if HAL_SIM_MORSE_ENABLED
#include <AP_HAL/utility/Socket.h>
#include "SIM_Aircraft.h"
@ -154,3 +162,6 @@ private: @@ -154,3 +162,6 @@ private:
} // namespace SITL
#endif // HAL_SIM_MORSE_ENABLED

8
libraries/SITL/SIM_PS_LightWare.h

@ -21,6 +21,12 @@ @@ -21,6 +21,12 @@
#include "SIM_SerialProximitySensor.h"
#ifndef HAL_SIM_PS_LIGHTWARE_ENABLED
#define HAL_SIM_PS_LIGHTWARE_ENABLED HAL_SIM_SERIALPROXIMITYSENSOR_ENABLED
#endif
#if HAL_SIM_PS_LIGHTWARE_ENABLED
#include <stdio.h>
namespace SITL {
@ -35,3 +41,5 @@ private: @@ -35,3 +41,5 @@ private:
};
};
#endif // HAL_SIM_PS_LIGHTWARE_ENABLED

4
libraries/SITL/SIM_PS_LightWare_SF45B.cpp

@ -18,6 +18,8 @@ @@ -18,6 +18,8 @@
#include "SIM_PS_LightWare_SF45B.h"
#if HAL_SIM_PS_LIGHTWARE_SF45B_ENABLED
#include <GCS_MAVLink/GCS.h>
#include <stdio.h>
#include <errno.h>
@ -220,3 +222,5 @@ void PS_LightWare_SF45B::update_output_scan(const Location &location) @@ -220,3 +222,5 @@ void PS_LightWare_SF45B::update_output_scan(const Location &location)
send((char*)&packed_distance_data, sizeof(packed_distance_data));
}
}
#endif // HAL_SIM_PS_LIGHTWARE_SF45B_ENABLED

8
libraries/SITL/SIM_PS_LightWare_SF45B.h

@ -43,6 +43,12 @@ rc 2 1450 @@ -43,6 +43,12 @@ rc 2 1450
#include "SIM_PS_LightWare.h"
#ifndef HAL_SIM_PS_LIGHTWARE_SF45B_ENABLED
#define HAL_SIM_PS_LIGHTWARE_SF45B_ENABLED HAL_SIM_PS_LIGHTWARE_ENABLED
#endif
#if HAL_SIM_PS_LIGHTWARE_SF45B_ENABLED
#include <AP_Math/crc.h>
#include <AP_InternalError/AP_InternalError.h>
@ -258,3 +264,5 @@ private: @@ -258,3 +264,5 @@ private:
};
};
#endif // HAL_SIM_PS_LIGHTWARE_SF45B_ENABLED

4
libraries/SITL/SIM_PS_RPLidarA2.cpp

@ -18,6 +18,8 @@ @@ -18,6 +18,8 @@
#include "SIM_PS_RPLidarA2.h"
#if HAL_SIM_PS_RPLIDARA2_ENABLED
#include <GCS_MAVLink/GCS.h>
#include <stdio.h>
#include <errno.h>
@ -229,3 +231,5 @@ void PS_RPLidarA2::send_response_descriptor(uint32_t data_response_length, SendM @@ -229,3 +231,5 @@ void PS_RPLidarA2::send_response_descriptor(uint32_t data_response_length, SendM
abort();
}
}
#endif // HAL_SIM_PS_RPLIDARA2_ENABLED

8
libraries/SITL/SIM_PS_RPLidarA2.h

@ -45,6 +45,12 @@ rc 2 1450 @@ -45,6 +45,12 @@ rc 2 1450
#include "SIM_SerialProximitySensor.h"
#ifndef HAL_SIM_PS_RPLIDARA2_ENABLED
#define HAL_SIM_PS_RPLIDARA2_ENABLED HAL_SIM_SERIALPROXIMITYSENSOR_ENABLED
#endif
#if HAL_SIM_PS_RPLIDARA2_ENABLED
#include <stdio.h>
namespace SITL {
@ -127,3 +133,5 @@ private: @@ -127,3 +133,5 @@ private:
};
};
#endif // HAL_SIM_PS_RPLIDARA2_ENABLED

4
libraries/SITL/SIM_PS_TeraRangerTower.cpp

@ -18,6 +18,8 @@ @@ -18,6 +18,8 @@
#include "SIM_PS_TeraRangerTower.h"
#if HAL_SIM_PS_TERARANGERTOWER_ENABLED
#include <GCS_MAVLink/GCS.h>
#include <AP_HAL/utility/sparse-endian.h>
#include <stdio.h>
@ -75,3 +77,5 @@ void PS_TeraRangerTower::update(const Location &location) @@ -75,3 +77,5 @@ void PS_TeraRangerTower::update(const Location &location)
{
update_output(location);
}
#endif // HAL_SIM_PS_TERARANGERTOWER_ENABLED

8
libraries/SITL/SIM_PS_TeraRangerTower.h

@ -43,6 +43,12 @@ rc 2 1450 @@ -43,6 +43,12 @@ rc 2 1450
#include "SIM_SerialProximitySensor.h"
#ifndef HAL_SIM_PS_TERARANGERTOWER_ENABLED
#define HAL_SIM_PS_TERARANGERTOWER_ENABLED HAL_SIM_SERIALPROXIMITYSENSOR_ENABLED
#endif
#if HAL_SIM_PS_TERARANGERTOWER_ENABLED
#include <stdio.h>
namespace SITL {
@ -65,3 +71,5 @@ private: @@ -65,3 +71,5 @@ private:
};
};
#endif // HAL_SIM_PS_TERARANGERTOWER_ENABLED

4
libraries/SITL/SIM_Scrimmage.cpp

@ -18,6 +18,8 @@ @@ -18,6 +18,8 @@
#include "SIM_Scrimmage.h"
#if HAL_SIM_SCRIMMAGE_ENABLED
#include <stdio.h>
#include <inttypes.h>
#include <sys/stat.h>
@ -130,3 +132,5 @@ void Scrimmage::update(const struct sitl_input &input) @@ -130,3 +132,5 @@ void Scrimmage::update(const struct sitl_input &input)
}
} // namespace SITL
#endif

10
libraries/SITL/SIM_Scrimmage.h

@ -18,6 +18,14 @@ @@ -18,6 +18,14 @@
#pragma once
#include <AP_HAL/AP_HAL_Boards.h>
#ifndef HAL_SIM_SCRIMMAGE_ENABLED
#define HAL_SIM_SCRIMMAGE_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_SITL)
#endif
#if HAL_SIM_SCRIMMAGE_ENABLED
#include <string>
#include <AP_HAL/utility/Socket.h>
@ -83,3 +91,5 @@ private: @@ -83,3 +91,5 @@ private:
};
} // namespace SITL
#endif // HAL_SIM_SCRIMMAGE_ENABLED

4
libraries/SITL/SIM_SerialProximitySensor.cpp

@ -18,6 +18,8 @@ @@ -18,6 +18,8 @@
#include "SIM_SerialProximitySensor.h"
#if HAL_SIM_SERIALPROXIMITYSENSOR_ENABLED
#include <AP_Math/AP_Math.h>
#include <stdio.h>
@ -134,3 +136,5 @@ float SerialProximitySensor::measure_distance_at_angle_bf(const Location &locati @@ -134,3 +136,5 @@ float SerialProximitySensor::measure_distance_at_angle_bf(const Location &locati
// ::fprintf(stderr, "Distance @%f = %fm\n", angle, min_dist_cm/100.0f);
return min_dist_cm / 100.0f;
}
#endif // HAL_SIM_SERIALPROXIMITYSENSOR_ENABLED

10
libraries/SITL/SIM_SerialProximitySensor.h

@ -18,6 +18,14 @@ @@ -18,6 +18,14 @@
#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
#if HAL_SIM_SERIALPROXIMITYSENSOR_ENABLED
#include "SIM_Aircraft.h"
#include <SITL/SITL.h>
@ -56,3 +64,5 @@ private: @@ -56,3 +64,5 @@ private:
};
}
#endif

4
libraries/SITL/SIM_SilentWings.cpp

@ -18,6 +18,8 @@ @@ -18,6 +18,8 @@
#include "SIM_SilentWings.h"
#if HAL_SIM_SILENTWINGS_ENABLED
#include <stdio.h>
#include <errno.h>
@ -318,3 +320,5 @@ void SilentWings::update(const struct sitl_input &input) @@ -318,3 +320,5 @@ void SilentWings::update(const struct sitl_input &input)
report.frame_count = 0;
}
}
#endif // HAL_SIM_SILENTWINGS_ENABLED

10
libraries/SITL/SIM_SilentWings.h

@ -15,6 +15,14 @@ @@ -15,6 +15,14 @@
#pragma once
#include <AP_HAL/AP_HAL_Boards.h>
#ifndef HAL_SIM_SILENTWINGS_ENABLED
#define HAL_SIM_SILENTWINGS_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_SITL)
#endif
#if HAL_SIM_SILENTWINGS_ENABLED
#include <AP_HAL/utility/Socket.h>
#include "SIM_Aircraft.h"
@ -110,3 +118,5 @@ private: @@ -110,3 +118,5 @@ private:
};
} // namespace SITL
#endif // HAL_SIM_SILENTWINGS_ENABLED

4
libraries/SITL/SIM_Webots.cpp

@ -18,6 +18,8 @@ @@ -18,6 +18,8 @@
#include "SIM_Webots.h"
#if HAL_SIM_WEBOTS_ENABLED
#include <arpa/inet.h>
#include <errno.h>
#include <fcntl.h>
@ -567,3 +569,5 @@ void Webots::report_FPS(void) @@ -567,3 +569,5 @@ void Webots::report_FPS(void)
// last_frame_count_s = state.timestamp;
// }
}
#endif // HAL_SIM_WEBOTS_ENABLED

11
libraries/SITL/SIM_Webots.h

@ -17,6 +17,15 @@ @@ -17,6 +17,15 @@
*/
#pragma once
#include <AP_HAL/AP_HAL_Boards.h>
#ifndef HAL_SIM_WEBOTS_ENABLED
#define HAL_SIM_WEBOTS_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_SITL)
#endif
#if HAL_SIM_WEBOTS_ENABLED
#include <cmath>
#include <AP_HAL/utility/Socket.h>
#include "SIM_Aircraft.h"
@ -135,3 +144,5 @@ private: @@ -135,3 +144,5 @@ private:
} // namespace SITL
#endif // HAL_SIM_WEBOTS_ENABLED

4
libraries/SITL/SIM_XPlane.cpp

@ -18,6 +18,8 @@ @@ -18,6 +18,8 @@
#include "SIM_XPlane.h"
#if HAL_SIM_XPLANE_ENABLED
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
@ -488,3 +490,5 @@ void XPlane::update(const struct sitl_input &input) @@ -488,3 +490,5 @@ void XPlane::update(const struct sitl_input &input)
}
} // namespace SITL
#endif // HAL_SIM_XPLANE_ENABLED

11
libraries/SITL/SIM_XPlane.h

@ -18,6 +18,14 @@ @@ -18,6 +18,14 @@
#pragma once
#include <AP_HAL/AP_HAL_Boards.h>
#ifndef HAL_SIM_XPLANE_ENABLED
#define HAL_SIM_XPLANE_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_SITL)
#endif
#if HAL_SIM_XPLANE_ENABLED
#include <AP_HAL/utility/Socket.h>
#include "SIM_Aircraft.h"
@ -112,3 +120,6 @@ private: @@ -112,3 +120,6 @@ private:
} // namespace SITL
#endif // HAL_SIM_XPLANE_ENABLED

4
libraries/SITL/SIM_last_letter.cpp

@ -18,6 +18,8 @@ @@ -18,6 +18,8 @@
#include "SIM_last_letter.h"
#if HAL_SIM_LAST_LETTER_ENABLED
#include <fcntl.h>
#include <stdio.h>
#include <sys/stat.h>
@ -135,3 +137,5 @@ void last_letter::update(const struct sitl_input &input) @@ -135,3 +137,5 @@ void last_letter::update(const struct sitl_input &input)
}
} // namespace SITL
#endif // HAL_SIM_LAST_LETTER_ENABLED

10
libraries/SITL/SIM_last_letter.h

@ -18,6 +18,14 @@ @@ -18,6 +18,14 @@
#pragma once
#include <AP_HAL/AP_HAL_Boards.h>
#ifndef HAL_SIM_LAST_LETTER_ENABLED
#define HAL_SIM_LAST_LETTER_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_SITL)
#endif
#if HAL_SIM_LAST_LETTER_ENABLED
#include <AP_HAL/utility/Socket.h>
#include "SIM_Aircraft.h"
@ -73,3 +81,5 @@ private: @@ -73,3 +81,5 @@ private:
};
} // namespace SITL
#endif // HAL_SIM_LAST_LETTER_ENABLED

Loading…
Cancel
Save