Custom Controller Data

Discussion in 'General Discussion' started by stampydalek, Sep 30, 2024.

  1. stampydalek

    stampydalek New Member

    Joined:
    Aug 12, 2023
    Messages:
    5
    Likes Received:
    1
    Kia Ora, I have recently been given the ability to buy a locomotives controls, I was considering purchasing it and converting it to a TSC controller, how would I pull data about throttle, brake, speed, lights etc?

    I will share my progress if I go though with purchasing the controls.
     

    Attached Files:

    • Like Like x 1
    • Helpful Helpful x 1
  2. Michael Newbury

    Michael Newbury Well-Known Member

    Joined:
    Dec 11, 2016
    Messages:
    4,100
    Likes Received:
    3,326
    A very ambitious project, do please keep us up to date on the progress.
     
    • Like Like x 1
  3. BeenTrain

    BeenTrain Active Member

    Joined:
    Dec 10, 2016
    Messages:
    151
    Likes Received:
    129
    You can use the raildriver.dll api for that.
    See here: https://rail-sim.de/forum/wcf/attachment/129378-train-simulator-external-interface-api-pdf/

    It offers lots of info from the loco although I learned that it can differ by loco.
    You can read and write the following:
    Reverser,Throttle,CombinedThrottle,GearLever,TrainBrake,LocomotiveBrake,DynamicBrake,EmergencyBrake,HandBrake,WarningSystemReset,StartStopEngine,Horn,Wipers,Sander,Headlights,Pantograph,FireboxDoor,ExhaustInjectorSteam,ExhaustInjectorWater,LiveInjectorSteam,LiveInjectorWater,Damper,Blower,Stoking,CylinderCock,Waterscoop,SmallCompressor,AWS,AWSReset,Startup,Speedometer,PromptSave,ToggleLabels,Toggle2DMap,ToggleHud,ToggleQut,Pause,DriverGuide,ToggleRvNumber,DialogAssignment,SwitchJunctionAhead,SwitchJunctionBehind,LoadCargo,UnloadCargo,PassAtDangerAhead,PassAtDangerBehind,ManualCouple,// Camera,CabCamera,FollowCamera,HeadOutCamera,RearCamera,TrackSideCamera,CarriageCamera,CouplingCamera,YardCamera,SwitchToNextFrontCab,SwitchToNextRearCab,FreeCamera
     
    • Like Like x 1
  4. stampydalek

    stampydalek New Member

    Joined:
    Aug 12, 2023
    Messages:
    5
    Likes Received:
    1
    Thank you, I will test basic controls using a exsternal program before buying hardware, Do you not what program launague this is based in?
     
  5. BeenTrain

    BeenTrain Active Member

    Joined:
    Dec 10, 2016
    Messages:
    151
    Likes Received:
    129
    Not sure, but raildriver.dll is probably written in C. But you can use any language to use it.
    I f.e. use C# to retreive speed, lat/long etc, which is probably the best choice for a local running application.
     
    • Like Like x 1

Share This Page