Jump to content

DCS-BIOS Discussion Thread


Recommended Posts

  • Replies 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

I don't see it in the DCS-BIOS control reference. And I had a brief look at CaptZeen's Helios profile too - same again, no door gunner stuff.

Is it possible to, somehow, change fixed step rotaries to variable step rotaries in DCS BIOS?

Not so trivial - we all learn something new from day to day. Here you go:   You can also put the capacitor below the switch - parallel means it does not interrupt the line to the switc

Hi,

 

I've posted this in the F-18 thread but it may not be the correct area so I'm re-posting here in the hopes that someone understands DCS-BIOS much better than me.

 

I'm having issues with DCS BIOS with Andrew's F-18 profile. His function looks good but non of the intercomms work. There's also allot of other controls that don't work. It doesn't sound right so it must be something I have wrong.

 

Is my understanding below correct? Are there any other factors I'm not considering? This for the RWR volume.

 

The device ID was incorrect (41, changed them to 40.)

 

...\Saved Games\DCS.openbeta\Scripts\DCS-BIOS\lib\

FA-18C_hornet.lau:

definePotentiometer("COM_RWR", 40, 3004, 359, {0, 1}, "Communication Panel", "RWR Volume Control Knob")

...\DCS World OpenBeta\Mods\aircraft\FA-18C\Cockpit\Scripts\

devices.lau:

devices["INTERCOM"] = counter()--40 -- Intercommunication Amplifier-Control - AM-7360/A

 

command_defs.lua:

-- intercom

count = start_command

intercom_commands =

{

CommSw = counter(); -- 3001

VOX_Volume = counter(); -- 3002

ICS_Volume = counter(); -- 3003

RWR_Volume = counter(); -- 3004

WPN_Volume = counter();

...

 

clickabledata.lau:

elements["pnt_359"] = default_axis_limited(_("RWR Volume Control Knob"), devices.INTERCOM, intercom_commands.RWR_Volume, 359, 0.0, 0.1, false, false, {0,1})

 

Thanks!

 

cheers

 

John

Link to post
Share on other sites

When Andrews made the F18 dcsbios file, the device number were correct.

After that, ED changed the device number from the 38 and up, moving the device 38 content ( hotas) to the device 10. So all the device numbers from 38 need to be substract by 1.

 

 

I made the corrections on my advanced F18 DCSbios file you can find in the DCS Flightpanels github download section.

You can donwload from here:

https://github.com/DCSFlightpanels/dcs-bios/releases

 

 

 

..


Edited by Capt Zeen
Link to post
Share on other sites

Thanks Capt Zeen, I'm using your DCSBIOS files now. DeadMeat pointed me in the right direction, my documentation was out of date, all good now.

 

cheers

 

John

 

When Andrews made the F18 dcsbios file, the device number were correct.

After that, ED changed the device number from the 38 and up, moving the device 38 content ( hotas) to the device 10. So all the device numbers from 38 need to be substract by 1.

 

 

I made the corrections on my advanced F18 DCSbios file you can find in the DCS Flightpanels github download section.

You can donwload from here:

https://github.com/DCSFlightpanels/dcs-bios/releases

 

 

 

..

Link to post
Share on other sites

I'm having issues with DCS BIOS with Andrew's F-18 profile. His function looks good but non of the intercomms work. There's also allot of other controls that don't work. It doesn't sound right so it must be something I have wrong.

 

Sorry mate, been extremely busy with work.

 

As pointed out some of the device ids have changed, it is on my to-do list to update and publish a new version as soon as I can.

 

It would be great if ED could stop changing the device Ids though ;)

Intel i7 10700K @ 4.5 GHz / ASUS ROG STRIX Z490-F Gaming / 32 Gb G.Skill DDR4 / Inno3d RTX 3090 / 512 Gb Samsung 850 EVO System SSD / 512 Gb Samsung 850 EVO DCS SSD / Win 10 x64 Pro / WINWING F/A-18 HOTAS

 

A-10C, AV-8B, F-5E, F-86F, FC3, FW190D-9, Hawk, Ka50 2, P-51D, Spitfire, UH-1H, F/A-18C, F-14, F-16, Supercarrier, Christen Eagle 2

 

Nevada, Normandy, Persian Gulf, The Channel

Link to post
Share on other sites
hello

im beguiner on dcs bios ,i m trying building my own cockpit, i need some knowledge of

-how add F-5E to the dcs bios folders, which files need to add on dcs bios

-i need detailed steps

 

check here, https://github.com/DCSFlightpanels/dcs-bios/releases

some started a f5 dcsbios already

 

 

..

Link to post
Share on other sites

Hi all, new user.. good stuff!

 

I've created an app which sends button presses/releases for the UFC in the Hornet, all peachy and works like a charm but when i look at the dcs-bios.log i get tons of these messages when i'm in the Hornet:

 

value -755.000000 is too small for address 29908 mask 65535

value -4.000000 is too small for address 29910 mask 65535

value 1900515.000000 is too large for address 29934 mask 65535

value -105543.000000 is too small for address 29936 mask 65535

value -485.000000 is too small for address 29908 mask 65535

value -8.000000 is too small for address 29910 mask 65535

value -5863.000000 is too small for address 29916 mask 65535

value 1900515.000000 is too large for address 29934 mask 65535

value -633020.000000 is too small for address 29936 mask 65535

value -303.000000 is too small for address 29908 mask 65535

value -10.000000 is too small for address 29910 mask 65535

value -5979.000000 is too small for address 29916 mask 65535

value 1900515.000000 is too large for address 29934 mask 65535

value -815560.000000 is too small for address 29936 mask 65535

 

There's nothing sending data to DCS(bios), no app/application running. When getting into the pit of the Viggen and the P-51 i see the same messages. Not in the F-15, Harrier, L-39 e.g. Is this a profile bug?


Edited by Coug4r

-

If man were meant to fly he'd be filled with helium.

Link to post
Share on other sites
  • 2 weeks later...
I finally got the whole thing working, 6 dials, all switches and knobs, perfect!

 

The ARK-9 is a kind of mirror image of the ARK-15, so I have to remember to reverse things, (until the Mi-24...).

 

Thank you Solo for all your guidance and help!

 

And I completely forgot to post the code.... So here it is. To any other Mi-24 pit builders out there that might be interested, there are one or two ARK-15 units on eBay currently. It is a relatively easy rewiring job, and an Arduino Mega 2560 to cram into the back of the box.

 

 

 

/*

Tell DCS-BIOS to use a serial connection and use interrupt-driven

communication. The main program will be interrupted to prioritize

processing incoming data.

 

This should work on any Arduino that has an ATMega328 controller

(Uno, Pro Mini, many others).

*/

#define DCSBIOS_IRQ_SERIAL

 

#include "DcsBios.h"

 

int DCS_valueDial_1; // MAIN/1 0-1KHZ DIAL/ARK-9 TUNE

int DCS_valueDial_2; // MAIN/1 10KHZ DIAL

int DCS_valueDial_3; // MAIN/1 100KHZ DIAL

int DCS_valueDial_4; // BACK/1 0-1KHZ DIAL/ARK-9 TUNE

int DCS_valueDial_5; // BACK/1 10KHZ DIAL

int DCS_valueDial_6; // BACK/1 100KHZ DIAL

 

/* paste code snippets from the reference documentation here */

void onArc9MainTuneChange(unsigned int newValue) {

DCS_valueDial_1 = newValue;

}

DcsBios::IntegerBuffer arc9MainTuneBuffer(0x2672, 0xffff, 0, onArc9MainTuneChange);

 

void onArcMain10khzChange(unsigned int newValue) {

DCS_valueDial_2 = newValue;

}

DcsBios::IntegerBuffer arcMain10khzBuffer(0x26a2, 0x00f0, 4, onArcMain10khzChange);

 

void onArcMain100khzChange(unsigned int newValue) {

DCS_valueDial_3 = newValue;

}

DcsBios::IntegerBuffer arcMain100khzBuffer(0x26a2, 0x000f, 0, onArcMain100khzChange);

 

void onArc9BckTuneChange(unsigned int newValue) {

DCS_valueDial_4 = newValue;

}

DcsBios::IntegerBuffer arc9BckTuneBuffer(0x2670, 0xffff, 0, onArc9BckTuneChange);

 

void onArcBck10khzChange(unsigned int newValue) {

DCS_valueDial_5 = newValue;

}

DcsBios::IntegerBuffer arcBck10khzBuffer(0x26a0, 0xf000, 12, onArcBck10khzChange);

 

void onArcBck100khzChange(unsigned int newValue) {

DCS_valueDial_6 = newValue;

}

DcsBios::IntegerBuffer arcBck100khzBuffer(0x26a0, 0x0f00, 8, onArcBck100khzChange);

 

const byte arc9ModePins[4] = {6, 7, 8, 9};

DcsBios::SwitchMultiPos arc9Mode("ARC9_MODE", arc9ModePins, 4);

 

const byte arc9MainBackupPins[2] = {3, 4};

DcsBios::SwitchMultiPos arc9MainBackup("ARC9_MAIN_BACKUP", arc9MainBackupPins, 2);

 

const byte arc9TlfTlgPins[2] = {14, 15};

DcsBios::SwitchMultiPos arc9TlfTlg("ARC9_TLF_TLG", arc9TlfTlgPins, 2);

 

DcsBios::Potentiometer arc9Vol("ARC9_VOL", A0);

 

const byte arc9LoopPins[1] = {16};

DcsBios::SwitchMultiPos arc9Loop("ARC_9_LOOP", arc9LoopPins, 1);

 

 

 

void setup() {

DcsBios::setup();

 

//ARK-9 DIAL_1 MAIN INPUTS 0-9.5/ -10-+20

DDRC = B00000000; // set PIND (digital 37-30) as inputs

PORTC = B11111111; // Sets (digital 37-30) with internal pull up

//ARK-9 DIAL_2 MAIN inputs- 0-90 kHz Main

DDRD = B00000000; // set PIND (digital 38+21-18) as inputs

PORTD = B11111111; // Sets (digital 38+21-18) with internal pull up

//ARK-9 DIAL_3 MAIN inputs- 100 kHz Main

DDRA = B00000000; // set PINA (digital 29-22) as inputs

PORTA = B11111111; // Sets (digital 29-22) with internal pull up

//ARK-9 DIAL_4 BACK INPUTS 0-9.5/ -10-+20

DDRB = B00000000; // set PIND (digital 37-30) as inputs

PORTB = B11111111; // Sets (digital 37-30) with internal pull up

//ARK-9 DIAL_5 BACK inputs- 0-90 kHz Main

DDRL = B00000000; // set PIND (digital 38+21-18) as inputs

PORTL = B11111111; // Sets (digital 38+21-18) with internal pull up

//ARK-9 DIAL_6 BACK inputs- 100 kHz Main

DDRK = B00000000; // set PINA (digital 29-22) as inputs

PORTK = B11111111; // Sets (digital 29-22) with internal pull up

 

}

 

/////MAIN FREQUENCY TUNE DIAL; DIAL 1 ///////////////////////

int inputDial_1()

{

int valueDial_1;

if (PINC == B11111111) {

valueDial_1 = 0;

}

 

if (PINC == B11111110) {

valueDial_1 = 1;

}

 

if (PINC == B11101111) {

valueDial_1 = 2;

}

 

if (PINC == B11101110) {

valueDial_1 = 3;

}

 

if (PINC == B11111101) {

valueDial_1 = 4;

}

 

if (PINC == B11111100) {

valueDial_1 = 5;

}

 

if (PINC == B11101101) {

valueDial_1 = 6;

}

 

if (PINC == B11101100) {

valueDial_1 = 7;

}

 

if (PINC == B11110101) {

valueDial_1 = 8;

}

 

if (PINC == B11110100) {

valueDial_1 = 9;

}

 

if (PINC == B11100101) {

valueDial_1 = 10;

}

 

if (PINC == B11100100) {

valueDial_1 = 11;

}

 

if (PINC == B11111001) {

valueDial_1 = 12;

}

 

if (PINC == B11111000) {

valueDial_1 = 13;

}

 

if (PINC == B11101001) {

valueDial_1 = 14;

}

 

if (PINC == B11101000) {

valueDial_1 = 15;

}

 

if (PINC == B11110001) {

valueDial_1 = 16;

}

 

if (PINC == B11110000) {

valueDial_1 = 17;

}

 

if (PINC == B11100001) {

valueDial_1 = 18;

}

 

if (PINC == B11100000) {

valueDial_1 = 19;

}

 

return valueDial_1;

}

 

///// END OF MAIN FREQUENCY TUNER DIAL_1///////////////////

 

/////MAIN 10KHZ ROTARY DIAL///////////////////////////////////////////////////

//ARK-9 DIAL_2 inputs- 0-90 kHz Main

 

//DDRB = B00000000; // set PIND digital 53-50,10-13 as inputs

//PORTB = B11111111; // Sets digital 53-50,10-13 with internal pull up

//}

 

int inputDial_2()

{

int valueDial_2;

if (PIND == B11111111) {

valueDial_2 = 0;

}

 

if (PIND == B11110111) {

valueDial_2 = 1;

}

 

if (PIND == B11111011) {

valueDial_2 = 2;

}

 

if (PIND == B11110011) {

valueDial_2 = 3;

}

 

if (PIND == B01111010) {

valueDial_2 = 4;

}

 

if (PIND == B01110010) {

valueDial_2 = 5;

}

 

if (PIND == B01111001) {

valueDial_2 = 6;

}

 

if (PIND == B01110001) {

valueDial_2 = 7;

}

 

if (PIND == B01111000) {

valueDial_2 = 8;

}

 

if (PIND == B01110000) {

valueDial_2 = 9;

}

 

return valueDial_2;

}

////222222//END OF MAIN 10KHZ ROTARY DIAL_2////////////////

 

//33333///MAIN 100KHZ DIAL_3 ///////////////////////

int inputDial_3()

{

int valueDial_3;

if (PINA == B11111111) {

valueDial_3 = 0;

}

 

if (PINA == B11110111) {

valueDial_3 = 1;

}

 

if (PINA == B11111110) {

valueDial_3 = 2;

}

 

if (PINA == B11110110) {

valueDial_3 = 3;

}

 

if (PINA == B11111010) {

valueDial_3 = 4;

}

 

if (PINA == B11110010) {

valueDial_3 = 5;

}

 

if (PINA == B11111100) {

valueDial_3 = 6;

}

 

if (PINA == B11110100) {

valueDial_3 = 7;

}

 

if (PINA == B11111000) {

valueDial_3 = 8;

}

 

if (PINA == B11110000) {

valueDial_3 = 9;

}

 

if (PINA == B11101111) {

valueDial_3 = 10;

}

 

if (PINA == B11100111) {

valueDial_3 = 11;

}

 

if (PINA == B11101110) {

valueDial_3 = 12;

}

 

if (PINA == B11100110) {

valueDial_3 = 13;

}

 

if (PINA == B11101010) {

valueDial_3 = 14;

}

 

if (PINA == B11100010) {

valueDial_3 = 15;

}

 

if (PINA == B11101100) {

valueDial_3 = 16;

}

 

if (PINA == B11100100) {

valueDial_3 = 17;

}

 

if (PINA == B11100100) {

valueDial_3 = 18;

}

 

if (PINA == B11100100) {

valueDial_3 = 19;

}

 

return valueDial_3;

}

 

////333333333////END OF MAIN 100KHZ DIAL 3

 

/////BACK FREQUENCY TUNE DIAL; DIAL 1 ///////////////////////

int inputDial_4()

{

int valueDial_4;

if (PINB == B11111111) {

valueDial_4 = 0;

}

 

if (PINB == B11111110) {

valueDial_4 = 1;

}

 

if (PINB == B11101111) {

valueDial_4 = 2;

}

 

if (PINB == B11101110) {

valueDial_4 = 3;

}

 

if (PINB == B11111101) {

valueDial_4 = 4;

}

 

if (PINB == B11111100) {

valueDial_4 = 5;

}

 

if (PINB == B11101101) {

valueDial_4 = 6;

}

 

if (PINB == B11101100) {

valueDial_4 = 7;

}

 

if (PINB == B11110101) {

valueDial_4 = 8;

}

 

if (PINB == B11110100) {

valueDial_4 = 9;

}

 

if (PINB == B11100101) {

valueDial_4 = 10;

}

 

if (PINB == B11100100) {

valueDial_4 = 11;

}

 

if (PINB == B11111001) {

valueDial_4 = 12;

}

 

if (PINB == B11111000) {

valueDial_4 = 13;

}

 

if (PINB == B11101001) {

valueDial_4 = 14;

}

 

if (PINB == B11101000) {

valueDial_4 = 15;

}

 

if (PINB == B11110001) {

valueDial_4 = 16;

}

 

if (PINB == B11110000) {

valueDial_4 = 17;

}

 

if (PINB == B11100001) {

valueDial_4 = 18;

}

 

if (PINB == B11100000) {

valueDial_4 = 19;

}

 

return valueDial_4;

}

 

///// END OF BACK FREQUENCY TUNER DIAL_1///////////////////

 

/////BACK 10KHZ ROTARY DIAL 5///////////////////////////////////////////////////

//ARK-9 DIAL_5 inputs- 0-90 kHz BACK

 

 

int inputDial_5()

{

int valueDial_5;

if (PINL == B11111111) {

valueDial_5 = 0;

}

 

if (PINL == B11110111) {

valueDial_5 = 1;

}

 

if (PINL == B11111011) {

valueDial_5 = 2;

}

 

if (PINL == B11110011) {

valueDial_5 = 3;

}

 

if (PINL == B11101010) {

valueDial_5 = 4;

}

 

if (PINL == B11100010) {

valueDial_5 = 5;

}

 

if (PINL == B11101001) {

valueDial_5 = 6;

}

 

if (PINL == B11100001) {

valueDial_5 = 7;

}

 

if (PINL == B11101000) {

valueDial_5 = 8;

}

 

if (PINL == B11100000) {

valueDial_5 = 9;

}

 

return valueDial_5;

}

////555555//END OF BACK 10KHZ ROTARY DIAL_5////////////////

 

//666666///BACK 100KHZ DIAL_6 ///////////////////////

int inputDial_6()

{

int valueDial_6;

if (PINK == B11111111) {

valueDial_6 = 0;

}

 

if (PINK == B11110111) {

valueDial_6 = 1;

}

 

if (PINK == B11111110) {

valueDial_6 = 2;

}

 

if (PINK == B11110110) {

valueDial_6 = 3;

}

 

if (PINK == B11111010) {

valueDial_6 = 4;

}

 

if (PINK == B11110010) {

valueDial_6 = 5;

}

 

if (PINK == B11111100) {

valueDial_6 = 6;

}

 

if (PINK == B11110100) {

valueDial_6 = 7;

}

 

if (PINK == B11111000) {

valueDial_6 = 8;

}

 

if (PINK == B11110000) {

valueDial_6 = 9;

}

 

if (PINK == B11101111) {

valueDial_6 = 10;

}

 

if (PINK == B11100111) {

valueDial_6 = 11;

}

 

if (PINK == B11101110) {

valueDial_6 = 12;

}

 

if (PINK == B11100110) {

valueDial_6 = 13;

}

 

if (PINK == B11101010) {

valueDial_6 = 14;

}

 

if (PINK == B11100010) {

valueDial_6 = 15;

}

 

if (PINK == B11101100) {

valueDial_6 = 16;

}

 

if (PINK == B11100100) {

valueDial_6 = 17;

}

 

if (PINK == B11100100) {

valueDial_6 = 18;

}

 

if (PINK == B11100100) {

valueDial_6 = 19;

}

 

return valueDial_6;

}

 

////666666////END OF BACK 100KHZ DIAL 6

 

void loop() {

DcsBios::loop();

 

// Check and adjust 1st dial

if (DCS_valueDial_1 != inputDial_1()) {

if ( inputDial_1() == 0) {

sendDcsBiosMessage("ARC9_MAIN_TUNE", "0");

}

if ( inputDial_1() == 1) {

sendDcsBiosMessage("ARC9_MAIN_TUNE", "3200");

}

if ( inputDial_1() == 2) {

sendDcsBiosMessage("ARC9_MAIN_TUNE", "6400");

}

if ( inputDial_1() == 3) {

sendDcsBiosMessage("ARC9_MAIN_TUNE", "9600");

}

if ( inputDial_1() == 4) {

sendDcsBiosMessage("ARC9_MAIN_TUNE", "12800");

}

if ( inputDial_1() == 5) {

sendDcsBiosMessage("ARC9_MAIN_TUNE", "16000");

}

if ( inputDial_1() == 6) {

sendDcsBiosMessage("ARC9_MAIN_TUNE", "19200");

}

if ( inputDial_1() == 7) {

sendDcsBiosMessage("ARC9_MAIN_TUNE", "22400");

}

if ( inputDial_1() == 8) {

sendDcsBiosMessage("ARC9_MAIN_TUNE", "25600");

}

if ( inputDial_1() == 9) {

sendDcsBiosMessage("ARC9_MAIN_TUNE", "28800");

}

if ( inputDial_1() == 10) {

sendDcsBiosMessage("ARC9_MAIN_TUNE", "32000");

}

if ( inputDial_1() == 11) {

sendDcsBiosMessage("ARC9_MAIN_TUNE", "35200");

}

if ( inputDial_1() == 12) {

sendDcsBiosMessage("ARC9_MAIN_TUNE", "38400");

}

if ( inputDial_1() == 13) {

sendDcsBiosMessage("ARC9_MAIN_TUNE", "41600");

}

if ( inputDial_1() == 14) {

sendDcsBiosMessage("ARC9_MAIN_TUNE", "44800");

}

if ( inputDial_1() == 15) {

sendDcsBiosMessage("ARC9_MAIN_TUNE", "48000");

}

if ( inputDial_1() == 16) {

sendDcsBiosMessage("ARC9_MAIN_TUNE", "51200");

}

if ( inputDial_1() == 17) {

sendDcsBiosMessage("ARC9_MAIN_TUNE", "54400");

}

if ( inputDial_1() == 18) {

sendDcsBiosMessage("ARC9_MAIN_TUNE", "57600");

}

if ( inputDial_1() == 19) {

sendDcsBiosMessage("ARC9_MAIN_TUNE", "60800");

}

}

 

 

// Check and adjust 2nd dial

if (DCS_valueDial_2 != inputDial_2()) {

if ( inputDial_2() == 0) {

sendDcsBiosMessage("ARC_MAIN_10KHZ", "0");

}

if ( inputDial_2() == 1) {

sendDcsBiosMessage("ARC_MAIN_10KHZ", "1");

}

if ( inputDial_2() == 2) {

sendDcsBiosMessage("ARC_MAIN_10KHZ", "2");

}

if ( inputDial_2() == 3) {

sendDcsBiosMessage("ARC_MAIN_10KHZ", "3");

}

if ( inputDial_2() == 4) {

sendDcsBiosMessage("ARC_MAIN_10KHZ", "4");

}

if ( inputDial_2() == 5) {

sendDcsBiosMessage("ARC_MAIN_10KHZ", "5");

}

if ( inputDial_2() == 6) {

sendDcsBiosMessage("ARC_MAIN_10KHZ", "6");

}

if ( inputDial_2() == 7) {

sendDcsBiosMessage("ARC_MAIN_10KHZ", "7");

}

if ( inputDial_2() == 8) {

sendDcsBiosMessage("ARC_MAIN_10KHZ", "8");

}

if ( inputDial_2() == 9) {

sendDcsBiosMessage("ARC_MAIN_10KHZ", "9");

}

}

// Check and adjust 3RD dial

if (DCS_valueDial_3 != inputDial_3()) {

if ( inputDial_3() == 0) {

sendDcsBiosMessage("ARC_MAIN_100KHZ", "0");

}

if ( inputDial_3() == 1) {

sendDcsBiosMessage("ARC_MAIN_100KHZ", "1");

}

if ( inputDial_3() == 2) {

sendDcsBiosMessage("ARC_MAIN_100KHZ", "2");

}

if ( inputDial_3() == 3) {

sendDcsBiosMessage("ARC_MAIN_100KHZ", "3");

}

if ( inputDial_3() == 4) {

sendDcsBiosMessage("ARC_MAIN_100KHZ", "4");

}

if ( inputDial_3() == 5) {

sendDcsBiosMessage("ARC_MAIN_100KHZ", "5");

}

if ( inputDial_3() == 6) {

sendDcsBiosMessage("ARC_MAIN_100KHZ", "6");

}

if ( inputDial_3() == 7) {

sendDcsBiosMessage("ARC_MAIN_100KHZ", "7");

}

if ( inputDial_3() == 8) {

sendDcsBiosMessage("ARC_MAIN_100KHZ", "8");

}

if ( inputDial_3() == 9) {

sendDcsBiosMessage("ARC_MAIN_100KHZ", "9");

}

if ( inputDial_3() == 10) {

sendDcsBiosMessage("ARC_MAIN_100KHZ", "10");

}

if ( inputDial_3() == 11) {

sendDcsBiosMessage("ARC_MAIN_100KHZ", "11");

}

if ( inputDial_3() == 12) {

sendDcsBiosMessage("ARC_MAIN_100KHZ", "12");

}

if ( inputDial_3() == 13) {

sendDcsBiosMessage("ARC_MAIN_100KHZ", "13");

}

if ( inputDial_3() == 14) {

sendDcsBiosMessage("ARC_MAIN_100KHZ", "14");

}

if ( inputDial_3() == 15) {

sendDcsBiosMessage("ARC_MAIN_100KHZ", "15");

}

if ( inputDial_3() == 16) {

sendDcsBiosMessage("ARC_MAIN_100KHZ", "16");

}

if ( inputDial_3() == 17) {

sendDcsBiosMessage("ARC_MAIN_100KHZ", "17");

}

if ( inputDial_3() == 18) {

sendDcsBiosMessage("ARC_MAIN_100KHZ", "0");

}

if ( inputDial_3() == 19) {

sendDcsBiosMessage("ARC_MAIN_100KHZ", "0");

}

}

// Check and adjust 4TH dial

if (DCS_valueDial_4 != inputDial_4()) {

if ( inputDial_4() == 0) {

sendDcsBiosMessage("ARC9_BCK_TUNE", "0");

}

if ( inputDial_4() == 1) {

sendDcsBiosMessage("ARC9_BCK_TUNE", "3200");

}

if ( inputDial_4() == 2) {

sendDcsBiosMessage("ARC9_BCK_TUNE", "6400");

}

if ( inputDial_4() == 3) {

sendDcsBiosMessage("ARC9_BCK_TUNE", "9600");

}

if ( inputDial_4() == 4) {

sendDcsBiosMessage("ARC9_BCK_TUNE", "12800");

}

if ( inputDial_4() == 5) {

sendDcsBiosMessage("ARC9_BCK_TUNE", "16000");

}

if ( inputDial_4() == 6) {

sendDcsBiosMessage("ARC9_BCK_TUNE", "19200");

}

if ( inputDial_4() == 7) {

sendDcsBiosMessage("ARC9_BCK_TUNE", "22400");

}

if ( inputDial_4() == 8) {

sendDcsBiosMessage("ARC9_BCK_TUNE", "25600");

}

if ( inputDial_4() == 9) {

sendDcsBiosMessage("ARC9_BCK_TUNE", "28800");

}

if ( inputDial_4() == 10) {

sendDcsBiosMessage("ARC9_BCK_TUNE", "32000");

}

if ( inputDial_4() == 11) {

sendDcsBiosMessage("ARC9_BCK_TUNE", "35200");

}

if ( inputDial_4() == 12) {

sendDcsBiosMessage("ARC9_BCK_TUNE", "38400");

}

if ( inputDial_4() == 13) {

sendDcsBiosMessage("ARC9_BCK_TUNE", "41600");

}

if ( inputDial_4() == 14) {

sendDcsBiosMessage("ARC9_BCK_TUNE", "44800");

}

if ( inputDial_4() == 15) {

sendDcsBiosMessage("ARC9_BCK_TUNE", "48000");

}

if ( inputDial_4() == 16) {

sendDcsBiosMessage("ARC9_BCK_TUNE", "51200");

}

if ( inputDial_4() == 17) {

sendDcsBiosMessage("ARC9_BCK_TUNE", "54400");

}

if ( inputDial_4() == 18) {

sendDcsBiosMessage("ARC9_BCK_TUNE", "57600");

}

if ( inputDial_4() == 19) {

sendDcsBiosMessage("ARC9_BCK_TUNE", "60800");

}

}

 

 

// Check and adjust 5TH dial

if (DCS_valueDial_5 != inputDial_5()) {

if ( inputDial_5() == 0) {

sendDcsBiosMessage("ARC_BCK_10KHZ", "0");

}

if ( inputDial_5() == 1) {

sendDcsBiosMessage("ARC_BCK_10KHZ", "1");

}

if ( inputDial_5() == 2) {

sendDcsBiosMessage("ARC_BCK_10KHZ", "2");

}

if ( inputDial_5() == 3) {

sendDcsBiosMessage("ARC_BCK_10KHZ", "3");

}

if ( inputDial_5() == 4) {

sendDcsBiosMessage("ARC_BCK_10KHZ", "4");

}

if ( inputDial_5() == 5) {

sendDcsBiosMessage("ARC_BCK_10KHZ", "5");

}

if ( inputDial_5() == 6) {

sendDcsBiosMessage("ARC_BCK_10KHZ", "6");

}

if ( inputDial_5() == 7) {

sendDcsBiosMessage("ARC_BCK_10KHZ", "7");

}

if ( inputDial_5() == 8) {

sendDcsBiosMessage("ARC_BCK_10KHZ", "8");

}

if ( inputDial_5() == 9) {

sendDcsBiosMessage("ARC_BCK_10KHZ", "9");

}

}

// Check and adjust 6TH dial

if (DCS_valueDial_6 != inputDial_6()) {

if ( inputDial_6() == 0) {

sendDcsBiosMessage("ARC_BCK_100KHZ", "0");

}

if ( inputDial_6() == 1) {

sendDcsBiosMessage("ARC_BCK_100KHZ", "1");

}

if ( inputDial_6() == 2) {

sendDcsBiosMessage("ARC_BCK_100KHZ", "2");

}

if ( inputDial_6() == 3) {

sendDcsBiosMessage("ARC_BCK_100KHZ", "3");

}

if ( inputDial_6() == 4) {

sendDcsBiosMessage("ARC_BCK_100KHZ", "4");

}

if ( inputDial_6() == 5) {

sendDcsBiosMessage("ARC_BCK_100KHZ", "5");

}

if ( inputDial_6() == 6) {

sendDcsBiosMessage("ARC_BCK_100KHZ", "6");

}

if ( inputDial_6() == 7) {

sendDcsBiosMessage("ARC_BCK_100KHZ", "7");

}

if ( inputDial_6() == 8) {

sendDcsBiosMessage("ARC_BCK_100KHZ", "8");

}

if ( inputDial_6() == 9) {

sendDcsBiosMessage("ARC_BCK_100KHZ", "9");

}

if ( inputDial_6() == 10) {

sendDcsBiosMessage("ARC_BCK_100KHZ", "10");

}

if ( inputDial_6() == 11) {

sendDcsBiosMessage("ARC_BCK_100KHZ", "11");

}

if ( inputDial_6() == 12) {

sendDcsBiosMessage("ARC_BCK_100KHZ", "12");

}

if ( inputDial_6() == 13) {

sendDcsBiosMessage("ARC_BCK_100KHZ", "13");

}

if ( inputDial_6() == 14) {

sendDcsBiosMessage("ARC_BCK_100KHZ", "14");

}

if ( inputDial_6() == 15) {

sendDcsBiosMessage("ARC_BCK_100KHZ", "15");

}

if ( inputDial_6() == 16) {

sendDcsBiosMessage("ARC_BCK_100KHZ", "16");

}

if ( inputDial_6() == 17) {

sendDcsBiosMessage("ARC_BCK_100KHZ", "17");

}

if ( inputDial_6() == 18) {

sendDcsBiosMessage("ARC_BCK_100KHZ", "0");

}

if ( inputDial_6() == 19) {

sendDcsBiosMessage("ARC_BCK_100KHZ", "0");

}

}

 

}

 

 

 

With massive assistance from Solo, I was able to write the code to work for the ARK-9 in the Mi-8, because there is not yet an Mi-24 in DCS! But we know/believe it is coming.... At which point I hope somebody writes a DCS-BIOS for it. They can have my code if it helps.

 

I also have a ARK-9 unit which I bought before I found the ARK-15. I am now going to rewrite the code to work with the ARK-9 unit. There are one or two of those also on the web available. I will be fixing the ARK-9 I have for a friend, but I have another box on the way to me if anybody else is interested....

 

M

SCAN Intel Core i9 10850K "Comet Lake", 32GB DDR4, 10GB NVIDIA RTX 3080, HP Reverb G2

Custom Mi-24 pit with magnetic braked cyclic and collective. See it here: Molevitch Mi-24 Pit.

 

[sIGPIC][/sIGPIC] www.blacksharkden.com

bsd sig 2021.jpg

Link to post
Share on other sites
  • 4 weeks later...

DCS-BIOS: Serial-connect stops working after some time.

 

Hi DCS-BIOS Gurus!

 

I have now 3 devices running on DCS-BIOS. I have yet to venture into daisy chaining them all together so each is running on its own USB connection.

 

I am using them in the Mi-8. I have a Mega2560 running the ARC-9 radio compass and a Nano running the SPU-7 radio selector. ARC-9 uses a mix of standard DCS-BIOS code snippets and some custom code which Hansolo helped me with. The SPU-7 is straight out of the Mi-8 DCS-BIOS snippets.

 

What I find is that they stop running after a period of time. I only discover this when I try to use one ofd them. As I fly online in VR, it is frustrating to have equipment fail and have to resort to using the mouse in cockpit.

I lift my headset to see that one or more of the serial-connect windows has stalled with the message "press any key to continue".

 

What am i doing wrong, or, what is the way to correct this, please?

 

Mole

SCAN Intel Core i9 10850K "Comet Lake", 32GB DDR4, 10GB NVIDIA RTX 3080, HP Reverb G2

Custom Mi-24 pit with magnetic braked cyclic and collective. See it here: Molevitch Mi-24 Pit.

 

[sIGPIC][/sIGPIC] www.blacksharkden.com

bsd sig 2021.jpg

Link to post
Share on other sites
...

I lift my headset to see that one or more of the serial-connect windows has stalled with the message "press any key to continue".

....

Hi Mole.

Same message is to be seen if you unplug a device while running. So my assumption is, your USB-Devices lose their link.

Please recount ALL(! means: also Keys, mice, VR a.s.o.) your USB-Devices. I bet your USB ports are overloaded. And: Don't trust specifications of the manufacturers of your USB-HUBs or PC-mainboard. They are all liars in the matter of connectivity ;)

 

We do not know, how you connect your USB-Devices. USB is always critical. Add (not cascade them) some more active (means: with additional 5V-supply) HUBs and do not overload those ones. I use maximum 3 Ports of a 7-port-HUB to prevent such problems.

 

Maybe it's time for you to switch over to a RS-485-System (Master - Slave)?


Edited by Tekkx

Manual for my version of RS485-Hardware, contact: tekkx@dresi.de

Please do not PM me with DCS-BIOS-related questions. If the answer might also be useful to someone else, it belongs in a public thread where it can be discovered by everyone using the search function. Thank You.

Link to post
Share on other sites
Hi Mole.

Same message is to be seen if you unplug a device while running. So my assumption is, your USB-Devices lose their link.

Please recount ALL(! means: also Keys, mice, VR a.s.o.) your USB-Devices. I bet your USB ports are overloaded. And: Don't trust specifications of the manufacturers of your USB-HUBs or PC-mainboard. They are all liars in the matter of connectivity ;)

 

We do not know, how you connect your USB-Devices. USB is always critical. Add (not cascade them) some more active (means: with additional 5V-supply) HUBs and do not overload those ones. I use maximum 3 Ports of a 7-port-HUB to prevent such problems.

 

Maybe it's time for you to switch over to a RS-485-System (Master - Slave)?

 

Hi Tekkx,

 

Thanks for the speedy response! I really want to head down the rabbit hole of RS-485 Master-Slave connection. I have been browsing and searching for a definitive set up guide. My electronics skills are limited, (don't know an Amp from an Ohm...) but my building skills are good. And I am a fast learner. I am also now accumulating more authentic parts from Mi-8/24 cockpits and can see that soon i will run out of USB ports anyway.

 

I have some self-built radio panels running on Bodnar boards, but increasingly favour the DCS-BIOS/Arduino system. What I have yet to understand...

 

Does the Arduino sketch for ALL systems get installed on the MASTER Mega2560?

Does it then talk to all the subsystems on Nanos or similar?

Does the Master need to be powered?

 

I am also planning a major rebuild of my pit in the new year. It is slightly small as I was basing measurements on some slightly inaccurate references. I now have found some definitive material which will improve the scale. And it has grown organically from a simple set up based round cyclic, collective and pedals to a more fully formed enclosed pit structure. I now want to go full-on with an accurate (as possible) pit-build.

 

I see a DCS-BIOS system as central to much of that, and will look at the 3 x mega master split as Left panel, dashboard, right panel. I do not plan to model steam gauges though, as I am in VR. But I want all the working switches I can do to be there in the right places.

 

I am as I say flying Mi-8 mostly, Huey sometimes, Ka50 sometimes, and looking forward toi the Mi-24.... Hence the 24 pit doubling as an Mi-8 pit.

 

Any help and guidance greatly appreciated on the RS-485 method! Thanks for the advice about the USB Hubs. I am sure that is part of the problem. If not the whole problem...

 

Cheers,

 

Mole

SCAN Intel Core i9 10850K "Comet Lake", 32GB DDR4, 10GB NVIDIA RTX 3080, HP Reverb G2

Custom Mi-24 pit with magnetic braked cyclic and collective. See it here: Molevitch Mi-24 Pit.

 

[sIGPIC][/sIGPIC] www.blacksharkden.com

bsd sig 2021.jpg

Link to post
Share on other sites

Hi Mole,

 

I put a video on YouTube of my Engine Instrument Cluster (link below) and put some detail around its connection via RS485. It might cover a few of your questions.

 

My starting point before building the RS485 network were pictures put on the forum by hansolo. They were really helpful and got me up and running so might be worth looking at those also.

 

 

 

Sent from my SM-G955F using Tapatalk

Link to post
Share on other sites
Does the Arduino sketch for ALL systems get installed on the MASTER Mega2560?

Does it then talk to all the subsystems on Nanos or similar?

Does the Master need to be powered?

Hi molevitch,

 

First of all I can only recommend the RS485 for DCS-BIOS. I have been very happy with it.

 

Secondly to answer you questions;

 

1. The Mega only gets the default DCS-BIOS Master sketch loaded. It cannot run anything else but being a Master.

2. The Slaves will have their individual code AND individual Slave number. What you want for hardware on your Slave units depends a bit on your preferences. You can run a Nano for just one panel or perhaps two panels. You can also run a Mega as a Slave and run as many panels as have IO (Input/Outputs) for.

I run my system with just one Arduino per panel and for more advanced panels I just use a Mega to get enough inputs.

Each of the slave units will IIRCC receive all commands from the Master. I.e. the radio will also receive all the date for flight telemetry but doesn't use it for anything. However each Slave unit will only return commands which it has been programmed for which is just the way you have already seen with the panels you have running on DCS-BIOS. The only difference is that instead of opening 3 times SOCAT for the 3 USB connected panel, you only open 1 SOCAT for the Master.

3. You can power the Master externally but it doesn't really matter since it need the USB to communicate with the PC and are therefore powered by USB.

 

You can see a little more schematics over how I have done it here; https://forums.eagle.ru/showpost.php?p=3247704&postcount=171

 

But actually CraigS' video shows it really nicely and with more explanation. Well done @CraigS :thumbup:. Very informative YT Sir.

 

Oh forgot to write. I added a link all my current Slave sketches running DCS-BIOS over RS485

 

Cheers

Solo


Edited by Hansolo
Added link to my DCS-BIOS Slave sketches
Link to post
Share on other sites

Not sure if this has been mentioned in this thread yet... although we call this an RS485 bus, you should use the RS487 Chip and not the 485 chip. Please don't ask why. I just know that when Ian wrote the code for the bus, he had determined that the 487 chip would be the optimal choice

Regards

John W

aka WarHog.

 

My Cockpit Build Pictures...



John Wall

 

My Arduino Sketches ... https://drive.google.com/drive/folders/1-Dc0Wd9C5l3uY-cPj1iQD3iAEHY6EuHg?usp=sharing

 

 

WIN 10 Pro, i8-8700k @ 5.0ghz, ASUS Maximus x Code, 16GB Corsair Dominator Platinum Ram,



AIO Water Cooler, M.2 512GB NVMe,

500gb SSD, EVGA GTX 1080 ti (11gb), Sony 65” 4K Display

VPC MongoosT-50, TM Warthog Throttle, TRK IR 5.0, Slaw Viper Pedals

Link to post
Share on other sites

Hi CraigS, Hi Hansolo,

 

Thank you both for your replies. Very well made video there Craig, answers all my questions in one go!

 

Thanks to Tekkx also for your replies and PM. Thanks Warhog for the warning about getting 487 chip!

 

I am planning a complete rebuild in the new year of my pit, at which time it will have a new location in the house. Currently got builders in on the house making a new room in the roof, so all is semi-mothballed til then. Still flying and testing systems though!

 

So I am very stimulated by the RS485/MAX487 method, and can say I pretty much fully understand it now.... (famous last words). For the next few months, I will run off some powered USB hubs, and as the frame of the new pit is designed, I will build in a RS485 system.

 

I seem to be gathering more and more authentic Mi-8/Mi-24 parts. So now I need a Mi-24 module to fly it with! (Hint, ED, hint).

 

Here is a link to (bad) video I made of an authentic ARK-9 running under DCS-BIOS standard code. Passing it on to a friend, as I have the ARK-15 running, pretending to be an ARK-9... Thanks to Hansolo for help with the code to get the ARK-15 working!

 

 

Man, I love doing this stuff! Getting good results is so rewarding!

 

Cheers guys! DCS-BIOS Rocks!

 

Mole

SCAN Intel Core i9 10850K "Comet Lake", 32GB DDR4, 10GB NVIDIA RTX 3080, HP Reverb G2

Custom Mi-24 pit with magnetic braked cyclic and collective. See it here: Molevitch Mi-24 Pit.

 

[sIGPIC][/sIGPIC] www.blacksharkden.com

bsd sig 2021.jpg

Link to post
Share on other sites

This vid is fantastic. I have just not been able to wrap my head around the Master Slave thing and not easy to find all the info you need in one place. Can not believe how simple it is after watching this.

 

Thanks a mill man.

 

Hi Mole,

 

I put a video on YouTube of my Engine Instrument Cluster (link below) and put some detail around its connection via RS485. It might cover a few of your questions.

 

My starting point before building the RS485 network were pictures put on the forum by hansolo. They were really helpful and got me up and running so might be worth looking at those also.

 

 

 

Sent from my SM-G955F using Tapatalk

Link to post
Share on other sites
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...