Skip to content

Commit

Permalink
Odometer: adhere to requirements of reviewer
Browse files Browse the repository at this point in the history
  • Loading branch information
Csantucci committed Oct 11, 2021
1 parent 9d6f01e commit 21fb5e9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
6 changes: 4 additions & 2 deletions Source/Documentation/Manual/cabs.rst
Expand Up @@ -347,6 +347,8 @@ ORTS_SIGNED_TRACTION_BRAKING, with the only difference that the braking
force does include also the train brake force in addition to the dynamic
brake force.

.. _cabs-odometer:

Odometer controls
-----------------

Expand Down Expand Up @@ -378,15 +380,15 @@ Here is an example of use of the odometer control blocks within a .cvf file::
MouseControl ( 1 )
)
TwoState (
Type ( ORTS_ODOMETER_DIRECTION )
Type ( ORTS_ODOMETER_DIRECTION TWO_STATE)
Position ( 320 100 13 15 )
Graphic ( OdoDirectionSwitch.ace )
NumFrames ( 2 2 1 )
Style ( ONOFF )
MouseControl ( 1 )
)
Digital (
Type ( ORTS_ODOMETER )
Type ( ORTS_ODOMETER DIGITAL)
Position ( 377 100 26 17 )
ScaleRange ( 0 100000 )
Accuracy ( 0 )
Expand Down
2 changes: 1 addition & 1 deletion Source/Documentation/Manual/driving.rst
Expand Up @@ -585,7 +585,7 @@ will know, without switching views, that the other end of the train has
just reached the same point, e.g. the entrance to a siding, etc.

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


.. |uarr| unicode:: U+02191 .. UPWARDS ARROW
Expand Down
3 changes: 0 additions & 3 deletions Source/Orts.Simulation/Common/Commands.cs
Expand Up @@ -1598,7 +1598,6 @@ public ToggleOdometerCommand(CommandLog log)
public override void Redo()
{
Receiver.OdometerToggle();
// Report();
}

public override string ToString()
Expand All @@ -1621,7 +1620,6 @@ public ResetOdometerCommand(CommandLog log, bool toState)
public override void Redo()
{
Receiver.OdometerReset(ToState);
// Report();
}

public override string ToString()
Expand All @@ -1644,7 +1642,6 @@ public ToggleOdometerDirectionCommand(CommandLog log)
public override void Redo()
{
Receiver.OdometerToggleDirection();
// Report();
}

public override string ToString()
Expand Down
Expand Up @@ -5031,7 +5031,7 @@ public virtual float GetDataOf(CabViewControl cvc)
switch (cvc.Units)
{
case CABViewControlUnits.KILOMETRES:
data = OdometerM / 1000;
data = (float)Me.ToKiloM(OdometerM);
break;
case CABViewControlUnits.MILES:
data = (float)Me.ToMi(OdometerM);
Expand Down

0 comments on commit 21fb5e9

Please sign in to comment.