diff --git a/README.rst b/README.rst index 661b379..1997d64 100644 --- a/README.rst +++ b/README.rst @@ -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) diff --git a/dsd/machine.py b/dsd/machine.py index 91e7c01..80b0649 100644 --- a/dsd/machine.py +++ b/dsd/machine.py @@ -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, diff --git a/dsd/machine_models.py b/dsd/machine_models.py index 16ffbc0..840b247 100644 --- a/dsd/machine_models.py +++ b/dsd/machine_models.py @@ -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 = [