Page 1 of 1

BrakeHold (Shift-D) in Class 375/377

Posted: Wed Sep 17, 2014 1:31 am
by Havner
How is this supposed to work?

You press the button and the TrainBrake is constantly capped at 43% (one notch). Great, but the Regulator is still applied if you have a CombinedThrottle in the backward position. You get to a point where both, regulator and brakes are applied and they are fighting each other.

What I would expect for this is a use where you drive on the throttle in the backward position with a Cruise Speed, you see a forward speed limit sign, you press BrakeHold temporarily to brake to the new speed without moving the throttle (in opposition to setting new cruise speed and letting the dynamic brake do the job). But for the duration of the pressing I'd imagine the Regulator/Power would get disabled.

It's actually a very easy fix in the LUA script.
My question though would be how it behaves in the real train?
Shouldn't the regulator be disabled for the duration?

Code: Select all

--- "Class 377 Simulation.lua.bak"      2014-09-16 01:25:32.981326600 +0200
+++ "Class 377 Simulation.lua"  2014-09-17 01:22:15.317274400 +0200
@@ -177,7 +179,7 @@
                        end

 -- Regulator control.
-                       if DRA == 1 then
+                       if DRA == 1 or BrakeHold == 1 then
                                gSetReg = 0
                        elseif CombinedLever == 1 then
                                gSetReg = 1


Re: BrakeHold (Shift-D) in Class 375/377

Posted: Wed Sep 17, 2014 7:15 am
by DaveDewhurst
I thought it was for hill starts,
ie you hold the brake hold whilst getting up power to move so the train doesn't roll backwards

Dave

Re: BrakeHold (Shift-D) in Class 375/377

Posted: Wed Sep 17, 2014 7:20 am
by JasVick
Indeed, you achieve what is effectively a brake step one which should be sufficient to hold a stationary train and prevent it from rolling. Once traction is achieved the driver then releases the button and obtains normal acceleration.

Re: BrakeHold (Shift-D) in Class 375/377

Posted: Wed Sep 17, 2014 7:47 am
by coolhand101
Also, the brakes will automatically release and not work above 6 mph.

Thanks

Re: BrakeHold (Shift-D) in Class 375/377

Posted: Wed Sep 17, 2014 12:20 pm
by Havner
Thanks for clarifying. So it is supposed to apply both power and brake at the same time.
coolhand101 wrote:Also, the brakes will automatically release and not work above 6 mph.
This is not implemented, but again, very easy to do in lua.

Re: BrakeHold (Shift-D) in Class 375/377

Posted: Wed Sep 17, 2014 12:41 pm
by tubemad

Re: BrakeHold (Shift-D) in Class 375/377

Posted: Wed Sep 17, 2014 5:36 pm
by Havner
Thanks guys again. Fixed it.

I also made it non toggle (you need to hold it) by both keys and mouse (InputRemapper and Engine properties).

Nice video BTW.

Code: Select all

--- "Class 377 Simulation.lua.bak"      2014-09-16 01:25:32.981326600 +0200
+++ "Class 377 Simulation.lua"  2014-09-17 19:33:58.405180700 +0200
@@ -119,6 +121,7 @@
                BrakeHold = Call( "*:GetControlValue", "BrakeHold", 0 )
                TargetSpeed = Call( "*:GetControlValue", "TargetSpeed", 0 )
                CurrentSpeed = Call( "*:GetControlValue", "SpeedometerMPH", 0 )
+               if CurrentSpeed > 6 then BrakeHold = 0 end
                SpeedSet = Call( "*:GetControlValue", "SetTargetSpeed", 0 )
                WheelSlip = Call( "*:GetControlValue", "Wheelslip", 0 )
                DoorsOpen = Call( "*:GetControlValue", "DoorsOpenCloseRight", 0 ) + Call( "*:GetControlValue", "DoorsOpenCloseLeft", 0 )