Orbiter-Forum  

Go Back   Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter Web Forum > Simpit Forum
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Simpit Forum Share & discuss simpit projects for Orbiter here!

Reply
 
Thread Tools
Old 08-08-2012, 07:37 PM   #31
kamaz
Unicorn hunter
 
kamaz's Avatar
Default

Thanks for the kind words, bug reports and feature requests, here is the new release.

One very important thing -- config file format has changed. Your old file will not work. Please consult the supplied VNCMFD.ini for more information.

Changes since the last release (rev 25):

- Panel update frequency is now configurable via the INI file.
- Reworked joystick support. Now, any joystick device can be used, not only Cougar.
- Limit joystick polling frequency to 20Hz. Just in case.
- Eliminate excessive writes to logfile.
- Clear screen on simulation exit.
- Make module unloading work.
Attached Files
File Type: zip VNCMFD-rev-31.zip (2.13 MB, 28 views)
kamaz is offline   Reply With Quote
Thanked by:
Old 08-08-2012, 07:46 PM   #32
kamaz
Unicorn hunter
 
kamaz's Avatar
Default

Quote:
Originally Posted by yagni01 View Post
 If the keys are really game controller buttons, though, I don't know if his Cougar functionality would be directly usable.
Cougar is a joystick with 28 buttons and 0 axes.

So, I have generalized the code. You can now use buttons on any joystick device. See the INI file for examples.

Quote:
Originally Posted by yagni01 View Post
 Also, I have had no luck dis-abling the plugin without removing the dll.
I introduced this bug when I made VNC servers persistent between simulations. It should be now fixed.

Quote:
Originally Posted by yagni01 View Post
 For a non-touchpad, you could use AutoHotKey (AHK) to open and position your client windows, then map key presses to a mouse click action at each specific button location.
What about writing a small command line program which would send button presses to MFDs via Orb::Connect. So you'd invoke it like this:

PressButton.exe 192.168.1.4 2 5

and it would use Orb::Connect to send a button event to the 5th button of 2nd MFD running on host 192.168.1.4. Then use AutoHotKey or something to invoke that program.
kamaz is offline   Reply With Quote
Thanked by:
Old 08-08-2012, 09:40 PM   #33
Ripley
Tutorial translator
 
Ripley's Avatar
Default

Quote:
Originally Posted by kamaz View Post
 Cougar is a joystick with 28 buttons and 0 axes...
You're talking about this Cougar, aren't you?
Ripley is online now   Reply With Quote
Old 08-08-2012, 09:58 PM   #34
yagni01
Addon Developer

Default

I was doing some basic math on kamaz's approach, and find it scales pretty well. My baseline was $600 (USD) for a cheap computer and a 21" touch screen monitor (~$300 ea). That system should support up to 6 MFDs.

6 cheap tablets @ $70 each == $420
If touchscreens are flaky, add 3 sets of Cougar displays @ $70 each == $210
Price: anywhere from $70 - $630 vs. a fixed $600
Pro: can buy incrementally, custom arrangements (and portable w/o Cougar)
Con: Limited individual MFD size

YMMV

---------- Post added at 05:58 PM ---------- Previous post was at 05:57 PM ----------

Quote:
Originally Posted by Ripley View Post
 You're talking about this Cougar, aren't you?
Yes, that's the one.
yagni01 is offline   Reply With Quote
Old 08-08-2012, 11:05 PM   #35
kamaz
Unicorn hunter
 
kamaz's Avatar
Default

Quote:
Originally Posted by Ripley View Post
 You're talking about this Cougar, aren't you?
Yes.

---------- Post added at 10:23 PM ---------- Previous post was at 10:07 PM ----------

Quote:
Originally Posted by yagni01 View Post
 I was doing some basic math on kamaz's approach, and find it scales pretty well.


Quote:
Originally Posted by yagni01 View Post
 That system should support up to 6 MFDs.
Before jumping in, I'd suggest checking if your computer can handle 6 instances of VNC'd MFDs. The framerate drops with the number of MFDs, resolution and refresh rate.

Good thing is that performance can be improved. csanders has already made the fast MFD grabbing code for the inline client available here, I didn't get around to integrating it yet

For the D3D9Client (although it's already quite fast) improving the performace requires hacking the renderer -- although I have tried it, and it looks like it can be done

Quote:
Originally Posted by yagni01 View Post
 Con: Limited individual MFD size
See the point above about resolution negatively impacting performance.

One way around it is using a VNC client which can do scaling -- here is one (for .NET): http://cdot.senecac.on.ca/projects/vncsharp/

---------- Post added at 10:37 PM ---------- Previous post was at 10:23 PM ----------

Quote:
Originally Posted by yagni01 View Post
 a 21" touch screen monitor (~$300 ea)
...why do you need the touchscreen?

---------- Post added at 11:05 PM ---------- Previous post was at 10:37 PM ----------

The performance hit due to running VNCMFD should be the same as due to running ExtMFD, because in both cases the MFD screen is ripped using BitBlt() (And then, we have csanders' code which should make us faster. At least with the inline client.)

The VNC server(s) in my code run in separate thread(s), so they don't affect the framerate (multicore machines are a blessing ).

One more thing you should look at is performance of the client device -- i.e. what framerate can it render at a given resolution. Which VNC encoding is used will also affect performance.
kamaz is offline   Reply With Quote
Old 08-09-2012, 02:32 AM   #36
yagni01
Addon Developer

Default

I was using a "theoretical" max for instances. Both scenarios depend on a main CPU that could feed that # of MFDs with a decent framerate.
Quote:
Originally Posted by kamaz View Post
 ...why do you need the touchscreen?
to maintain the same functionality as the tablets.

For myself, I've designed my flight deck around larger displays, i.e. replicate Honeywell 1310s, which are 11.3"x8.5", or 10" - 12" 4:3 ones, which would 'blend' multiple MFDs. As there are no commercial gamer bezels in those sizes, its either a) custom create a bezel, b) build an 'off-to-the-side' button cluster, c) use a separate keypad to drive button pushes, or d) have a touchscreen. Pros and cons to each, but I'm looking to use a touchscreen anyway right now. But the portait style displays were why I was hoping for a client that could display two MFDs with ability to move both sets of SEL/MNU buttons to the bottom.
yagni01 is offline   Reply With Quote
Old 08-09-2012, 09:31 AM   #37
kamaz
Unicorn hunter
 
kamaz's Avatar
Default

You mean something like that?

I just put that together in C#; took me about 10 minutes. The buttons are non-working at the moment, because I still didn't have time to code client-side support for Orb::Connect.
Attached Thumbnails
yagni.png  
kamaz is offline   Reply With Quote
Old 08-09-2012, 01:12 PM   #38
yagni01
Addon Developer

Default

Quote:
Originally Posted by kamaz View Post
 You mean something like that?

I just put that together in C#; took me about 10 minutes. The buttons are non-working at the moment, because I still didn't have time to code client-side support for Orb::Connect.
Yes, although you could use the buttons from the VNC, no? Except to map the upper sel/mnu buttons down below?. Aesthetically, you could give this a nice 3D bezel look and feel, 'cause I haven't seen a bezel from Thrustmaster for something like this.

Last edited by yagni01; 08-09-2012 at 01:39 PM.
yagni01 is offline   Reply With Quote
Old 08-10-2012, 01:02 AM   #39
kamaz
Unicorn hunter
 
kamaz's Avatar
Default

We have a problem Trying to use Orb::Connect to send key events to VNC-exported MFDs results in a crash.

Code:
ORB:VirtualMFDs
ORB:VirtualMFDs=83066280,370489960
ORB:SendMFDKey:83066280:59
...goes KABOOM! After some investigation, it looks like a bug in the Orbiter core: http://orbiter-forum.com/project.php?issueid=976

So, it looks like VNCMFD must implement its own socket interface for controlling buttons. Just what I wanted to avoid. Oh well.

Last edited by kamaz; 08-10-2012 at 01:05 AM.
kamaz is offline   Reply With Quote
Old 08-10-2012, 01:16 AM   #40
kamaz
Unicorn hunter
 
kamaz's Avatar
Default

Quote:
Originally Posted by yagni01 View Post
 Yes, although you could use the buttons from the VNC, no? Except to map the upper sel/mnu buttons down below?.
Sure. Like the attached screenshot?

I actually got that client to talk to Orb::Connect... and immediately hit that oapiSendMFDKey() bug. Oh well.

Quote:
Originally Posted by yagni01 View Post
 Aesthetically, you could give this a nice 3D bezel look and feel, 'cause I haven't seen a bezel from Thrustmaster for something like this.
Me? Decorations? Forget it, I almost failed 3rd grade because of drawing classes! I'll post the project files when I get this client to work, you will be able to add furry dicez and the like yourself...
Attached Thumbnails
yagni2.png  
kamaz is offline   Reply With Quote
Thanked by:
Old 08-10-2012, 08:20 PM   #41
kamaz
Unicorn hunter
 
kamaz's Avatar
Default

Quote:
Originally Posted by kamaz View Post
 So, it looks like VNCMFD must implement its own socket interface for controlling buttons. Just what I wanted to avoid. Oh well.
Well, it's not that bad. I have managed to hack Orb::Connect to work around the bug.

While at it, I have changed the way VNC'd MFDs are identified -- you can now simply use port number as identifier, i.e.:

Quote:
ORB:VirtualMFDs
ORB:VirtualMFDs=5900,5901
ORB:MFDButtonLabels:5900
ORB:MFDButtonLabels:5900=REF,AR,TGT,NT,MOD,FRM,PRJ ,DST,HUD,,,,,,,
VNCMFD has been modified to allow that. Also, I have fixed a panel layout bug.

Attached is:
- complete VNCMFD release (source+binary as usual)
- modified Orb::Connect 2.1 (DLL, original source and my patch)
Attached Files
File Type: zip VNCMFD-rev-32.zip (2.13 MB, 39 views)
File Type: zip OrbConnect-2.1-hacked.zip (233.0 KB, 56 views)
kamaz is offline   Reply With Quote
Thanked by:
Old 08-10-2012, 08:44 PM   #42
kamaz
Unicorn hunter
 
kamaz's Avatar
Default Orc - Orbiter Remote Control rev. 1.

Since we now have all the required components, I give you the first (very rudimentary) version of Orc, or Orbiter Remote Control application.

To use the program, you must have Orbiter running with the following addons installed and enabled:

- VNCMFD rev. 32 (from this post)

- Hacked OrbConnect-2.1 (same post as above)

- NetDialog (from this post)

The program is written in C# and requires .NET Framework.

Usage is very simple:

Code:
OrbiterRemoteControl.exe hostname
where hostname represents hostname (or IP address) of the computer running Orbiter with the above add-ons. The program will open a new window for each VNC-exported MFD. If the MFD wants you to input a value, a dialog box will pop up.

Specifying /yagni01 as the second parameter, i.e.

Code:
OrbiterRemoteControl.exe hostname /yagni01
renders two MFDs in one panel with layout that yagni01 requested.

Please note that the VNC display component I used supports rescaling, so the MFD display will be scaled to the window (currently 540x480 for normal windows, and 340x300 for yagni01's layout).

Project files for Visual C# 2010 are provided. Modify as you see fit.


Attached Files
File Type: zip ORC-rev1.zip (372.9 KB, 25 views)
kamaz is offline   Reply With Quote
Old 08-10-2012, 09:15 PM   #43
Thanatox
Orbinaut
 
Thanatox's Avatar
Default

I was messing around with this and a thought occurred to me. Would it be possible to output other displays this way?

Specifically I was thinking of the DG-IV flight computer display as well as the DG-IV Fuel and engine displays and possibly the system message display. A general solution would be even better.

The ones highlighted here are of most interest to me personally, and I imagine the most generally useful.




I don't know the guts of orbiter enough to know how close VNCMFD is to accomplishing this.

Here's what I'm envisioning.


---




Anyway, once again thanks for all your work Kamaz! this is great.

P.S.: Feel free to consider this question hypothetical. I'd love to see this implemented, but I don't want to come across with a "do this now!" tone in any way.

Last edited by Thanatox; 08-10-2012 at 09:21 PM.
Thanatox is offline   Reply With Quote
Old 08-10-2012, 09:48 PM   #44
kamaz
Unicorn hunter
 
kamaz's Avatar
Default

Quote:
Originally Posted by Thanatox View Post
 I was messing around with this and a thought occurred to me. Would it be possible to output other displays this way?
Probably yes, if the author of the vehicle helps us.

Basically, the MFD screen is a SURFHANDLE object. So I now have code which exports whatever is drawn to a SURFHANDLE over VNC. So in principle, we can do that for any other SURFHANDLE. And all panels, screens etc. in Orbiter are represented as SURFHANDLEs.

The problem is that, as far as I can tell, there is nothing in Orbiter API which would allow us to obtain SURFHANDLE to these extra displays.

However, if the vehicle author somehow provided us with these SURFHANDLEs (e.g. gave as a DLL entry point to a function returning these pointers), then it actually looks pretty straightforward.
kamaz is offline   Reply With Quote
Old 08-12-2012, 10:25 PM   #45
Thanatox
Orbinaut
 
Thanatox's Avatar
Default

Also, I can't seem to find official dimensions for cougar MFDs anywhere does any one know them?
Thanatox is offline   Reply With Quote
Reply

  Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter Web Forum > Simpit Forum


Thread Tools

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


All times are GMT. The time now is 08:27 PM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright 2007 - 2012, Orbiter-Forum.com. All rights reserved.