Changeset dfe3fe667598b6a509cb6e0cde6dc2e944d68c76
- Timestamp:
- 02/22/10 13:28:39 (5 months ago)
- Author:
- Tobias Bieniek <Tobias.Bieniek@…>
- Parents:
- 61d052f61421516146ba7d7ec99116be4f1a8173
- Children:
- 75bbe0bd567d35580cae56867292ff8db0ad5b0e
- git-committer:
- Tobias Bieniek <Tobias.Bieniek@gmx.de> / 2010-02-22T11:28:39Z+0100
- Message:
-
Units: Renamed HorizontalSpeed? to Speed
Horizontal is the default speed anyway and it saves some characters for the 80char limit...
- Location:
- src
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r2d86f1
|
rdfe3fe
|
|
| 1614 | 1614 | if (wp) { |
| 1615 | 1615 | wp->GetDataField()->SetAsFloat(iround(SPEEDMODIFY*XCSoarInterface::SettingsComputer().SafetySpeed)); |
| 1616 | | wp->GetDataField()->SetUnits(Units::GetHorizontalSpeedName()); |
| | 1616 | wp->GetDataField()->SetUnits(Units::GetSpeedName()); |
| 1617 | 1617 | wp->RefreshDisplay(); |
| 1618 | 1618 | } |
| … |
… |
|
| 2192 | 2192 | if (wp) { |
| 2193 | 2193 | wp->GetDataField()->SetAsFloat(iround(XCSoarInterface::SettingsComputer().start_max_speed*SPEEDMODIFY)); |
| 2194 | | wp->GetDataField()->SetUnits(Units::GetHorizontalSpeedName()); |
| | 2194 | wp->GetDataField()->SetUnits(Units::GetSpeedName()); |
| 2195 | 2195 | wp->RefreshDisplay(); |
| 2196 | 2196 | } |
| … |
… |
|
| 2199 | 2199 | if (wp) { |
| 2200 | 2200 | wp->GetDataField()->SetAsFloat(iround(XCSoarInterface::SettingsComputer().start_max_speed_margin*SPEEDMODIFY)); |
| 2201 | | wp->GetDataField()->SetUnits(Units::GetHorizontalSpeedName()); |
| | 2201 | wp->GetDataField()->SetUnits(Units::GetSpeedName()); |
| 2202 | 2202 | wp->RefreshDisplay(); |
| 2203 | 2203 | } |
-
|
r61d052
|
rdfe3fe
|
|
| 136 | 136 | wp->GetDataField()->SetAsFloat(iround(Units::ToUserUnit( |
| 137 | 137 | settings_task.StartMaxSpeed, Units::SpeedUnit))); |
| 138 | | wp->GetDataField()->SetUnits(Units::GetHorizontalSpeedName()); |
| | 138 | wp->GetDataField()->SetUnits(Units::GetSpeedName()); |
| 139 | 139 | wp->RefreshDisplay(); |
| 140 | 140 | } |
-
|
r006e2e4
|
rdfe3fe
|
|
| 148 | 148 | if (wp) { |
| 149 | 149 | wp->GetDataField()->SetAsFloat(VegaDemoV*SPEEDMODIFY); |
| 150 | | wp->GetDataField()->SetUnits(Units::GetHorizontalSpeedName()); |
| | 150 | wp->GetDataField()->SetUnits(Units::GetSpeedName()); |
| 151 | 151 | wp->RefreshDisplay(); |
| 152 | 152 | } |
-
|
r959be8
|
rdfe3fe
|
|
| 147 | 147 | wp = (WndProperty*)wf->FindByName(_T("prpSpeed")); |
| 148 | 148 | if (wp) { |
| 149 | | wp->GetDataField()->SetUnits(Units::GetHorizontalSpeedName()); |
| | 149 | wp->GetDataField()->SetUnits(Units::GetSpeedName()); |
| 150 | 150 | wp->RefreshDisplay(); |
| 151 | 151 | } |
-
|
r3a70da
|
rdfe3fe
|
|
| 937 | 937 | (int)(Units::ToUserUnit(glide_polar.get_VbestLD(), |
| 938 | 938 | Units::SpeedUnit)), |
| 939 | | Units::GetHorizontalSpeedName(), |
| | 939 | Units::GetSpeedName(), |
| 940 | 940 | gettext(TEXT("Min sink")), |
| 941 | 941 | Units::ToUserUnit(glide_polar.get_Smin(), Units::VerticalSpeedUnit), |
| … |
… |
|
| 943 | 943 | (int)(Units::ToUserUnit(glide_polar.get_Vmin(), |
| 944 | 944 | Units::SpeedUnit)), |
| 945 | | Units::GetHorizontalSpeedName() |
| | 945 | Units::GetSpeedName() |
| 946 | 946 | ); |
| 947 | 947 | } else { |
| … |
… |
|
| 951 | 951 | (int)(Units::ToUserUnit(glide_polar.get_VbestLD(), |
| 952 | 952 | Units::SpeedUnit)), |
| 953 | | Units::GetHorizontalSpeedName(), |
| | 953 | Units::GetSpeedName(), |
| 954 | 954 | gettext(TEXT("Min sink")), |
| 955 | 955 | Units::ToUserUnit(glide_polar.get_Smin(), Units::VerticalSpeedUnit), |
| … |
… |
|
| 957 | 957 | (int)(Units::ToUserUnit(glide_polar.get_Vmin(), |
| 958 | 958 | Units::SpeedUnit)), |
| 959 | | Units::GetHorizontalSpeedName()); |
| | 959 | Units::GetSpeedName()); |
| 960 | 960 | } |
| 961 | 961 | } |
-
|
r2fc06e
|
rdfe3fe
|
|
| 294 | 294 | _stprintf(Buffer, TEXT("%.0f%s"), |
| 295 | 295 | Units::ToUserUnit(val / 100.0, Units::SpeedUnit), |
| 296 | | Units::GetHorizontalSpeedName()); |
| | 296 | Units::GetSpeedName()); |
| 297 | 297 | return; |
| 298 | 298 | case 3: // hbl |
-
|
r3a70da
|
rdfe3fe
|
|
| 338 | 338 | |
| 339 | 339 | Units_t |
| 340 | | Units::GetUserHorizontalSpeedUnit(void) |
| | 340 | Units::GetUserSpeedUnit(void) |
| 341 | 341 | { |
| 342 | 342 | return SpeedUnit; |
| … |
… |
|
| 344 | 344 | |
| 345 | 345 | Units_t |
| 346 | | Units::SetUserHorizontalSpeedUnit(Units_t NewUnit) |
| | 346 | Units::SetUserSpeedUnit(Units_t NewUnit) |
| 347 | 347 | { |
| 348 | 348 | Units_t last = SpeedUnit; |
| … |
… |
|
| 416 | 416 | return (GetUserAltitudeUnit()); |
| 417 | 417 | case ugHorizontalSpeed: |
| 418 | | return (GetUserHorizontalSpeedUnit()); |
| | 418 | return (GetUserSpeedUnit()); |
| 419 | 419 | case ugVerticalSpeed: |
| 420 | 420 | return (GetUserVerticalSpeedUnit()); |
| … |
… |
|
| 434 | 434 | |
| 435 | 435 | if (SPEEDMODIFY == TOMPH) { |
| 436 | | SetUserHorizontalSpeedUnit(unStatuteMilesPerHour); |
| | 436 | SetUserSpeedUnit(unStatuteMilesPerHour); |
| 437 | 437 | SetUserWindSpeedUnit(unStatuteMilesPerHour); |
| 438 | 438 | } else if (SPEEDMODIFY == TOKNOTS) { |
| 439 | | SetUserHorizontalSpeedUnit(unKnots); |
| | 439 | SetUserSpeedUnit(unKnots); |
| 440 | 440 | SetUserWindSpeedUnit(unKnots); |
| 441 | 441 | } else if (SPEEDMODIFY == TOKPH) { |
| 442 | | SetUserHorizontalSpeedUnit(unKiloMeterPerHour); |
| | 442 | SetUserSpeedUnit(unKiloMeterPerHour); |
| 443 | 443 | SetUserWindSpeedUnit(unKiloMeterPerHour); |
| 444 | 444 | } |
| … |
… |
|
| 474 | 474 | |
| 475 | 475 | const TCHAR * |
| 476 | | Units::GetHorizontalSpeedName() |
| 477 | | { |
| 478 | | return GetUnitName(GetUserHorizontalSpeedUnit()); |
| | 476 | Units::GetSpeedName() |
| | 477 | { |
| | 478 | return GetUnitName(GetUserSpeedUnit()); |
| 479 | 479 | } |
| 480 | 480 | |
-
|
r3a70da
|
rdfe3fe
|
|
| 149 | 149 | * @return The user-specified unit for a horizontal speed |
| 150 | 150 | */ |
| 151 | | static Units_t GetUserHorizontalSpeedUnit(void); |
| | 151 | static Units_t GetUserSpeedUnit(void); |
| 152 | 152 | /** |
| 153 | 153 | * Sets the user-specified unit for a horizontal speed |
| … |
… |
|
| 155 | 155 | * @return The old unit |
| 156 | 156 | */ |
| 157 | | static Units_t SetUserHorizontalSpeedUnit(Units_t NewUnit); |
| | 157 | static Units_t SetUserSpeedUnit(Units_t NewUnit); |
| 158 | 158 | |
| 159 | 159 | /** |
| … |
… |
|
| 235 | 235 | static void NotifyUnitChanged(void); |
| 236 | 236 | |
| 237 | | static const TCHAR *GetHorizontalSpeedName(); |
| | 237 | static const TCHAR *GetSpeedName(); |
| 238 | 238 | static const TCHAR *GetVerticalSpeedName(); |
| 239 | 239 | static const TCHAR *GetDistanceName(); |