mirror of
https://github.com/metrostroi-repo/MetrostroiAddon.git
synced 2026-05-02 00:42:29 +00:00
Добавлен СД3, срабатывающий при давлении 2.0-2.2 атм ТМ
This commit is contained in:
@@ -130,7 +130,7 @@ function TRAIN_SYSTEM:Think(dT)
|
|||||||
Train:WriteTrainWire(13,S["RVnE"]*C(Train.KRO.Value==0))
|
Train:WriteTrainWire(13,S["RVnE"]*C(Train.KRO.Value==0))
|
||||||
Train:WriteTrainWire(36,BO*Train.SF3.Value*C(Train.VRU.Value >0)*self.CabActive)
|
Train:WriteTrainWire(36,BO*Train.SF3.Value*C(Train.VRU.Value >0)*self.CabActive)
|
||||||
Train:WriteTrainWire(34,S["RU"])
|
Train:WriteTrainWire(34,S["RU"])
|
||||||
Train:WriteTrainWire(19,S["RU"]*Train.EmergencyDrive.Value)
|
Train:WriteTrainWire(19,S["RU"]*(1-Train.Pneumatic.SD3)*Train.EmergencyDrive.Value)
|
||||||
|
|
||||||
Train:WriteTrainWire(27,BO*S["RU"])
|
Train:WriteTrainWire(27,BO*S["RU"])
|
||||||
Train:WriteTrainWire(29,self.BTB*S["RU"]*(C(Panel.Controller<=-2)+Train.EmergencyBrakeTPlus.Value))
|
Train:WriteTrainWire(29,self.BTB*S["RU"]*(C(Panel.Controller<=-2)+Train.EmergencyBrakeTPlus.Value))
|
||||||
@@ -200,7 +200,7 @@ function TRAIN_SYSTEM:Think(dT)
|
|||||||
Train:WriteTrainWire(8,W[-8]*S["DoorsP"]*Train.S1.Value)
|
Train:WriteTrainWire(8,W[-8]*S["DoorsP"]*Train.S1.Value)
|
||||||
|
|
||||||
Panel.DoorsW = S["DoorsP"]*(1-Train.S1.Value)
|
Panel.DoorsW = S["DoorsP"]*(1-Train.S1.Value)
|
||||||
Panel.BrW = BO*Train.SF36.Value*Train.Pneumatic.SD3
|
Panel.BrW = BO*Train.SF36.Value*Train.Pneumatic.SD4
|
||||||
Panel.AnnouncerPlaying = W[15]
|
Panel.AnnouncerPlaying = W[15]
|
||||||
S["WagP"] = Train.Battery.Value*Train.SF33.Value
|
S["WagP"] = Train.Battery.Value*Train.SF33.Value
|
||||||
if self.HaveAsyncInverter > 0 then
|
if self.HaveAsyncInverter > 0 then
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ function TRAIN_SYSTEM:Initialize()
|
|||||||
self.K2 = false
|
self.K2 = false
|
||||||
self.SD2 = 0
|
self.SD2 = 0
|
||||||
self.SD3 = 0
|
self.SD3 = 0
|
||||||
|
self.SD4 = 0
|
||||||
-- Isolation valves
|
-- Isolation valves
|
||||||
self.Train:LoadSystem("FrontBrakeLineIsolation","Relay","Switch", { normally_closed = true, bass = true})
|
self.Train:LoadSystem("FrontBrakeLineIsolation","Relay","Switch", { normally_closed = true, bass = true})
|
||||||
self.Train:LoadSystem("RearBrakeLineIsolation","Relay","Switch", { normally_closed = true, bass = true})
|
self.Train:LoadSystem("RearBrakeLineIsolation","Relay","Switch", { normally_closed = true, bass = true})
|
||||||
@@ -113,7 +114,7 @@ end
|
|||||||
|
|
||||||
function TRAIN_SYSTEM:Outputs()
|
function TRAIN_SYSTEM:Outputs()
|
||||||
return { "BrakeLinePressure", "BrakeCylinderPressure", "DriverValvePosition",
|
return { "BrakeLinePressure", "BrakeCylinderPressure", "DriverValvePosition",
|
||||||
"ReservoirPressure", "TrainLinePressure", "DoorLinePressure", "WeightLoadRatio", "SD2","SD3" }
|
"ReservoirPressure", "TrainLinePressure", "DoorLinePressure", "WeightLoadRatio", "SD2","SD3","SD4" }
|
||||||
end
|
end
|
||||||
|
|
||||||
function TRAIN_SYSTEM:TriggerInput(name,value)
|
function TRAIN_SYSTEM:TriggerInput(name,value)
|
||||||
@@ -472,7 +473,9 @@ function TRAIN_SYSTEM:Think(dT)
|
|||||||
|
|
||||||
if self.BrakeLinePressure <= 2.6 and self.SD2~=1 then self.SD2 = 1 end
|
if self.BrakeLinePressure <= 2.6 and self.SD2~=1 then self.SD2 = 1 end
|
||||||
if self.BrakeLinePressure >= 2.8 and self.SD2~=0 then self.SD2 = 0 end
|
if self.BrakeLinePressure >= 2.8 and self.SD2~=0 then self.SD2 = 0 end
|
||||||
self.SD3 = (IsValid(Train.FrontBogey) and Train.FrontBogey.BrakeCylinderPressure+(not Train.FrontBogey.DisableParking and Train.FrontBogey.ParkingBrakePressure or 0) or self.BrakeCylinderPressure)>0.1 and 1 or 0
|
if self.BrakeLinePressure <= 2.0 and self.SD3~=1 then self.SD3 = 1 end
|
||||||
|
if self.BrakeLinePressure >= 2.2 and self.SD3~=0 then self.SD3 = 0 end
|
||||||
|
self.SD4 = (IsValid(Train.FrontBogey) and Train.FrontBogey.BrakeCylinderPressure+(not Train.FrontBogey.DisableParking and Train.FrontBogey.ParkingBrakePressure or 0) or self.BrakeCylinderPressure)>0.1 and 1 or 0
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- FIXME
|
-- FIXME
|
||||||
Train:SetNW2Bool("FbI",Train.FrontBrakeLineIsolation.Value ~= 0)
|
Train:SetNW2Bool("FbI",Train.FrontBrakeLineIsolation.Value ~= 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user