Merge pull request #3149 from opentx/dsbeach/next-issue3147-telem-sim-aspd-as-knots

Changes to send ASpd as knots
This commit is contained in:
Bertrand Songis
2015-12-14 22:27:09 +01:00
3 changed files with 7 additions and 2 deletions
+5 -1
View File
@@ -314,7 +314,7 @@ void TelemetrySimulator::generateTelemetryFrame()
case 17: case 17:
if (ui->aspeed->value() > 0) if (ui->aspeed->value() > 0)
generateSportPacket(buffer, ui->aspd_inst->text().toInt(&ok, 0) - 1, DATA_FRAME, AIR_SPEED_FIRST_ID, LIMIT<uint32_t>(0, ui->aspeed->value() * 10.0, 0xFFFFFFFF)); generateSportPacket(buffer, ui->aspd_inst->text().toInt(&ok, 0) - 1, DATA_FRAME, AIR_SPEED_FIRST_ID, LIMIT<uint32_t>(0, ui->aspeed->value() * 5.39957, 0xFFFFFFFF));
break; break;
case 18: case 18:
@@ -587,6 +587,7 @@ TelemetrySimulator::LogPlaybackController::LogPlaybackController(Ui::TelemetrySi
colToFuncMap.insert("VFAS(V)", FASV); colToFuncMap.insert("VFAS(V)", FASV);
colToFuncMap.insert("Curr(A)", FASC); colToFuncMap.insert("Curr(A)", FASC);
colToFuncMap.insert("Cels(gRe)", CELS_GRE); colToFuncMap.insert("Cels(gRe)", CELS_GRE);
colToFuncMap.insert("ASpd(kts)", ASPD_KTS);
colToFuncMap.insert("ASpd(kmh)", ASPD_KMH); colToFuncMap.insert("ASpd(kmh)", ASPD_KMH);
colToFuncMap.insert("ASpd(mph)", ASPD_MPH); colToFuncMap.insert("ASpd(mph)", ASPD_MPH);
colToFuncMap.insert("GAlt(ft)", GALT_FEET); colToFuncMap.insert("GAlt(ft)", GALT_FEET);
@@ -894,6 +895,9 @@ void TelemetrySimulator::LogPlaybackController::setUiDataValues()
case CELS_GRE: case CELS_GRE:
ui->cell1->setValue(columnData[info.dataIndex].toDouble()); ui->cell1->setValue(columnData[info.dataIndex].toDouble());
break; break;
case ASPD_KTS:
ui->aspeed->setValue(columnData[info.dataIndex].toDouble() * 1.8520008892119);
break;
case ASPD_KMH: case ASPD_KMH:
ui->aspeed->setValue(columnData[info.dataIndex].toDouble()); ui->aspeed->setValue(columnData[info.dataIndex].toDouble());
break; break;
+1
View File
@@ -66,6 +66,7 @@ class TelemetrySimulator : public QDialog
FASV, FASV,
FASC, FASC,
CELS_GRE, CELS_GRE,
ASPD_KTS,
ASPD_KMH, ASPD_KMH,
ASPD_MPH, ASPD_MPH,
GALT_FEET, GALT_FEET,
+1 -1
View File
@@ -940,7 +940,7 @@ Timestamp</string>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>knots</string> <string>km/h</string>
</property> </property>
</widget> </widget>
</item> </item>