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 @@ -5456,37 +5456,20 @@ public virtual float GetDataOf(CabViewControl cvc)
54565456 var direction = 0 ; // Forwards
54575457 if ( cvc is CVCGauge && ( ( CVCGauge ) cvc ) . Orientation == 0 )
54585458 direction = ( ( CVCGauge ) cvc ) . Direction ;
5459- data = 0.0f ;
54605459 data = DynamicBrakeForceN ;
5461- if ( data > 0 && SpeedMpS > 0 || data < 0 && SpeedMpS < 0 )
5462- {
5463- data = 0 ;
5464- break ;
5465- }
5466- data = Math . Abs ( data ) ;
54675460 switch ( cvc . Units )
54685461 {
54695462 case CABViewControlUnits . AMPS :
5470- if ( MaxCurrentA == 0 )
5471- MaxCurrentA = ( float ) cvc . MaxValue ;
54725463 if ( DynamicBrakeMaxCurrentA == 0 )
5473- DynamicBrakeMaxCurrentA = ( float ) cvc . MinValue ;
5474- if ( ThrottlePercent > 0 )
5475- {
5476- data = 0 ;
5477- }
5478- if ( DynamicBrakePercent > 0 )
5479- {
5480- data = ( DynamicBrakeForceN / MaxDynamicBrakeForceN ) * DynamicBrakeMaxCurrentA ;
5481- }
5482- data = Math . Abs ( data ) ;
5464+ DynamicBrakeMaxCurrentA = ( float ) cvc . MaxValue ;
5465+ data = data / MaxDynamicBrakeForceN * DynamicBrakeMaxCurrentA ;
54835466 break ;
54845467
54855468 case CABViewControlUnits . NEWTONS :
54865469 break ;
54875470
54885471 case CABViewControlUnits . KILO_NEWTONS :
5489- data = data / 1000.0f ;
5472+ data /= 1000.0f ;
54905473 break ;
54915474
54925475 case CABViewControlUnits . KILO_LBS :
You can’t perform that action at this time.
0 commit comments