Jump to content

Recommended Posts

  • Replies 219
  • Created
  • Last Reply

Top Posters In This Topic

Posted
The guys over at VP have for their pits there may be some one or some there that can help you out

Ta Deadman -

VP is my home town, and where this pit building tragic started :) Got the Mag switches running in the F16 nicely, they are simple in Falcon 4 as the Shared Memory exposes coil state.

 

What I'm doing currently is monitoring switch position state (via LUA export), which by itself works. The fun bit is imputing the switch state into the sim when the switch is moved physically. Currently the Sim only has a toggle state, which is no good if the switches are mismatched to the sim state at start-up. So I send a command to via the lua interface to reflect the position of the physical, I'm wondering if I'm doing something dumb with the command.

 

Cheers

 

Peter

Posted

The panels look amazing Peter! :thumbup: Wish I had ones like those.

 

On the software side how are you inputing the switch commands? Through the export.lua?

That's what I'm doing but all the switches, so far at least, use a "clickable" command argument and a "value" of "1" for on/pressed and "0" for off/released. The three position switches use values 0.1, 0 and -0.1.

 

That's certainly how I'm doing it anyway but I'm not sure what your controller for the switches is and whether you are using the export.lua for input as well.

Posted
The panels look amazing Peter! :thumbup: Wish I had ones like those.

 

On the software side how are you inputing the switch commands? Through the export.lua?

That's what I'm doing but all the switches, so far at least, use a "clickable" command argument and a "value" of "1" for on/pressed and "0" for off/released. The three position switches use values 0.1, 0 and -0.1.

 

That's certainly how I'm doing it anyway but I'm not sure what your controller for the switches is and whether you are using the export.lua for input as well.

Ta Boltz

 

Yes siree, I'm using export.lua, mainly due to only the toggle option being available for Yaw/Pitch SAS with the in game GUI. I'm using the 1.0 and 0.0 for the command I'm sending, but I am wondering if that the cause of the problem - i.e. does the game think that I'm still holding the switch in place. Obviously I don't want to send a 0.0 after switching it on as that'll switch it off. I'm going to test the behavior using the in game GUI (as opposed to export.lua) and see what happens.

 

Cheers

 

Peter

Posted

I have not tried it with the magnetic switches yet. Also try a flight and click the switches, disable them and all other functions and situations you can on them then check the dcs log file. Thats what I did to find the clickables for the UFC so as long as you write a list of what order you did the stuff you should be able to find what the sim did and what it outputs etc when tripped.

Posted

Hi Pete here is just a thought . First I have none of your vast experience with the electronic systems in the pits.

 

Don't the switch and current to hold the switch in place run on different circuits?

 

Could Helios be use to make the switch physically be still in the on position but only send a momentary on signal to the sim?

 

Could you use events that would normally release the magnetically held switch to trigger the release by breaking the connection on the second circuit?

 

I may have an actual wiring schematic for the SAS panel let me know if it would be of any help .

https://forum.dcs.world/topic/133818-deadmans-cockpit-base-plans/#comment-133824

CNCs and Laser engravers are great but they can't do squat with out a precise set of plans.

Posted
Hi Pete here is just a thought . First I have none of your vast experience with the electronic systems in the pits.

 

Don't the switch and current to hold the switch in place run on different circuits?

 

Could Helios be use to make the switch physically be still in the on position but only send a momentary on signal to the sim?

 

Could you use events that would normally release the magnetically held switch to trigger the release by breaking the connection on the second circuit?

 

I may have an actual wiring schematic for the SAS panel let me know if it would be of any help .

 

Ta Deadman -you are very correct the witch and current to hold it in place are different. I'm pretty much replicating Helios, so I should go and check out that world and see if the tricks of the trade can be learnt there. The one advantage Helios has over me it you can draw the switch on the screen to match the position on the switch, where as I can only really move the switch one way.

 

The way I have to setup currently is the magentic switch is connected to a joystick button, and based on the transition to either on or off I send a different LUA command (same as Helios I believe). The other half of the code monitors the switch state from the DCS and turns the coil on when the switch is in the on position, and turns the coil off when the switch in the sim moves to the off position.

 

But I've just reread Boltz reply, and maybe I've missed the real obvious, I've been sending

cdusendToLUA("C38", "3004", "1.0")

but it looks like may be I should be sending

cdusendToLUA("C38", "3004", "0.1");

 

For the coders in the room the project is up on GoogleCode at

http://code.google.com/p/bne-dcs-joystick-to-command/

Posted

I did a quick test for you. A flight and log check (Saved Games/DCS/Logs/CockpitCommandsLog.log.) I switched the Left and Right AC Gens off but that outputted a lot of stuff in a different way than normal. When I switched the SAS channels back on here's what I got (reformatted without all the other stuff, the three at the end don't have a time because I thought it could be understood from the rest):

 

(Time=137.328) Yaw SAS Engage Left {C38, 3003, 1.000000}

(Time=137.408) Yaw SAS Engage Left {C38, 3004, 0.000000}

(Time=138.09) Yaw SAS Engage Right {C38, 3005, 1.000000}

(Time=138.228) Yaw SAS Engage Right {C38, 3006, 0.000000}

(Time=139.236) Pitch SAS Engage Left {C38, 3007, 1.000000}

Pitch SAS Engage Left {C38, 3008, 0.000000}

Pitch SAS Engage Left {C38, 3009, 1.000000}

Pitch SAS Engage Left {C38, 3010, 0.000000}

 

What that shows is that to switch one of the magnetic switches on two arguments must be made and they were 1/10 second apart. I included the time so you can see that I did not trigger both events independently. What doesn't make much sense to me is that when I turned each channel on one at a time by clicking on it, the log showed exactly the same i.e. C38, 3003, 1.000000 and C38, 3004, 0.000000 etc.

 

I've got a test function in my A2DCS program that lets me type commands directly into DCS so I will try different combinations for input and when my friend gets back we can add the state of the magnetic switch into the exports to see what it looks like.

  • Like 1
Posted
I did a quick test for you. A flight and log check (Saved Games/DCS/Logs/CockpitCommandsLog.log.) I switched the Left and Right AC Gens off but that outputted a lot of stuff in a different way than normal. When I switched the SAS channels back on here's what I got (reformatted without all the other stuff, the three at the end don't have a time because I thought it could be understood from the rest):

 

(Time=137.328) Yaw SAS Engage Left {C38, 3003, 1.000000}

(Time=137.408) Yaw SAS Engage Left {C38, 3004, 0.000000}

(Time=138.09) Yaw SAS Engage Right {C38, 3005, 1.000000}

(Time=138.228) Yaw SAS Engage Right {C38, 3006, 0.000000}

(Time=139.236) Pitch SAS Engage Left {C38, 3007, 1.000000}

Pitch SAS Engage Left {C38, 3008, 0.000000}

Pitch SAS Engage Left {C38, 3009, 1.000000}

Pitch SAS Engage Left {C38, 3010, 0.000000}

 

What that shows is that to switch one of the magnetic switches on two arguments must be made and they were 1/10 second apart. I included the time so you can see that I did not trigger both events independently. What doesn't make much sense to me is that when I turned each channel on one at a time by clicking on it, the log showed exactly the same i.e. C38, 3003, 1.000000 and C38, 3004, 0.000000 etc.

 

I've got a test function in my A2DCS program that lets me type commands directly into DCS so I will try different combinations for input and when my friend gets back we can add the state of the magnetic switch into the exports to see what it looks like.

 

Thanks hugely for that Boltz, I know I had to do that for the push buttons on the CDU, but wasn't expecting that for the toggles. That's a nice easy fix.

 

cheers

 

Peter

Posted

I didn't really understand it even though I published it! Reading what you've said now makes perfect sense to me and now that I think about it that is what I had to do for the UFC buttons. I wasn't expecting that for the toggles either.

 

The first argument is for pushing the switch (pressing mouse button) and another for you releasing the button (releasing mouse button). I guess that means you can "hold" the switch when the magnet is released. It all just seems to be so obvious to me now.

 

Hope you get them working nicely now! :thumbup:

Posted

The problem with the switches staying on is how your sending commands to the simulation. If you look at the definitions of the inputs you'll notice a release action on magnetic switches. When you click in the GUI it will send the action command on mouse button down and a release action on mouse button up. You need to simulate this. When the switch is turned on via hardware you need to send a action command then send a release command. The simulation assumes you are manually holding the switch in the on position if it never gets a release command.

Posted
The problem with the switches staying on is how your sending commands to the simulation. If you look at the definitions of the inputs you'll notice a release action on magnetic switches. When you click in the GUI it will send the action command on mouse button down and a release action on mouse button up. You need to simulate this. When the switch is turned on via hardware you need to send a action command then send a release command. The simulation assumes you are manually holding the switch in the on position if it never gets a release command.

 

Thanks Gadroc - that makes a lot of sense. I now have an evil plan, basically when the switch is closed I'll use the native toggle function via the GUI in DCS, and when it switches open, send a 0 in LUA script. That way, at worst I should be only a click away from synching the physical world.

 

Will do an update this weekend.

 

Peter

Posted
Thanks Gadroc - that makes a lot of sense. I now have an evil plan, basically when the switch is closed I'll use the native toggle function via the GUI in DCS, and when it switches open, send a 0 in LUA script. That way, at worst I should be only a click away from synching the physical world.

 

Will do an update this weekend.

 

Peter

Happy days Gents - have it working. Use the Joystick button settings in the GUI that toggle the SAS channel state. So whenever the switch is closed at toggle event is executed. I then capture the switch opening with the C# code which sends the LUA command with a zero parameter which always turns the switch off. The good news is the sim never automatically turns on the magnetic switch (only the pilot does that), but the sim can turn off the switch. And if for whatever reason the physical switch state gets out of sync with the sim switch state, at worst I only need to toggle the switch once.

 

The still is a couple of left-field scenarios where it isn't perfect, such as turning the switches on when there is no power to the aircraft, where, because I energise the coil based on the switch position, it will hold even the the sim would like to move it to the off position. Given this isn't in normal operational conditions I'm happy to put up with that.

 

Thanks for the replies on the topic.

 

Cheers

 

Peter

Posted

Changed the acrylic that was used for the top panel, what looked white was only Opal which didn't provide the greatest contrast, with the solid white the letters stand out much better with only around a 25% loss in backlighting.

 

Also worked out how to get the text onto the push buttons. Put three coats of white at the top of the button and then five coats of black across the entire button. that way the text is a nice white, without any white appearing around the symbol at the base of the button.

 

Here's the before and after for the buttons

cbb067f0-a008-4b57-9422-8ea0ac72c22c_zpsc0a6b4c7.jpg

 

file_zpsa73c58dc.jpg

Posted
The pseudo-Korrys look excellent! Great idea , thanks.

:) they are a bunch cheaper than the Korrys and a whole lot easier to mount. I had some real indicators, and much to my frustration found the legends were stamped in. So needed a plan-B, here they are lit up

file_zps297e7967.jpg

Posted
:) they are a bunch cheaper than the Korrys and a whole lot easier to mount. I had some real indicators, and much to my frustration found the legends were stamped in.

 

I hear you. I got some good advice from MacFevre but haven't to changing the text yet.

I like you solution. Nice and clean :thumbup:

 

Cheers

Hans

  • 3 weeks later...
Posted

Getting close mounting the panels in the pit. Mainly focusing on the ones that are useful in the game. Another good days production with Levinsky. The odd shaped box in the top right is the AOA indicators.

file_zpscbb7625e.jpg

Posted

Looks realy nice and your Mod on the Aux Light panel is a good approach. (I'm still figuring if I'd try to add a micro rotary on my MFCDs :-)

- - - -

Posted
I just saw your F-16 pit on Viperpits and it looks amazing as do these panels and the AoA indicators. I assume the aerial refueling indicators will be made in the same way.

Ta Boltz, the F16 was a great project, and if there was a Kickstarter for the F16 for DCS I'd be a the front of the queue.

 

The refueling will be be the same. Here's a little trick for the top case of the indicator, instead of trying to fold sheet metal, cut 1.5mm acrylic sheet, glue and paint, works a treat.

 

cheers

 

Peter

Posted
Looks realy nice and your Mod on the Aux Light panel is a good approach. (I'm still figuring if I'd try to add a micro rotary on my MFCDs :-)

If you work it out let me know!

 

Also had one of those moments last night, had been designing in pots for things like trim and volume (like FSX and falcon support.), then thought I'd better check.... bummer looks like I'll be needing a bunch more rotary encoders. Not a major challenge, but I'm sure glad I thought to check. I had a bunch of intercom pots with switches from a 727 I was planning to use.

 

cheers

 

Peter

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...