mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
OP-1504 Fixed some compiler warnings and uncrustified code.
This commit is contained in:
parent
1b027d0e7a
commit
6e0f1b2513
@ -473,8 +473,8 @@ void SixPointCalibrationModel::compute()
|
||||
revoCalibrationData.MagBiasNullingRate = memento.revoCalibrationData.MagBiasNullingRate;;
|
||||
|
||||
// Check the mag calibration is good
|
||||
bool good_calibration = true;
|
||||
bool good_aux_calibration = true;
|
||||
bool good_calibration = true;
|
||||
// bool good_aux_calibration = true;
|
||||
if (calibratingMag) {
|
||||
good_calibration &= !IS_NAN(revoCalibrationData.mag_transform[RevoCalibration::MAG_TRANSFORM_R0C0]);
|
||||
good_calibration &= !IS_NAN(revoCalibrationData.mag_transform[RevoCalibration::MAG_TRANSFORM_R0C1]);
|
||||
@ -581,7 +581,7 @@ void SixPointCalibrationModel::save()
|
||||
if (calibratingMag) {
|
||||
RevoCalibration::DataFields revoCalibrationData = revoCalibration->getData();
|
||||
|
||||
for (int i = 0; i < RevoCalibration::MAG_TRANSFORM_NUMELEM; i++) {
|
||||
for (uint i = 0; i < RevoCalibration::MAG_TRANSFORM_NUMELEM; i++) {
|
||||
revoCalibrationData.mag_transform[i] = result.revoCalibrationData.mag_transform[i];
|
||||
}
|
||||
for (int i = 0; i < 3; i++) {
|
||||
@ -592,7 +592,7 @@ void SixPointCalibrationModel::save()
|
||||
if (calibratingAuxMag) {
|
||||
AuxMagSettings::DataFields auxCalibrationData = auxMagSettings->getData();
|
||||
// Note that Revo/AuxMag MAG_TRANSFORM_RxCx are interchangeable, an assertion at initialization enforces the structs are equal
|
||||
for (int i = 0; i < RevoCalibration::MAG_TRANSFORM_NUMELEM; i++) {
|
||||
for (uint i = 0; i < RevoCalibration::MAG_TRANSFORM_NUMELEM; i++) {
|
||||
auxCalibrationData.mag_transform[i] = result.auxMagSettingsData.mag_transform[i];
|
||||
}
|
||||
for (int i = 0; i < 3; i++) {
|
||||
|
@ -292,7 +292,7 @@ void ConfigVehicleTypeWidget::updateObjectsFromWidgets()
|
||||
Q_ASSERT(field);
|
||||
QString name = m_aircraft->nameEdit->text();
|
||||
for (uint i = 0; i < field->getNumElements(); ++i) {
|
||||
if (i < name.length()) {
|
||||
if (i < (uint)name.length()) {
|
||||
field->setValue(name.at(i).toLatin1(), i);
|
||||
} else {
|
||||
field->setValue(0, i);
|
||||
|
@ -95,7 +95,7 @@
|
||||
<enum>QTabWidget::Rounded</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="documentMode">
|
||||
<bool>false</bool>
|
||||
@ -136,8 +136,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>971</width>
|
||||
<height>712</height>
|
||||
<width>973</width>
|
||||
<height>703</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
@ -7837,8 +7837,8 @@ border-radius: 5;</string>
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>954</width>
|
||||
<height>732</height>
|
||||
<width>957</width>
|
||||
<height>782</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_29">
|
||||
@ -10696,7 +10696,7 @@ response (deg)</string>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_27" rowstretch="0,0,0" columnminimumwidth="0,0">
|
||||
<layout class="QGridLayout" name="gridLayout_277" rowstretch="0,0,0" columnminimumwidth="0,0">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
@ -18055,8 +18055,8 @@ border-radius: 5;</string>
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>971</width>
|
||||
<height>712</height>
|
||||
<width>973</width>
|
||||
<height>703</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_8" stretch="0,0,0,0,0,0">
|
||||
@ -23998,8 +23998,8 @@ font:bold;</string>
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>971</width>
|
||||
<height>712</height>
|
||||
<width>973</width>
|
||||
<height>703</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_18">
|
||||
|
@ -471,7 +471,6 @@ private:
|
||||
{
|
||||
return QVariant(str.toString().at(0).toLatin1());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif // FIELDTREEITEM_H
|
||||
|
@ -250,7 +250,7 @@ QVariant ArrayFieldTreeItem::data(int column) const
|
||||
.arg(m_field->getValue(i).toUInt(&ok), TreeItem::maxHexStringLength(m_field->getType()),
|
||||
16, QChar('0')).toUpper());
|
||||
}
|
||||
QString data = QString("{%1}").arg(dataString);
|
||||
QString data = QString("{%1}").arg(dataString);
|
||||
return data;
|
||||
} else {
|
||||
return QVariant();
|
||||
|
@ -184,16 +184,22 @@ public:
|
||||
switch (type) {
|
||||
case UAVObjectField::INT8:
|
||||
return 2;
|
||||
|
||||
case UAVObjectField::INT16:
|
||||
return 4;
|
||||
|
||||
case UAVObjectField::INT32:
|
||||
return 8;
|
||||
|
||||
case UAVObjectField::UINT8:
|
||||
return 2;
|
||||
|
||||
case UAVObjectField::UINT16:
|
||||
return 4;
|
||||
|
||||
case UAVObjectField::UINT32:
|
||||
return 8;
|
||||
|
||||
default:
|
||||
Q_ASSERT(false);
|
||||
}
|
||||
@ -352,7 +358,7 @@ public:
|
||||
QVariant data(int column) const;
|
||||
|
||||
private:
|
||||
UAVObjectField*m_field;
|
||||
UAVObjectField *m_field;
|
||||
};
|
||||
|
||||
#endif // TREEITEM_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user