Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class 92 support #45

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Supported traction
* Class 70
* Class 86
* Class 90 (Armstrong Powerhouse and Steam versions)
* Class 92
* Class 142 (Armstrong Powerhouse version)
* Class 156
* Class 220 (JustTrains version)
Expand Down
1 change: 1 addition & 0 deletions dsd/machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
'RSC.Class47Pack01': models.Class43JT_47_DSDModel,
'RSC.Class66Pack02': models.Class66APDSDModel,
'RSC.Class70Pack01': models.GenericDSDModel,
'RSC.Class92Pack01': models.Class92DSDModel,
'RSC.Class421Pack01': models.GenericDSDModel,
'RSC.Class421Pack02': models.GenericDSDModel,
'RSC.Class422Pack01': models.GenericDSDModel,
Expand Down
22 changes: 22 additions & 0 deletions dsd/machine_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,28 @@ class Class90DSDModel(BuiltinDSDIsolationMixin, BaseDSDModel):
]


class Class92DSDModel(BuiltinDSDIsolationMixin, BaseDSDModel):

dsd_controller_name = 'DSDEnabled'
dsd_controller_value = 0
dsd_isolation_delay = 2
important_controls = [
'AWSReset',
'Reverser',
'VirtualBrake',
'VirtualThrottle'
]

def bind_listener(self):
super(Class92DSDModel, self).bind_listener()

# various variants of Class 92 have different controller sets (sic!)
try:
self.raildriver.set_controller_value('DSDIsolate', 1)
except ValueError:
pass


class Class142APDSDModel(BaseDSDModel):

important_controls = [
Expand Down