File tree Expand file tree Collapse file tree 1 file changed +3
-20
lines changed
Source/Orts.Simulation/Simulation/RollingStocks Expand file tree Collapse file tree 1 file changed +3
-20
lines changed Original file line number Diff line number Diff line change @@ -5458,37 +5458,20 @@ public virtual float GetDataOf(CabViewControl cvc)
54585458 var direction = 0 ; // Forwards
54595459 if ( cvc is CVCGauge && ( ( CVCGauge ) cvc ) . Orientation == 0 )
54605460 direction = ( ( CVCGauge ) cvc ) . Direction ;
5461- data = 0.0f ;
54625461 data = DynamicBrakeForceN ;
5463- if ( data > 0 && SpeedMpS > 0 || data < 0 && SpeedMpS < 0 )
5464- {
5465- data = 0 ;
5466- break ;
5467- }
5468- data = Math . Abs ( data ) ;
54695462 switch ( cvc . Units )
54705463 {
54715464 case CABViewControlUnits . AMPS :
5472- if ( MaxCurrentA == 0 )
5473- MaxCurrentA = ( float ) cvc . MaxValue ;
54745465 if ( DynamicBrakeMaxCurrentA == 0 )
5475- DynamicBrakeMaxCurrentA = ( float ) cvc . MinValue ;
5476- if ( ThrottlePercent > 0 )
5477- {
5478- data = 0 ;
5479- }
5480- if ( DynamicBrakePercent > 0 )
5481- {
5482- data = ( DynamicBrakeForceN / MaxDynamicBrakeForceN ) * DynamicBrakeMaxCurrentA ;
5483- }
5484- data = Math . Abs ( data ) ;
5466+ DynamicBrakeMaxCurrentA = ( float ) cvc . MaxValue ;
5467+ data = data / MaxDynamicBrakeForceN * DynamicBrakeMaxCurrentA ;
54855468 break ;
54865469
54875470 case CABViewControlUnits . NEWTONS :
54885471 break ;
54895472
54905473 case CABViewControlUnits . KILO_NEWTONS :
5491- data = data / 1000.0f ;
5474+ data /= 1000.0f ;
54925475 break ;
54935476
54945477 case CABViewControlUnits . KILO_LBS :
You can’t perform that action at this time.
0 commit comments