mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 07:03:33 +08:00
cmake use standard mechanisms for settings flags
This commit is contained in:
committed by
David Sidrane
parent
11be2b8873
commit
3e0a3559a9
@@ -665,7 +665,7 @@ void Logger::add_default_topics()
|
||||
add_topic("vtol_vehicle_status", 200);
|
||||
add_topic("wind_estimate", 200);
|
||||
|
||||
#ifdef CONFIG_ARCH_BOARD_SITL
|
||||
#ifdef CONFIG_ARCH_BOARD_PX4_SITL
|
||||
add_topic("actuator_armed");
|
||||
add_topic("actuator_controls_virtual_fw");
|
||||
add_topic("actuator_controls_virtual_mc");
|
||||
@@ -681,7 +681,7 @@ void Logger::add_default_topics()
|
||||
add_topic("vehicle_global_position_groundtruth", 100);
|
||||
add_topic("vehicle_local_position_groundtruth", 100);
|
||||
add_topic("vehicle_roi");
|
||||
#endif
|
||||
#endif /* CONFIG_ARCH_BOARD_PX4_SITL */
|
||||
}
|
||||
|
||||
void Logger::add_high_rate_topics()
|
||||
|
||||
@@ -1337,7 +1337,7 @@ void Mavlink::send_autopilot_capabilites()
|
||||
memcpy(&msg.uid2, &px4_guid, sizeof(msg.uid2));
|
||||
#endif /* BOARD_HAS_NO_UUID */
|
||||
|
||||
#ifdef CONFIG_ARCH_BOARD_SITL
|
||||
#ifdef CONFIG_ARCH_BOARD_PX4_SITL
|
||||
// To avoid that multiple SITL instances have the same UUID, we add the mavlink
|
||||
// system ID. We subtract 1, so that the first UUID remains unchanged given the
|
||||
// default system ID is 1.
|
||||
@@ -1345,7 +1345,7 @@ void Mavlink::send_autopilot_capabilites()
|
||||
// Note that the UUID show in `ver` will still be the same for all instances.
|
||||
msg.uid += mavlink_system.sysid - 1;
|
||||
msg.uid2[0] += mavlink_system.sysid - 1;
|
||||
#endif
|
||||
#endif /* CONFIG_ARCH_BOARD_PX4_SITL */
|
||||
mavlink_msg_autopilot_version_send_struct(get_channel(), &msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,6 +145,7 @@ if (GENERATE_RTPS_BRIDGE)
|
||||
git_micro_cdr
|
||||
microcdr
|
||||
)
|
||||
add_dependencies(microcdr prebuild_targets)
|
||||
|
||||
# microCDR
|
||||
target_include_directories(uorb_msgs_microcdr
|
||||
|
||||
@@ -1022,7 +1022,7 @@ void VotedSensorsUpdate::print_status()
|
||||
bool
|
||||
VotedSensorsUpdate::apply_gyro_calibration(DevHandle &h, const struct gyro_calibration_s *gcal, const int device_id)
|
||||
{
|
||||
#if !defined(__PX4_QURT) && !defined(__PX4_POSIX_RPI) && !defined(__PX4_POSIX_BEBOP) && !defined(__PX4_POSIX_BBBLUE)
|
||||
#if defined(__PX4_NUTTX)
|
||||
|
||||
/* On most systems, we can just use the IOCTL call to set the calibration params. */
|
||||
return !h.ioctl(GYROIOCSSCALE, (long unsigned int)gcal);
|
||||
@@ -1036,7 +1036,7 @@ VotedSensorsUpdate::apply_gyro_calibration(DevHandle &h, const struct gyro_calib
|
||||
bool
|
||||
VotedSensorsUpdate::apply_accel_calibration(DevHandle &h, const struct accel_calibration_s *acal, const int device_id)
|
||||
{
|
||||
#if !defined(__PX4_QURT) && !defined(__PX4_POSIX_RPI) && !defined(__PX4_POSIX_BEBOP) && !defined(__PX4_POSIX_BBBLUE)
|
||||
#if defined(__PX4_NUTTX)
|
||||
|
||||
/* On most systems, we can just use the IOCTL call to set the calibration params. */
|
||||
return !h.ioctl(ACCELIOCSSCALE, (long unsigned int)acal);
|
||||
@@ -1050,7 +1050,7 @@ VotedSensorsUpdate::apply_accel_calibration(DevHandle &h, const struct accel_cal
|
||||
bool
|
||||
VotedSensorsUpdate::apply_mag_calibration(DevHandle &h, const struct mag_calibration_s *mcal, const int device_id)
|
||||
{
|
||||
#if !defined(__PX4_QURT) && !defined(__PX4_POSIX)
|
||||
#if defined(__PX4_NUTTX)
|
||||
|
||||
if (!h.isValid()) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user