simulator: make sensor update rate dependent of the HIL_SENSOR bitmask

This commit is contained in:
TSC21
2020-02-25 10:58:30 +00:00
committed by Nuno Marques
parent e6ab5fc2a8
commit bcb6056a12
3 changed files with 28 additions and 23 deletions
+10 -1
View File
@@ -198,7 +198,7 @@ private:
void send_controls();
void send_heartbeat();
void send_mavlink_message(const mavlink_message_t &aMsg);
void update_sensors(const hrt_abstime &time, const mavlink_hil_sensor_t &imu);
void update_sensors(const hrt_abstime &time, const mavlink_hil_sensor_t &sensors);
static void *sending_trampoline(void *);
@@ -245,6 +245,15 @@ private:
WaitingForActuatorControls = 1,
WaitingForEkf2Timestamp = 2,
};
///! Enumeration to use on the bitmask in HIL_SENSOR
enum SensorSource {
ACCEL = 0x0007,
GYRO = 0x0038,
MAG = 0x01C0,
BARO = 0x1A00,
DIFF_PRESS = 0x0400
};
#endif
DEFINE_PARAMETERS(