Jump to content

Recommended Posts

Posted (edited)

Finally got to tie some pieces of scripting together, with the OpenCockpits LCD card. Initially just throwing all outputs onto a single LCD display, they will be split across multiple displays when put into the pit. Using Leo Bodnar's BUO386X to take rotary encoders and convert them to joystick button presses. Now its time to get some more panels done.

 

Some interesting learnings with the LUA scripting when getting the frequencies, it certainly isn't the world of integers! Also what was a little surprise was the minor digits on the UHF radio, instead of stepping through 0-25-50-75, the discretely roll, thing to what out for when putting I/O code together.

For those that are interested, the code is up on goggle code

https://bnepethomas@code.google.com/p/bne-dcs-soic-cmd-lineconverter/

 

 

jPwa5GZGmgw

 

The guts of the radio export looks like

/*

-- ILS Frequency

-- Major Digits

-- Look up table

ils_major_digit = {"108", "109", "110", "111"}

local DigitPointer = math.floor((soic_conv_mp:get_argument_value(251)*10)) + 1

table.insert(soic_conv_flightData,"8010=" .. ils_major_digit[DigitPointer])

-- Minor Digits

-- Needed to add a 1.1 as the maths sometimes rounded to .999 which causes errors in lookup

DigitPointer = (soic_conv_mp:get_argument_value(252) * 10) + 1.1

DigitPointer = tonumber(DigitPointer)

-- Lookup Table

ils_minor_digit = {"10", "15", "30", "35", "50", "55", "70", "75", "90", "95"}

table.insert(soic_conv_flightData,"8011=" .. ils_minor_digit[math.floor(DigitPointer)])

 

-- TACAN

-- 1st Major Digit

table.insert(soic_conv_flightData,"8020=" .. math.floor(soic_conv_mp:get_argument_value(263) * 10 + 0.1))

-- 2nd Major Digit

table.insert(soic_conv_flightData,"8021=" .. math.floor(soic_conv_mp:get_argument_value(264) * 10 + 0.1))

-- Minor Digits

table.insert(soic_conv_flightData,"8022=" .. math.floor(soic_conv_mp:get_argument_value(265) * 10 + 0.1))

-- XY

table.insert(soic_conv_flightData,"8023=" .. soic_conv_mp:get_argument_value(266))

 

-- VHF AM

-- Major has values 3 to 15

table.insert(soic_conv_flightData,"143=" .. math.floor(soic_conv_mp:get_argument_value(143) * 20 + 0.1)) -- VHF_radio.AM, 139, 0.5, 0, 15)

table.insert(soic_conv_flightData,"144=" .. math.floor(soic_conv_mp:get_argument_value(144) * 10 + 0.1)) -- VHF_radio.AM, 140, 0.9, 0, 9)

-- Moves through incremental numbers so will return interesting values

table.insert(soic_conv_flightData,"145=" .. math.floor(soic_conv_mp:get_argument_value(145) * 10 + 0.1)) -- VHF_radio.AM, 141, 0.9, 0, 9)

-- Moves through incremental numbers so will return interesting values

table.insert(soic_conv_flightData,"146=" .. string.format("%0.0f", soic_conv_mp:get_argument_value(146) * 100)) -- VHF_radio.AM, 142, 0.75, 0, 75)

 

 

--VHF FM

table.insert(soic_conv_flightData,"157=" .. math.floor(soic_conv_mp:get_argument_value(157) * 20 + 0.1)) -- VHF_radio.FM, 153, 0.9, 0, 15)

table.insert(soic_conv_flightData,"158=" .. math.floor(soic_conv_mp:get_argument_value(158) * 10 + 0.1)) -- VHF_radio.FM, 154, 0.9, 0, 9)

table.insert(soic_conv_flightData,"159=" .. math.floor(soic_conv_mp:get_argument_value(159) * 10 + 0.1)) -- VHF_radio.FM, 155, 0.9, 0, 9)

table.insert(soic_conv_flightData,"160=" .. string.format("%0.0f", soic_conv_mp:get_argument_value(160) * 100)) -- VHF_radio.FM, 156, 0.75, 0, 75)

 

 

*/

 

cheers

 

Peter

Edited by bnepethomas
  • Replies 219
  • Created
  • Last Reply

Top Posters In This Topic

  • 3 weeks later...
Posted

Spent some quality time with a laser building out some proof of concepts for the UFC and Radio, so much easier cutting our squares with a laser than compared to manually doing it.

file_zps93bb21dd.jpg

file_zpsddc8643d.jpg

file_zps5f6b1980.jpg

Posted

Love it - are you glueing the button (caps) to the pcb switches below or do they have a flange to keep them in place?

 

My bloody caps, I tried to superglue them and the glue ran down into the switch choking it.

 

Did you use a laser to cut the panel face too? It is very neat.

Posted
Love it - are you glueing the button (caps) to the pcb switches below or do they have a flange to keep them in place?

 

My bloody caps, I tried to superglue them and the glue ran down into the switch choking it.

 

Did you use a laser to cut the panel face too? It is very neat.

The Caps are fitted to the switch, no flanges or glue needed :), I scored the switches from ebay (OMRON B3F-4055) and the matching caps from Digikey (SW259-ND KEYCAP 12MM SQ WHITE FITS 12MM), no superglue needed (as I'm guaranteed to glue my fingers together :)).

 

The Laser was used to cut the panel, its the only way to go.

 

Cheers

 

Peter

Posted

And finally got brave and took apart the OpenCockpits CDU to install the matching buttons for the A10, it isn't laid out exactly same same as the A10, but will still do the job.

 

file_zpsb53c0a6a.jpg

Posted
have you got UHF working as well & what exactly would be required to drive what you have here?

 

open cockpits card + display card?

Have held off on the UHF, rumor has it the UHF LUA code may be better behaved, but until that time its the VHF radios, TACAN and ILS.

 

Currently this is running of a Opencockpits LCD card, and the Leo Bodnar card to converter the rotary encoder to Joystick clicks.

 

Cheers

 

peter

Posted (edited)

Had some time of a laser with Levinsky, used some of the great approaches used by glider to bang together electrical panel. Only slight difference was using 2 * 3mm layers of black acrylic, and the top plate is 3mm white acrylic painted with black paint, and then lasered. Real happy with back-lighting, once nice trick is cutting the 5mm holes for the leds in the back plate, this makes it real easy to install and wire up the leds.

file_zpsbb404798.jpg

This was in a well lit room:

file_zpscdacde68.jpg

 

And for those wondering, at 12V panel uses just under 80mA for backlight, there are several strings of three green leds, used a 220ohm resistor for strings with 3 leds, and 440 resistor for strings with 2 leds. Using PWM for dimming.

Edited by bnepethomas
Posted
You are not wrong:

 

Removes unwanted hair, and two shades of skin color, in just minutes!! :lol:

ASUS ROG Maximus VIII Hero, i7-6700K, Noctua NH-D14 Cooler, Crucial 32GB DDR4 2133, Samsung 950 Pro NVMe 256GB, Samsung EVO 250GB & 500GB SSD, 2TB Caviar Black, Zotac GTX 1080 AMP! Extreme 8GB, Corsair HX1000i, Phillips BDM4065UC 40" 4k monitor, VX2258 TouchScreen, TIR 5 w/ProClip, TM Warthog, VKB Gladiator Pro, Saitek X56, et. al., MFG Crosswind Pedals #1199, VolairSim Pit, Rift CV1 :thumbup:

Posted

Shouldn't that bottom panel be label NMSP?

ASUS ROG Maximus VIII Hero, i7-6700K, Noctua NH-D14 Cooler, Crucial 32GB DDR4 2133, Samsung 950 Pro NVMe 256GB, Samsung EVO 250GB & 500GB SSD, 2TB Caviar Black, Zotac GTX 1080 AMP! Extreme 8GB, Corsair HX1000i, Phillips BDM4065UC 40" 4k monitor, VX2258 TouchScreen, TIR 5 w/ProClip, TM Warthog, VKB Gladiator Pro, Saitek X56, et. al., MFG Crosswind Pedals #1199, VolairSim Pit, Rift CV1 :thumbup:

Posted
Shouldn't that bottom panel be label NMSP?

Yeap siree, thats one of the things I do need to touch up, as well as reducing its width, found out I'd grabbed the wrong template...doh!!!! All part of the fun of building your own bits and pieces

Posted
Yeap siree, thats one of the things I do need to touch up, as well as reducing its width, found out I'd grabbed the wrong template...doh!!!! All part of the fun of building your own bits and pieces

 

Cool. Looks great otherwise. Apologies for leaping onto the only flaw. :)

ASUS ROG Maximus VIII Hero, i7-6700K, Noctua NH-D14 Cooler, Crucial 32GB DDR4 2133, Samsung 950 Pro NVMe 256GB, Samsung EVO 250GB & 500GB SSD, 2TB Caviar Black, Zotac GTX 1080 AMP! Extreme 8GB, Corsair HX1000i, Phillips BDM4065UC 40" 4k monitor, VX2258 TouchScreen, TIR 5 w/ProClip, TM Warthog, VKB Gladiator Pro, Saitek X56, et. al., MFG Crosswind Pedals #1199, VolairSim Pit, Rift CV1 :thumbup:

Posted
Looking very good. Where did you get the push buttons for the NMSP? Is it home made?

P.s. think the top panel should be CMSC :smilewink: but what the heck. I like you panels

 

Cheers

Hans

 

:) typos galore, nothing like doing a science project at the last minute late on Friday night. Good to know about the errors before redoing the panel. The buttons are home made, took some green push buttons, painted them black lasered out the text, filled that in with white paint, then lasered out the symbols.

 

cheers

 

Peter

Posted

Been banging away at a general purpose magnetic switch interface, using C#and OpenCockpits USB Output card.

Got a quirk to resolve where the buttons stay on, even the aircraft is powered down, wondering if anyone else has had success in interfacing magnetic switches?

 

Here's the video of them in operation.

AWmDgvURfXM

  • Recently Browsing   0 members

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