Elvas Tower: Enabling second colour in cabview gauges and digitals + flashing - Elvas Tower

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Enabling second colour in cabview gauges and digitals + flashing Rate Topic: -----

#1 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,010
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 01 June 2014 - 08:28 AM

Up to now OR did not manage the second colour in cabview gauges and digitals. Taking this fictitious example
	Digital (
			Type ( LOAD_METER DIGITAL )
			Position ( 221 344 35 17 )
			ScaleRange ( -1200 1800 )
			Accuracy ( 0 )
			AccuracySwitch ( 0 )
			LeadingZeros ( 0 )
			Justification ( 1 )
			PositiveColour ( 2
				ControlColour ( 0 255 0 )
					SwitchVal ( 400 )
				ControlColour ( 255 0 255 )
			)
			NegativeColour ( 2
				ControlColour ( 255 255 0 )
				SwitchVal ( -450 )
				ControlColour ( 0  0 255 )
			)
			DecreaseColour ( 0
				ControlColour ( 0 0 0 )
			)
			Units ( AMPS )
		)

OR would up to now use the first ControlColour within the PositiveColour block in the whole positive scale range, and the first ControlColour within the NegativeColour blockin the whole negative scale range, while MSTS manages them as follows:
- Positive scale range: first positive ControlColour when AMPS are below SwitchVal(the one within the PositiveColour block), and second positive ControlColour when AMPS are above Switchval
- Negative scale range: first negative ControlColour when AMPS are above SwitchVal (e.g. with AMPS = -300) (SwitchVal within the NegativeColour block), and second positive ControlColour when AMPS are below SwitchVal.
Same applies for gauges not of POINTER Style.
Starting from release 2271 also OR behaves as MSTS.

Now that both colours are managed in both positive and negative range, also the digital SPEEDOMETER has been reverted to the above way of working, in compliance with what MSTS does.

The above has been done within the effort of leading ORTS to get maximum compatibility with MSTS referring to 2D cabviews, as a milestone allowing then to go beyond MSTS.

#2 User is online   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,491
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 01 June 2014 - 08:34 AM

View PostCsantucci, on 01 June 2014 - 08:28 AM, said:

The above has been done within the effort of leading ORTS to get maximum compatibility with MSTS referring to 2D cabviews, as a milestone allowing then to go beyond MSTS.


I don't know much about these intricacies of cab views, but thanks for another compatibility feature!

I did notice you changed some code to be commented out; this isn't necessary to keep it when using source control, so I'd recommend just removing code that is no longer used.

#3 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,010
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 01 June 2014 - 09:19 AM

Thanks James,
I'd like to add the flashing now, that is a further option available for some 2DCab controls in MSTS. Could you tell me which property or method it's better I use to get the time info I need to state the correct moment to change state from on to off and vice-versa?

#4 User is online   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,491
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 01 June 2014 - 10:00 AM

View PostCsantucci, on 01 June 2014 - 09:19 AM, said:

I'd like to add the flashing now, that is a further option available for some 2DCab controls in MSTS. Could you tell me which property or method it's better I use to get the time info I need to state the correct moment to change state from on to off and vice-versa?


The correct way to do flashing is to use a cumulative counter based on elapsedTime.ClockSeconds. Have a look at SignalShape.SignalShapeHead.PrepareFrame in Viewer3D\Signals.cs around lines 256-258 and line 276. The counter increases on each update (by ClockSeconds so it stops counting when the game is paused), it removes the total cycle time (FlashTimeTotal) so the value is in the range 0-cycle time, then tests whether the value is <= on time (FlashTimeOn) to show it.

#5 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,010
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 01 June 2014 - 10:46 AM

Thanks James.

#6 User is offline   RTP 

  • Conductor
  • Group: Status: Active Member
  • Posts: 254
  • Joined: 14-June 09
  • Gender:Male
  • Location:Barcelona
  • Simulator:Open Rails
  • Country:

Posted 01 June 2014 - 03:08 PM

In the RENFE S130-ALVIA, that uses two colour gauges the display is incorrect.

The train:

http://www.trensim.c...ct=view&id=1273

http://www.trensim.c...ct=view&id=1274

Please do something.

Cheers.

RTP.

#7 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,010
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 01 June 2014 - 11:34 PM

Ramon,
when downloading the T250, I don't get the T250.cvf cabview installed (neither do I get the sounds installed, neither the consists).

#8 User is offline   RTP 

  • Conductor
  • Group: Status: Active Member
  • Posts: 254
  • Joined: 14-June 09
  • Gender:Male
  • Location:Barcelona
  • Simulator:Open Rails
  • Country:

Posted 02 June 2014 - 08:00 AM

Sometime ago, someone in the trensim team fooled the downloads.

The correct order is:


http://www.trensim.c...ct=view&id=1273

http://www.trensim.c...ct=view&id=1276

http://www.trensim.c...ct=view&id=1274

http://www.trensim.c...ct=view&id=1279

The first: carriages.
Second: Loco, cab, sound, consists, etc
Third: Tinted glasses, better pantos, etc.
Fourth: Diesel vagon to implement the ALVIA 730 hybrid.

Perhaps the display of the traction gauge responds a some anomalous MSTS work.

But this train has been downloade more than 3700 times.

Seems adequate to support it under OR.

Cheers.

RTP

#9 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,010
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 02 June 2014 - 09:03 AM

OK, I have downloaded everything and it runs. In the T250.cvf I don't see double positive or double negative colours defined, but only a colour for positive and one for negative for the load meter gauge.
What I found running the Alvia 130 OR is this orange rectangle (I assume related to the load meter gauge)
Attached Image: Open Rails 2014-06-02 06-58-37.jpg
but it was there already in release 2251, before my changes.


P.S. I notice now that you have added further info to your last post.

Pls. tell me which consist I have to run and what is the gauge that gives problems, what is the problem, and if it is a new problem or an existing problem.

#10 User is offline   RTP 

  • Conductor
  • Group: Status: Active Member
  • Posts: 254
  • Joined: 14-June 09
  • Gender:Male
  • Location:Barcelona
  • Simulator:Open Rails
  • Country:

Posted 02 June 2014 - 09:41 AM

This is the MSTS display:

Upper side at full traction.
Lower side full dynamic brake.

This gauge never worked under OR, but change colours orange to black, close up or down and so.

The consist is correct, but the .cvf is the same for all consists.

Attached thumbnail(s)

  • Attached Image: ALVIA.jpg


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users