Elvas Tower: RailDriver Interface - Elvas Tower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

RailDriver Interface Rate Topic: -----

#1 User is offline   MikeJRoth 

  • Apprentice
  • Group: Status: Inactive
  • Posts: 2
  • Joined: 13-February 17
  • Gender:Male
  • Location:Frankfurt, Germany
  • Simulator:Open Rails
  • Country:

Posted 16 February 2017 - 07:47 AM

Hello,

thanks for the admission in this forum and that i might contribute something to the improvement.
Carlo was so nice to upload my fix regarding the speed display and helped me with the registration. :blush2:

After reading the card from Chris (see TRELLO), I decided to try this.

First, i have assigned newer functions to previously unoccupied buttons.
With some keys i have to find out how this works exactly in MSTS (I can not use RD in MSTS 'cause i do not have Windows XP)

Now i need to learn more about the OR code ...

CHANGES in "UserInputRaildriver.cs"
+ "DisplayHelpWindow" assigned to Button 03 (MSTS Default Legend "Info Traindriver" ... it would be better if we could also switch window tabs in the future
+ "DisplayStationLabels" assigned to Button 05 (MSTS Default Legend "Station & Siding Indicators")
+ "DisplayCarLabels" assigned to Button 06 (MSTS Default Legend "Wagon #")
- "ControlBellToggle" removed (replaced with next step)
+ "ControlBell" assigned to Btn "left side bottom right" (MSTS Default Legend "Bell") / It should now work like the normal B key
+ Comments added in different lines for explainig the keys

I'm not permitted to upload here this kind of file, so you can download from my server:
UserInputRaildriver.cs

TODO (First considerations):
1. For missing key functions, find out whether there are functions in OpenRails compared to MSTS
1.a You might need flags to see if certain information windows are visible (or i have not found it yet) to use the "Hide Infos"-Button or tabs
2. Abstraction of the direct key control as preparation for key mapping
2.a Enter Default Values
3. Read / save custom assignments (maybe similar to today's key mapping or an ini-file to use on different routes)
3a. Create a form for user input (maybe with a RD layout picture)
3b. Display of the form only with active RD (You have to make sure that the RD is connected so that you can press its buttons)
3c. Embed the form in the Options Menu
3d. Use custom assignments



I've compiled the code on my desktop-pc and (for me) it works.
It would be nice, if someone could test as well.

If it's not possible to compile the code, download the executables and extract the rar file to a new directory:
ORTS_TestRD_20170216-1503.rar
ATT: This is only for testing the new RD button assignments (especially the bell if "Horn is triggered Bell" is set).

Have a nice day,
Mike

#2 User is offline   cjakeman 

  • Vice President
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 2,869
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 16 February 2017 - 12:49 PM

View PostMikeJRoth, on 16 February 2017 - 07:47 AM, said:

I've compiled the code on my desktop-pc and (for me) it works.
It would be nice, if someone could test as well.

So Mike needs a volunteer (or two) who has a working RailDriver. Any takers?

#3 User is offline   ckawahara 

  • Member since Nov. 2003
  • Group: Status: Elite Member
  • Posts: 2,297
  • Joined: 22-November 03
  • Gender:Male
  • Location:SP Pomona Div. MP 520.2
  • Simulator:MSTS, OR
  • Country:

Posted 16 February 2017 - 02:30 PM

My Win 7 64bit pc -- RD buttons 3,5,6 and the bell worked fine.

#4 User is offline   EricF 

  • Fireman
  • Group: Status: Active Member
  • Posts: 217
  • Joined: 07-December 11
  • Gender:Male
  • Location:New England
  • Simulator:Open Rails / Sometimes MSTS
  • Country:

Posted 16 February 2017 - 04:28 PM

I tested, the buttons are working, and the bell can now be cancelled with the bell button when it's triggered by the horn. That's great!

But, I found that pressing the bell button by itself will trigger the bell, but it's working as a momentary trigger. As soon as the button is released, the bell stops. It should be a toggle -- press once to activate the bell, press again to stop it. Right now, I think it's following the "B" key behavior, where you need the Shift key modifier to lock it. Unfortunately, the Shift key lock isn't working in conjunction with the Raildriver bell button. A toggle function (Press on, press again for off) would be the most realistic action.

And of course, the independent brake bail-off bug is still present -- bailing off will cause the bail-off condition to freeze "on" and the locomotive brake will remain bailed-off until Open Rails is restarted. That may be an issue to tackle separately, depending on how the Raildriver code interacts with OR's brake code.

I did my testing on the default Dash 9, since it's more or less the starting template for MSTS diesels.

#5 User is offline   MikeJRoth 

  • Apprentice
  • Group: Status: Inactive
  • Posts: 2
  • Joined: 13-February 17
  • Gender:Male
  • Location:Frankfurt, Germany
  • Simulator:Open Rails
  • Country:

Posted 16 February 2017 - 11:49 PM

@ckawahara & EricF: Thx for testing.

Eric, you made a great review about RailDriver. Really nice :)
Please, let's move the problem with bail-off to another time, because at the moment i do not yet know anything of the braking mechanism in OpenRails.

As regards the bell, there are two possible solutions:
1. A complicated but perhaps better solution would be to rewrite the function BellToggle. This is, however, at a point in the code outside the Raildriver class with which I am not so far.
2. A quick and easy solution, which is however no more MSTS compatible, i could imagine. The horn stick is currently whistling in both directions. My idea is that it triggers the horn when you push the stick up and triggers the bell when you push it down. Then we can use the previous bell button again with BellToggle.

I have another questions.
The MSTS description for Button 10 is "Operation Log" (in German "Betriebs-Logbuch"). What did that mean?
Is there a button under MSTS to display the HUD? Maybe we could take Button10... or we change the help window from 3 to 10 and opens the HUD on Button03. What are your thoughts?

Mike

#6 User is offline   EricF 

  • Fireman
  • Group: Status: Active Member
  • Posts: 217
  • Joined: 07-December 11
  • Gender:Male
  • Location:New England
  • Simulator:Open Rails / Sometimes MSTS
  • Country:

Posted 17 February 2017 - 03:52 AM

Yes, as I said as well, the brake/bail-off issue is probably a separate problem, maybe intermingled with the brake code in OR. I only mention it because it's part of the general Raildriver bug spectrum, so it doesn't get forgotten. This is probably the most that's been done about the Raildriver integration in a while.

It would be ideal to make the Bell button function as a toggle; that's the prototypical way the button would function on a North American locomotive, at least. If a stopgap method was used, then I'd suggest using one of the up or down switches (Probably down, to make one-handed operation easier) on the horn paddle to function as the lock/toggle modifier.

The Operations Notebook keystroke in MSTS brought up the a basic operations help guide (If I remember correctly, as I've been running OR almost exclusively) -- essentially what's coming up on button 3 currently. (The "Controls and Gauges" function in MSTS was a different driving aid that turns on tooltips in the cab view; that's handled differently in OR with the control messages setting which can be set in the startup menu window.) Technically, the current button 3 output could be moved to button 10 to match MSTS. Button 3 could be used then to bring up the "F5" key advanced HUD. However, the F5 HUD has to cycle through its various displays using the Shift key as a modifier, so that may or may not work well in combination with the RailDriver.

Page 1 of 1
  • 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