mirror of
https://github.com/opentx/opentx.git
synced 2025-07-16 12:55:12 +03:00
Fixes #1362
This commit is contained in:
parent
7162ab5399
commit
57b08fb064
7 changed files with 29 additions and 17 deletions
|
@ -186,6 +186,20 @@ RawSourceRange RawSource::getRange(const ModelData & model, const GeneralSetting
|
|||
break;
|
||||
case TELEMETRY_SOURCE_ASPEED:
|
||||
case TELEMETRY_SOURCE_ASPEED_MAX:
|
||||
result.decimals = 1;
|
||||
result.step = singleprec ? 2.0 : 0.1;
|
||||
result.max = singleprec ? (2*255) : 2000;
|
||||
if (firmware->getCapability(Imperial) || settings.imperial) {
|
||||
result.step *= 1.150779;
|
||||
result.max *= 1.150779;
|
||||
result.unit = QObject::tr("mph");
|
||||
}
|
||||
else {
|
||||
result.step *= 1.852;
|
||||
result.max *= 1.852;
|
||||
result.unit = QObject::tr("km/h");
|
||||
}
|
||||
break;
|
||||
case TELEMETRY_SOURCE_SPEED:
|
||||
case TELEMETRY_SOURCE_SPEED_MAX:
|
||||
result.step = singleprec ? 2 : 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue