mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 14:23:34 +08:00
IMU_GYRO_RATEMAX: enforce reasonable constraint and update metadata
This commit is contained in:
@@ -48,7 +48,7 @@ public:
|
||||
|
||||
uint32_t get_device_id() const { return _device_id; }
|
||||
|
||||
int32_t get_max_rate_hz() const { return _imu_gyro_rate_max; }
|
||||
int32_t get_max_rate_hz() const { return math::constrain(_imu_gyro_rate_max, 100, 4000); }
|
||||
|
||||
void set_device_id(uint32_t device_id) { _device_id = device_id; }
|
||||
void set_device_type(uint8_t devtype);
|
||||
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
|
||||
uint32_t get_device_id() const { return _device_id; }
|
||||
|
||||
int32_t get_max_rate_hz() const { return _imu_gyro_rate_max; }
|
||||
int32_t get_max_rate_hz() const { return math::constrain(_imu_gyro_rate_max, 100, 4000); }
|
||||
|
||||
void set_device_id(uint32_t device_id) { _device_id = device_id; }
|
||||
void set_device_type(uint8_t devtype);
|
||||
|
||||
Reference in New Issue
Block a user