Skip to content

Commit 21fb5e9

Browse files
committed
Odometer: adhere to requirements of reviewer
1 parent 9d6f01e commit 21fb5e9

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

Source/Documentation/Manual/cabs.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,8 @@ ORTS_SIGNED_TRACTION_BRAKING, with the only difference that the braking
347347
force does include also the train brake force in addition to the dynamic
348348
brake force.
349349

350+
.. _cabs-odometer:
351+
350352
Odometer controls
351353
-----------------
352354

@@ -378,15 +380,15 @@ Here is an example of use of the odometer control blocks within a .cvf file::
378380
MouseControl ( 1 )
379381
)
380382
TwoState (
381-
Type ( ORTS_ODOMETER_DIRECTION )
383+
Type ( ORTS_ODOMETER_DIRECTION TWO_STATE)
382384
Position ( 320 100 13 15 )
383385
Graphic ( OdoDirectionSwitch.ace )
384386
NumFrames ( 2 2 1 )
385387
Style ( ONOFF )
386388
MouseControl ( 1 )
387389
)
388390
Digital (
389-
Type ( ORTS_ODOMETER )
391+
Type ( ORTS_ODOMETER DIGITAL)
390392
Position ( 377 100 26 17 )
391393
ScaleRange ( 0 100000 )
392394
Accuracy ( 0 )

Source/Documentation/Manual/driving.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ will know, without switching views, that the other end of the train has
585585
just reached the same point, e.g. the entrance to a siding, etc.
586586

587587
The odometer can be accessed also through cabview controls, if they are defined
588-
within the cabview.
588+
within the cabview, see :ref:`here <cabs-odometer>`.
589589

590590

591591
.. |uarr| unicode:: U+02191 .. UPWARDS ARROW

Source/Orts.Simulation/Common/Commands.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1598,7 +1598,6 @@ public ToggleOdometerCommand(CommandLog log)
15981598
public override void Redo()
15991599
{
16001600
Receiver.OdometerToggle();
1601-
// Report();
16021601
}
16031602

16041603
public override string ToString()
@@ -1621,7 +1620,6 @@ public ResetOdometerCommand(CommandLog log, bool toState)
16211620
public override void Redo()
16221621
{
16231622
Receiver.OdometerReset(ToState);
1624-
// Report();
16251623
}
16261624

16271625
public override string ToString()
@@ -1644,7 +1642,6 @@ public ToggleOdometerDirectionCommand(CommandLog log)
16441642
public override void Redo()
16451643
{
16461644
Receiver.OdometerToggleDirection();
1647-
// Report();
16481645
}
16491646

16501647
public override string ToString()

Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5031,7 +5031,7 @@ public virtual float GetDataOf(CabViewControl cvc)
50315031
switch (cvc.Units)
50325032
{
50335033
case CABViewControlUnits.KILOMETRES:
5034-
data = OdometerM / 1000;
5034+
data = (float)Me.ToKiloM(OdometerM);
50355035
break;
50365036
case CABViewControlUnits.MILES:
50375037
data = (float)Me.ToMi(OdometerM);

0 commit comments

Comments
 (0)