OHM Simpit Controller

OrbitHangar

Addon Comments
Joined
Apr 9, 2008
Messages
3,832
Reaction score
18
Points
0

Author: meson800

SimpitController is a plugin that allows Orbiter to connect to the physical world in several ways, from connecting to physical switches through an Arduino, to starting other programs on the computer in response to some Orbiter event.

Uses
-------


  • Position those pesky External MFD's automatically at simualtion start instead of doing it manually.
  • Output certain state items to a screen (such as fuel state, local dynamic pressure, etc).
  • Connect physical switches to an Arduino/microcomputer, and having physical switches trigger virtual Orbiter mouse clicks.
  • Run a full simpit, with physical switches, several external MFD's, and state-controlled lighting.
Documentation
---------------------
Read the documentation offline through the .md files, or view it online.
View the README online here, and read the configuration documentation online here.

 

Beta 0.2

--------------

Beta version 0.2 adds the ability to send information to a connected serial port, and fixes a bug with the serial port format string.

Download the beta here, it needs the VS 2013 redistributable here

Version 0.1
---------------


  • Initial release of SimpitController


DOWNLOAD
 
The files are Markdown files, formatted in Github Flavored Markdown.
Markdown files are just plain text files, and are able to be read with any text editor, but they look better when rendered online. Here is the online render of the documentation.

If you want to read them offline, just open them with Notepad or something else.
 
Looked at the readme for this and you appear to be giving other people the right to sell your software !!!! Is that what you really mean?? Your choice but does seem a bit odd, distribute maybe, sell ..... why
 
That's generally how most open source licenses are. It allows pretty much everything as long as they cite me.
 
Thank you meson800 :)
I think every Orbiter fan has a dream to have realistic simpit :)
 
So this will let me configure extra MFDs and automatically position them on a second screen upon startup?
 
Yes, see the specific doc here

Basically, in the config file, you will add as many MFD setups as needed. They will look like
Code:
BEGIN SIMPIT_MFD
position = x1 y1 x2 y2
END
where the above creates a new external MFD and places it with the upper left coner at x1,y1 and the lower right corner at x2, y2 on Orbiter startup.
 
Cool! I don't suppose there's a way to specify which MFD (i.e. TransX, IMFD) is to be opened? If not maybe that could be something for the next version?
 
Yes, there is a way to do that, though not directly. I'm not sure if it is possible directly (by doing something like MFD = IMFD), but I'll look for something for the next release :)

At the moment, there is a way to do what you want. It relies on a wonderful flexibility of SimpitController.

First, figure out the sequence of MFD button-clicks that will open IMFD. Use the numbering described in the SimpitMFD doc.

This will be dependent on how many MFD's you have installed. As an example, let's say you want to open Surface MFD. The button presses needed to open it are button 13 (select) and button 1 (the second button down on the left).

For each button press required, add an event to fire at simulation start. You can number these whatever you want, the below is just an example.
Code:
BEGIN TIME_BASED_INPUT
simulation_start = 1000 1
simulation_Start = 1001 1
END
The above will, when Orbiter starts (after MFD's are created), fire two events, one with ID=1000 and state=1, and then one with ID=1001 and state=1.

Now, create your SimpitMFD as normal, but "link" the events that will be fired by TimeBasedInput to trigger the MFD button presses. For the above example, that would look like
Code:
BEGIN SIMPIT_MFD
position = x1 y1 x2 y2
event = 1000 1 13
event = 1001 1 1
END
The above means, when SimpitMFD recieves an event, with ID=1000 and state=1 (the first one we set up above), it should press button 13, and when it receives the other event (ID=1001, state=1), it should press button 1.

With the above, your final simpit_config file would read
Code:
BEGIN TIME_BASED_INPUT
simulation_start = 1000 1
simulation_Start = 1001 1
END
BEGIN SIMPIT_MFD
position = x1 y1 x2 y2
event = 1000 1 13
event = 1001 1 1
END
Although the above is kind of hack-ish, it does work and can be extended to startup any MFD of choice at SimulationStart.

Sorry if the above is complicated, I should be able to include some way of starting an MFD directly in the next release. Thanks for the idea! :cheers:
 
...First, figure out the sequence of MFD button-clicks that will open IMFD...
Am I wrong in saying that this numbering system will fail if I, say, disable some MFDs from the Modules tab, then re-enable them some time later: MFDs' order will be shuffled.

My MFD list now:

Code:
; === Active plugin list ===
ACTIVE_MODULES
  D3D9Client
  LaunchMFD
[B]  transx
  TransX2[/B]
  BurnTimeMFD
  HUDDrawer
  ExtMFD
  ScnEditor
END_MODULES


After disabling and re-enabling TransX:

Code:
; === Active plugin list ===
ACTIVE_MODULES
  D3D9Client
  LaunchMFD
  BurnTimeMFD
  HUDDrawer
  ExtMFD
  ScnEditor
[B]  TransX2
  transx[/B]
END_MODULES
 
I would tend to guess yes. You'd need to edit the config file. Restore order.
 
Last edited:
Am I wrong in saying that this numbering system will fail if I, say, disable some MFDs from the Modules tab
Yes, you are correct. The above is a temporary solution which does suffer from the described issue. I'm looking for a more change-resistant method.
 
Last edited:
Beta version 0.2 is available here.

Version 0.2 fixes a critical bug in SerialInput and allows for two way communication over a serial port.
 
is this correct?

Hello!
I downloaded the new beta and tried to set it up. I want to build a simpit and I made a small panel on breakboard with an arduino to test things and get used to the programming. On this small panel I only included two switches (gear down, gear up) and LED's for the state. The internal programming of the arduino is correct.
If the gear down button is pressed, arduino sends " .10,1/ " via serial connection (this works, it is visible with a serial monitor) and with gear up it sends " .10,2/ ".

I put the code below in the cfg file of the simpit controller and I enabled the module inside orbiter, but is doesn't work. Help me pleaaaaseeee!!! :)

Greetings from The Netherlands,

Thijs

Code:
BEGIN SERIAL_COMMUNICATION
com_port = COM8
format_string = .%i,%i/
END

BEGIN KEY_OUTPUT
output = 10 1 g
output = 10 2 g
END
 
I was just wondering if there was a table of the event IDs for the simpit MFD I want to use my arduino for a simpit but I'm not clear on how to use it with this addon
 
Back
Top