Skip to content

Commit fa00b83

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 8c9683c + e5d8f1c commit fa00b83

File tree

25 files changed

+1003
-53
lines changed

25 files changed

+1003
-53
lines changed

Source/ContentChecker/TrackFileLoader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ void AddAllActivities()
131131
List<string> timetableFiles = new List<string>();
132132
timetableFiles.AddRange(Directory.GetFiles(activityPathOr, "*.timetable_or"));
133133
timetableFiles.AddRange(Directory.GetFiles(activityPathOr, "*.timetable-or"));
134-
timetableFiles.AddRange(Directory.GetFiles(activityPathOr, "*.timetablelist-or"));
134+
timetableFiles.AddRange(Directory.GetFiles(activityPathOr, "*.timetablelist_or"));
135135
timetableFiles.AddRange(Directory.GetFiles(activityPathOr, "*.timetablelist-or"));
136136
foreach (string timetableFile in timetableFiles)
137137
{

Source/Contrib/ContentManager/ContentMSTS.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public override IEnumerable<Content> Get(ContentType type)
124124

125125
var pathOR = Path.Combine(PathName, @"Activities\OpenRails");
126126
if (Directory.Exists(pathOR))
127-
foreach (var item in Directory.GetFiles(pathOR, "*.timetable_or"))
127+
foreach (var item in Enumerable.Concat(Directory.GetFiles(pathOR, "*.timetable_or"), Directory.GetFiles(pathOR, "*.timetable-or")))
128128
yield return new ContentORTimetableActivity(this, Path.Combine(pathOR, item));
129129
}
130130
}

Source/Contrib/ContentManager/Models/Activity.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ public Activity(Content content)
5050
else
5151
Services = new string[0];
5252
}
53-
else if (System.IO.Path.GetExtension(content.PathName).Equals(".timetable_or", StringComparison.OrdinalIgnoreCase))
53+
else if (System.IO.Path.GetExtension(content.PathName).Equals(".timetable_or", StringComparison.OrdinalIgnoreCase)
54+
|| System.IO.Path.GetExtension(content.PathName).Equals(".timetable-or", StringComparison.OrdinalIgnoreCase))
5455
{
5556
// TODO: Make common timetable parser.
5657
var file = new TimetableReader(content.PathName);

Source/Contrib/ContentManager/Models/Service.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ public Service(Content content)
6969
Stops = trafficService.TrafficDetails.Zip(activityService.ServiceList, (tt, stop) => new Stop(stop.PlatformStartID, stop.DistanceDownPath, MSTSTimeToDateTime(tt.ArrivalTime), MSTSTimeToDateTime(tt.DepartTime)));
7070
}
7171
}
72-
else if (System.IO.Path.GetExtension(content.PathName).Equals(".timetable_or", StringComparison.OrdinalIgnoreCase))
72+
else if (System.IO.Path.GetExtension(content.PathName).Equals(".timetable_or", StringComparison.OrdinalIgnoreCase)
73+
|| System.IO.Path.GetExtension(content.PathName).Equals(".timetable-or", StringComparison.OrdinalIgnoreCase))
7374
{
7475
// TODO: Make common timetable parser.
7576
var file = new TimetableReader(content.PathName);
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM sphinxdoc/sphinx-latexpdf
2+
RUN pip install --no-cache-dir sphinx-rtd-theme
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"build": {
3+
"dockerfile": "Dockerfile"
4+
},
5+
"workspaceMount": "source=${localWorkspaceFolder},target=/docs,type=bind",
6+
"workspaceFolder": "/docs",
7+
"remoteUser": "vscode",
8+
"features": {
9+
"common": {
10+
"username": "automatic",
11+
"uid": "automatic",
12+
"gid": "automatic",
13+
"installZsh": true,
14+
"installOhMyZsh": true,
15+
"upgradePackages": true,
16+
"nonFreePackages": false
17+
}
18+
},
19+
"extensions": [
20+
"TatsuyaNakamori.resttext"
21+
]
22+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "shell",
6+
"command": "make",
7+
"args": ["html"],
8+
"label": "Build: html",
9+
"problemMatcher": [],
10+
"group": {
11+
"kind": "build",
12+
"isDefault": true
13+
}
14+
},
15+
{
16+
"type": "shell",
17+
"command": "make",
18+
"args": ["latexpdf"],
19+
"label": "Build: latex",
20+
"problemMatcher": [],
21+
"group": "build"
22+
},
23+
{
24+
"type": "shell",
25+
"command": "make",
26+
"args": ["clean"],
27+
"label": "Build: Make Clean",
28+
"problemMatcher": [],
29+
"group": "build"
30+
}
31+
]
32+
}

Source/Documentation/Manual/cabs.rst

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,67 @@ Here is an example of use of the odometer control blocks within a .cvf file::
403403
Units ( FEET )
404404
)
405405

406+
.. _cabs-distributed-power:
407+
408+
Distributed Power
409+
-----------------
410+
411+
The principles of Distributed Power are described :ref:`here <distributed-power>` .
412+
413+
Distributed Power data can be displayed using control ORTS_DISTRIBUTED_POWER. Here
414+
an example of use::
415+
416+
ScreenDisplay (
417+
Type ( ORTS_DISTRIBUTED_POWER SCREEN_DISPLAY )
418+
Position ( 164.4 286.5 136 52 )
419+
Parameters (
420+
FullTable True
421+
LoadUnits AMPS
422+
)
423+
Units ( KM_PER_HOUR )
424+
ORTSDisplay ( 1 )
425+
ORTSScreenPage ( "2300-0" )
426+
)
427+
428+
Here below an example of the output of the above control.
429+
430+
.. image:: images/cabs-distributed-power.png
431+
432+
When parameter FullTable is set to False, only the first 6 lines
433+
are displayed.
434+
Optional parameter LoadUnits defines which is the UoM used for the
435+
Load field. Default is AMPS in a metric environment and KILO_LBS in
436+
the other cases. Selectable LoadUnits are AMPS, NEWTONS, KILO_NEWTONS,
437+
LBS and KILO_KBS.
438+
439+
The screen display can be rotated adding parameter
440+
ORTSAngle ( number ) in the ScreenDisplay block. The angle is in degrees.
441+
442+
For every keyboard command related to Distributed Power, a cabview control
443+
is also available. Here's a list of the cabview controls::
444+
445+
- ORTS_DP_MOVE_TO_FRONT
446+
- ORTS_DP_MOVE_TO_BACK
447+
- ORTS_DP_IDLE
448+
- ORTS_DP_TRACTION
449+
- ORTS_DP_BRAKE
450+
- ORTS_DP_MORE
451+
- ORTS_DP_LESS
452+
453+
Here an example of use of one of the controls::
454+
455+
TwoState (
456+
Type ( ORTS_DP_MOVE_TO_FRONT TWO_STATE )
457+
Position ( 163.2 378.4 13.75 10 )
458+
Graphic ( "..\\..\\Common.Cab\\ES44v3\\softkey1trans.ace" )
459+
NumFrames ( 2 2 1 )
460+
Style ( WHILE_PRESSED )
461+
MouseControl ( 1 )
462+
ORTSDisplay ( 1 )
463+
ORTSScreenPage ( "2300-0" )
464+
)
465+
466+
406467
Animated 2D Wipers
407468
------------------
408469

Source/Documentation/Manual/driving.rst

Lines changed: 39 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2226,35 +2226,52 @@ This applies to both Timetable Mode and Activity Mode.
22262226
Extended HUD for Debug Information
22272227
----------------------------------
22282228

2229-
The last extended HUD display shows Debug information.
2229+
The last extended HUD display shows Debug information containing:
2230+
2231+
- Logging enabled: :ref:`logging status <driving-logfile>`
2232+
- Build: date and time Open Rails was compiled
2233+
- CPU: processor utilization by Open Rails
2234+
- GPU: frame rate, frame time percentiles and graphics feature level
2235+
- Memory: number of core memory objects loaded (textures, materials, shapes, and tiles) plus garbage collection statistics
2236+
- CPU Memory:
2237+
2238+
- Private: virtual memory allocated just for Open Rails (not shared with other applications)
2239+
- Working set: physical memory in use by Open Rails (including any shared with other applications)
2240+
- Private working set: physical memory in use just for Open Rails
2241+
- Managed: virtual memory allocated by the .NET runtime (CLR)
2242+
- Virtual: virtual memory allocated for any purpose (private + shared + others)
2243+
2244+
- GPU Memory:
2245+
2246+
- Committed: all graphics memory allocated for Open Rails
2247+
- Dedicated: physical graphics card memory in use by Open Rails
2248+
- Shared: system memory shared with the graphics card in use by Open Rails
2249+
2250+
- Adapter: name and dedicated physical memory of graphics card
2251+
- Shadow maps: distance and size of each shadow map level (and texture size)
2252+
- Shadow primitives: total primitives (rendered items) and breakdown by shadow map level
2253+
- Render primitives: total primitives (rendered items) and breakdown by rendering sequence (``RenderPrimitiveSequence`` in the code)
2254+
- Render/Updater/Loader/Sound process: percentage of time each process is active and waiting
2255+
- Camera: tile X, tile Z, X, Y, Z, altitude, LOD bias, effective viewing distance, effective distant mountain viewing distance
22302256

2231-
The first line (``Logging enabled``) refers to logging as described in
2232-
paragraphs 6.6 and 6.7.
2257+
.. image:: images/driving-hud-debug.png
22332258

2234-
A wide variety of parameters is shown, from frame wait and render speeds
2235-
in milliseconds, to number of primitives, Process Thread resource
2236-
utilization and number of Logical CPUs from the system's bios. They are
2237-
very useful in case of OR stuttering, to find out where the bottleneck is.
2259+
The primary measurements for comparing and analysing performance are the first column of values (some lines are skipped), so for the image above we have:
22382260

2239-
.. index::
2240-
single: tile
2261+
- CPU: 10% - *very low (warning at 75%)*
2262+
- GPU: 58 FPS - *good (warning at <55 FPS with 60 Hz vertical sync)*
2263+
- CPU Memory: 211 MB private - *very low (~3% of 8 GB)*
2264+
- GPU Memory: 493 MB committed - *low (~24% of 2 GB)*
2265+
- Highest process (Render): 47% - *moderate (warning at 75%)*
22412266

2242-
The values in the ``Camera`` line refer to the two tile coordinates and to
2243-
the three coordinates within the tile.
2267+
Also shown are the following graphs of:
22442268

2245-
.. image:: images/driving-hud-debug.png
2246-
:align: center
2247-
:scale: 80%
2269+
- Memory: working set
2270+
- GCs: garbage collections
2271+
- Frame time: how long each frame takes to render
2272+
- Render/Updater/Loader/Sound process: same as textual display above
22482273

22492274
.. image:: images/driving-hud-debug-graphs.png
2250-
:align: center
2251-
:scale: 80%
2252-
2253-
At the bottom of the picture, some moving graphs are displayed that show
2254-
the actual load of the computer.
2255-
2256-
Referring to memory use, about at least 400 MB must remain free to
2257-
avoid out-of-memory exceptions
22582275

22592276
Viewing Interactive Track Items
22602277
-------------------------------
24.6 KB
Loading

0 commit comments

Comments
 (0)