@@ -4183,47 +4183,39 @@ public void ResetSignalNumClearAhead()
41834183 /// field [0] : if true, hold state is set
41844184 /// field [1] : if true, signal is reset (always returns false if reset not requested)
41854185 /// </summary>
4186- public bool [ ] requestHoldSignalDispatcher ( bool requestResetSignal )
4186+ public bool [ ] RequestHoldSignalDispatcher ( bool requestResetSignal )
41874187 {
41884188 bool [ ] returnValue = new bool [ 2 ] { false , false } ;
41894189 MstsSignalAspect thisAspect = this_sig_lr ( MstsSignalFunction . NORMAL ) ;
41904190
41914191 SetManualCallOn ( false ) ;
41924192
41934193 // signal not enabled - set lock, reset if cleared (auto signal can clear without enabling)
4194-
41954194 if ( enabledTrain == null || enabledTrain . Train == null )
41964195 {
41974196 holdState = HoldState . ManualLock ;
41984197 if ( thisAspect > MstsSignalAspect . STOP ) ResetSignal ( true ) ;
41994198 returnValue [ 0 ] = true ;
42004199 }
4201-
42024200 // if enabled, cleared and reset not requested : no action
4203-
42044201 else if ( ! requestResetSignal && thisAspect > MstsSignalAspect . STOP )
42054202 {
42064203 holdState = HoldState . ManualLock ; //just in case this one later will be set to green by the system
42074204 returnValue [ 0 ] = true ;
42084205 }
4209-
42104206 // if enabled and not cleared : set hold, no reset required
4211-
42124207 else if ( thisAspect == MstsSignalAspect . STOP )
42134208 {
42144209 holdState = HoldState . ManualLock ;
42154210 returnValue [ 0 ] = true ;
42164211 }
4217-
42184212 // enabled, cleared , reset required : check train speed
42194213 // if train is moving : no action
42204214 //temporarily removed by JTang, before the full revision is ready
42214215 // else if (Math.Abs(enabledTrain.Train.SpeedMpS) > 0.1f)
42224216 // {
42234217 // }
4224-
42254218 // if train is stopped : reset signal, breakdown train route, set holdstate
4226-
42274219 else
42284220 {
42294221 int signalRouteIndex = enabledTrain . Train . ValidRoute [ enabledTrain . TrainRouteDirectionIndex ] . GetRouteIndex ( TCNextTC , 0 ) ;
@@ -4248,7 +4240,7 @@ public bool[] requestHoldSignalDispatcher(bool requestResetSignal)
42484240 /// <summary>
42494241 /// Reset HOLD state for dispatcher control
42504242 /// </summary>
4251- public void clearHoldSignalDispatcher ( )
4243+ public void ClearHoldSignalDispatcher ( )
42524244 {
42534245 holdState = HoldState . None ;
42544246 }
@@ -4262,7 +4254,7 @@ public void SetManualCallOn(bool state)
42624254 {
42634255 if ( state && CallOnEnabled )
42644256 {
4265- clearHoldSignalDispatcher ( ) ;
4257+ ClearHoldSignalDispatcher ( ) ;
42664258 CallOnManuallyAllowed = true ;
42674259 }
42684260 else
0 commit comments