File tree Expand file tree Collapse file tree
libraries/AP_ExternalAHRS Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,6 +88,13 @@ class AP_ExternalAHRS {
8888 // get serial port number, -1 for not enabled
8989 int8_t get_port (AvailableSensor sensor) const ;
9090
91+ enum class TempCal {
92+ DoesntProvideTemp,
93+ IsNotTempCalibrated,
94+ IsTempCalibrated
95+ };
96+
97+
9198 struct state_t {
9299 HAL_Semaphore sem;
93100
@@ -162,6 +169,7 @@ class AP_ExternalAHRS {
162169 Vector3f accel;
163170 Vector3f gyro;
164171 float temperature;
172+ TempCal TempCalibration = TempCal::IsNotTempCalibrated;
165173 } ins_data_message_t ;
166174
167175 typedef struct {
Original file line number Diff line number Diff line change @@ -124,11 +124,10 @@ void AP_ExternalAHRS_MicroStrain5::post_imu() const
124124 }
125125
126126 {
127- AP_ExternalAHRS::ins_data_message_t ins {
128- accel: imu_data.accel ,
129- gyro: imu_data.gyro ,
130- temperature: -300
131- };
127+ AP_ExternalAHRS::ins_data_message_t ins;
128+ ins.accel = imu_data.accel ;
129+ ins.gyro = imu_data.gyro ;
130+ ins.temperature = -300 ;
132131 AP::ins ().handle_external (ins);
133132 }
134133
Original file line number Diff line number Diff line change @@ -152,13 +152,11 @@ void AP_ExternalAHRS_MicroStrain7::post_imu() const
152152 }
153153
154154 {
155- // *INDENT-OFF*
156- AP_ExternalAHRS::ins_data_message_t ins {
157- accel: imu_data.accel ,
158- gyro: imu_data.gyro ,
159- temperature: -300
160- };
161- // *INDENT-ON*
155+ AP_ExternalAHRS::ins_data_message_t ins;
156+ ins.accel = imu_data.accel ;
157+ ins.gyro = imu_data.gyro ;
158+ ins.temperature = -300 ;
159+ ins.TempCalibration = AP_ExternalAHRS::TempCal::IsTempCalibrated;
162160 AP::ins ().handle_external (ins);
163161 }
164162
You can’t perform that action at this time.
0 commit comments