mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 04:53:35 +08:00
double promotion warning fix or ignore per module
This commit is contained in:
committed by
Lorenz Meier
parent
11d348ec4f
commit
cf74166801
@@ -263,8 +263,8 @@ int SendEvent::custom_command(int argc, char *argv[])
|
||||
|
||||
struct vehicle_command_s cmd = {
|
||||
.timestamp = 0,
|
||||
.param5 = (float)((accel_calib || calib_all) ? vehicle_command_s::PREFLIGHT_CALIBRATION_TEMPERATURE_CALIBRATION : NAN),
|
||||
.param6 = NAN,
|
||||
.param5 = ((accel_calib || calib_all) ? vehicle_command_s::PREFLIGHT_CALIBRATION_TEMPERATURE_CALIBRATION : (double)NAN),
|
||||
.param6 = (double)NAN,
|
||||
.param1 = (float)((gyro_calib || calib_all) ? vehicle_command_s::PREFLIGHT_CALIBRATION_TEMPERATURE_CALIBRATION : NAN),
|
||||
.param2 = NAN,
|
||||
.param3 = NAN,
|
||||
|
||||
@@ -158,7 +158,7 @@ int TemperatureCalibrationAccel::update_sensor_instance(PerSensorData &data, int
|
||||
}
|
||||
|
||||
//update linear fit matrices
|
||||
double relative_temperature = data.sensor_sample_filt[3] - data.ref_temp;
|
||||
double relative_temperature = (double)data.sensor_sample_filt[3] - (double)data.ref_temp;
|
||||
data.P[0].update(relative_temperature, (double)data.sensor_sample_filt[0]);
|
||||
data.P[1].update(relative_temperature, (double)data.sensor_sample_filt[1]);
|
||||
data.P[2].update(relative_temperature, (double)data.sensor_sample_filt[2]);
|
||||
|
||||
@@ -145,7 +145,7 @@ int TemperatureCalibrationBaro::update_sensor_instance(PerSensorData &data, int
|
||||
}
|
||||
|
||||
//update linear fit matrices
|
||||
double relative_temperature = data.sensor_sample_filt[1] - data.ref_temp;
|
||||
double relative_temperature = (double)data.sensor_sample_filt[1] - (double)data.ref_temp;
|
||||
data.P[0].update(relative_temperature, (double)data.sensor_sample_filt[0]);
|
||||
|
||||
return 1;
|
||||
|
||||
@@ -145,7 +145,7 @@ int TemperatureCalibrationGyro::update_sensor_instance(PerSensorData &data, int
|
||||
}
|
||||
|
||||
//update linear fit matrices
|
||||
double relative_temperature = data.sensor_sample_filt[3] - data.ref_temp;
|
||||
double relative_temperature = (double)data.sensor_sample_filt[3] - (double)data.ref_temp;
|
||||
data.P[0].update(relative_temperature, (double)data.sensor_sample_filt[0]);
|
||||
data.P[1].update(relative_temperature, (double)data.sensor_sample_filt[1]);
|
||||
data.P[2].update(relative_temperature, (double)data.sensor_sample_filt[2]);
|
||||
|
||||
@@ -172,7 +172,7 @@ private:
|
||||
|
||||
void update_VTV(double x)
|
||||
{
|
||||
double temp = 1.0f;
|
||||
double temp = 1.0;
|
||||
int8_t z;
|
||||
|
||||
for (unsigned i = 0; i < _forder; i++) {
|
||||
|
||||
Reference in New Issue
Block a user