Page 7 of 29

Re: TrainSim Helper (Joystick/Overlay) release thread

Posted: Tue Oct 14, 2014 3:55 pm
by kyron51
to all who made this software working:

thank you very much :P

that is what I was waiting for ! I have been reading in this forum
for quite some time and already installed the lua exporter but did
not get it to work. After a complete new installation of TS2015
it finally works now. Great stuff !

Besides TrainSimulator I like to drive in ZUSI. I started to build a drivers desk
for the simulator. I am so excited that I will be able to use that console also
for TrainSimulator in the near future.

As I have some basic programming skills I want to write a program that reads
the trainsim-helper-overlay.txt and prepares the data for my drivers desk.
Perhaps I make a version that displays the data in an autonomous window
( which can be displayed on a second monitor ... )

regards
Bernd

Re: TrainSim Helper (Joystick/Overlay) release thread

Posted: Tue Oct 14, 2014 8:25 pm
by gazz292
Sounds like your doing similar to me Bernd,

i have the entire control desk out of a Wittenberger Steuerwagen (as used with the BR111 loco's) and i am just begining to get round to adding potentiometers to the levers that dont have them already (like the air brake lever, the dynamic brake lever has a poti already... and none of thise 8mm shaft volume control type... this potentiometer is about 3 inches in diamiter, ball bearing mounted spindle, slip rings and so on.

But i have also built a small driving desk based on the S-Bahn train sets of the BR423 type to use on an overbed table from my bed, and my 'monitor' is the 42 inch plasma tv on the wall about 3 meters from my head, i have to zom right in to be able to read the 'MFA' speed/traction/status light panel on the trains,

This overlay proggy has helped a great deal, but i still want to have a small say 12 inch monitor mounted to the back of my control panel, and have it display the MFA graphic with everything working by reading from the trainsim helper .txt file,

And when i get round to connecting my real MFA up from the steuerwagen i plan to use the same method, just it will interface with an arduino to drive the real gauges and indicator lights rather than a graphical representation.

unfortunately programming is not my strong point, i could probably get the real MFA working, but getting a graphical one working is beyond my capabilities.

Re: TrainSim Helper (Joystick/Overlay) release thread

Posted: Wed Oct 15, 2014 10:31 pm
by gazz292
just a little thing i noticed last night, probably not something to do with TrainSim helper at all, and it's not hard to sort out anyway and probably something that has to happen....

I bought a new route last night, Hamburg to Hanover, and found that after it had installed and i started TS up again, TSH was not getting and data and the joystick part was not responding, this was happening with all my loco's on all routes, and i had applied the TSH lua out patch to all of them and they were working fine before the new route was added,

I found i had to delete the TSH lua out patched file from each loco, rename the original ones, then apply the TSH lua out patcher to them again, then everything worked as before as well as on the new route.

Tthe new route i got had versions of the DB br101 and the little shunter jobbie in it's route folders, so i expected to have to patch those.

Just wondering if anyone else has had this, any ideas why it does this, and something to maybe watch out for when others add new routes if it is something that just happens.

Re: TrainSim Helper (Joystick/Overlay) release thread

Posted: Wed Oct 15, 2014 10:54 pm
by CobraOne
gazz292 wrote:
This overlay proggy has helped a great deal, but i still want to have a small say 12 inch monitor mounted to the back of my control panel, and have it display the MFA graphic with everything working by reading from the trainsim helper .txt file,

unfortunately programming is not my strong point, i could probably get the real MFA working, but getting a graphical one working is beyond my capabilities.
A while back I played around with the idea of displaying gauges on a second monitor and came up with this
Experimental Dashboard
Experimental Dashboard
The gauges are actually showing the data from TS2015 while I was driving the train.
I wrote it in C# using an add in called aGauge from http://www.codeproject.com/Articles/448 ... ge-Control.
I was planning on incorporating it into my Raildriver software I am developing but I may make it a separate program instead. The problem with using the aGauge add in is it takes a bit of setting up for each gauge you create and it has to been done in code. What I will try to do is make it so that when the program is running you can add the gauges and set them up without using code.

I do need to finish my Raildriver software first though.
Chris

EDIT:
Here is another version I did where I displayed the state of the signals (top right) and the doors locked/unlocked

Re: TrainSim Helper (Joystick/Overlay) release thread

Posted: Wed Oct 15, 2014 11:41 pm
by Havner
Nice one. I don't have a second monitor but it looks sweet. Try this on a black screen (changing the round black color to grey) or some texture. That would look really good.

Re: TrainSim Helper (Joystick/Overlay) release thread

Posted: Wed Oct 15, 2014 11:47 pm
by gazz292
Do you rekon it'll be able to work with the lights on the panels? German trains have quite a few indicator lights for the PZB (sort of like AWS) system (6 lights) the LZB (in cab signalling) has 3 or 4 lights plus the distance to next restriction display and the red triangle 'bug' on the speedo that shows what speed is currently allowed,
Then there's the sifa warning, doors closed and locked (tho most trains are coded wrong and show the T light when the doors are open) and some trains have a few more lights that come on at certain speeds to indicate features that are available.

Re: TrainSim Helper (Joystick/Overlay) release thread

Posted: Thu Oct 16, 2014 8:46 am
by Natvander
Is it possible for the display to show the notch instead of throttle / brake percentage (for those with notches)?

Re: TrainSim Helper (Joystick/Overlay) release thread

Posted: Thu Oct 16, 2014 8:53 am
by tnleeuw01
Natvander wrote:Is it possible for the display to show the notch instead of throttle / brake percentage (for those with notches)?
For instance the BR420 you mean? (In the F3 HUD it displays labels with a brake pressure rather than a pct, and P1, P2, etc for throttle). I believe the brake works the same for the ER20 (Diesel), and some others but I can't think of more examples right now.

Cheers,

--Tim

Re: TrainSim Helper (Joystick/Overlay) release thread

Posted: Thu Oct 16, 2014 9:01 am
by Havner
Natvander wrote:Is it possible for the display to show the notch instead of throttle / brake percentage (for those with notches)?
You mean the notch name? E.g. P1, P2, etc?
This info is not available from LUA so the only way to achieve that would be to put the name manually for every train. But no, there is no such option now.

Re: TrainSim Helper (Joystick/Overlay) release thread

Posted: Thu Oct 16, 2014 10:12 am
by Natvander
Either Idle - P1, P2 (for power) / Release, B1, B2 (for brake) or even just Idle / Off, 1, 2, 3 etc.

Could it be derived from the percentage? I.e. 0% = Idle, 12.5% = 1, 25% = 2 etc.

It's certainly a "nice to have" and not a "need to have", but you do like challenges... :D

Re: TrainSim Helper (Joystick/Overlay) release thread

Posted: Thu Oct 16, 2014 10:19 am
by Havner
Natvander wrote:Could it be derived from the percentage? I.e. 0% = Idle, 12.5% = 1, 25% = 2 etc.
This would be too much automagick, this would fail for lots of cases I'm afraid. I don't see a gain for this. A second table of names manually given with notches would be better option.
It's certainly a "nice to have" and not a "need to have", but you do like challenges... :D
Right now what I like is driving the train without having to code it :-) It is enough I have to spend 1-2h per train before I can drive it to fix all the stupid RSC/DTG bugs and inconsistencies.

Anyway, will add it to the TODO, but I opened the source code for this for a reason :P

Re: TrainSim Helper (Joystick/Overlay) release thread

Posted: Thu Oct 16, 2014 10:44 am
by davep
I like the look of that second panel :-)

Re: TrainSim Helper (Joystick/Overlay) release thread

Posted: Thu Oct 16, 2014 5:57 pm
by CobraOne
gazz292 wrote:Do you rekon it'll be able to work with the lights on the panels? German trains have quite a few indicator lights for the PZB (sort of like AWS) system (6 lights) the LZB (in cab signalling) has 3 or 4 lights plus the distance to next restriction display and the red triangle 'bug' on the speedo that shows what speed is currently allowed,
Then there's the sifa warning, doors closed and locked (tho most trains are coded wrong and show the T light when the doors are open) and some trains have a few more lights that come on at certain speeds to indicate features that are available.
Hi gazz
I have had a look at the DB BR426 engine.bin file and it looks like the data to retrieve what you require is there:-

Code: Select all

CONTROL NAME "(RawTargetDistance)",                    MIN VALUE "(0)",         MAX VALUE "(9999)",      DEFAULT VALUE "(0)"
CONTROL NAME "(TargetDistanceBar)",                    MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(TargetDistanceDigits100)",              MIN VALUE "(-1)",        MAX VALUE "(9)",         DEFAULT VALUE "(0)"
CONTROL NAME "(TargetDistanceDigits1000)",             MIN VALUE "(-1)",        MAX VALUE "(9)",         DEFAULT VALUE "(0)"
CONTROL NAME "(Cmd_Free)",                             MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(Cmd_40)",                               MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(VigilEnable)",                          MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(VigilReset)",                           MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(VigilLight)",                           MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(VigilAlarm)",                           MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(LZBActive)",                            MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(LZBEnding)",                            MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(LZBEnable)",                            MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(LZB_G)",                                MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(LZB_End)",                              MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(PZB_85)",                               MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(PZB_70)",                               MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(Dummy)",                                MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(PZB_1000)",                             MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(PZB_500)",                              MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(PZB_40)",                               MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(ServiceBrake)",                         MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(PZBEnable)",                            MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(DoorsOpenCloseLeft)",                   MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(DoorsOpenCloseRight)",                  MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(RawSpeedTarget)",                       MIN VALUE "(0)",         MAX VALUE "(300)",       DEFAULT VALUE "(0)"
CONTROL NAME "(TargetSpeed100)",                       MIN VALUE "(-1)",        MAX VALUE "(9)",         DEFAULT VALUE "(0)"
CONTROL NAME "(TargetSpeed10)",                        MIN VALUE "(-1)",        MAX VALUE "(9)",         DEFAULT VALUE "(0)"
CONTROL NAME "(TargetSpeed1)",                         MIN VALUE "(-1)",        MAX VALUE "(9)",         DEFAULT VALUE "(0)"
I will have a play with these over the weekend and let you know the results.
Chris

Re: TrainSim Helper (Joystick/Overlay) release thread

Posted: Thu Oct 16, 2014 6:01 pm
by Havner
Version 0.4 released

The source code is not in a state I wanted but I leave for the weekend and the addition of the odometer seems important enough. It changed a lot for me so hopefully you'll have some fun with it as well. See the readme on how to use it.

I've also put the TS2015 data extractor by CobraOne in the download link. It will help you get data from engine.bin files to prepare new locos and get the specific loco shortcuts. See readme included there.

http://vega.livecd.pl/~havner/trainsim-helper/

Code: Select all

0.4
 - WARNING: the keyboard shortcuts (F1-F9) got changed again due
   to the addition of Distance and a change with TargetSpeed
 - WARNING: the modifier for ALL the shortcuts got changed to
   SHIFT-ALT due to collisions with TS shortcuts (adv. brakes)
 - Distance/Countdown implementation, see the readme
 - Moved the TargetSpeed to the controls (blue) section
 - Made it possible to use the Patcher without TS registry entries
   and custom named RailWorks folder
 - Handle the windowed mode case, move together with TS window
 - Removed numbers formatting in lua for some variables, pass the full float/double
 - Detections and notches configurations for more locos
 - Minor code changes

Re: TrainSim Helper (Joystick/Overlay) release thread

Posted: Thu Oct 16, 2014 6:02 pm
by Havner
CobraOne wrote:I have had a look at the DB BR426 engine.bin file and it looks like the data to retrieve what you require is there:-
Every single indicator/control you see in cab has to be represented by a control value. So there is no option they would not be there. If something is in a cab you can extract it. Problem is with things that are not (steam generation rate, wheelslip, etc).