Jump to content

DCS-BIOS Discussion Thread


FSFIan

Recommended Posts

im looking to build a vibration device for the huey doorgunner.. 

in which it is enabled by means of ammo count data..

 

i just have two questions for you dcs bios gurus..

1) is there an doorgunner ammo count data output for dcs bios?

2) does running dcs bios fails on servers with integrity check?

 

thanks for any info or suggestions..

find me on steam! username: Hannibal_A101A

http://steamcommunity.com/profiles/76561197969447179

Link to comment
Share on other sites

21 minutes ago, No1sonuk said:

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.

 thanks for checking it out for me.. i never got far with DCS BIOS...

 

and do u know if i can get into the multiplayer servers if i am running DCS BIOS? last time i looked into DCS BIOS, many said it will fail integrity check..

find me on steam! username: Hannibal_A101A

http://steamcommunity.com/profiles/76561197969447179

Link to comment
Share on other sites

1 hour ago, hannibal said:

and do u know if i can get into the multiplayer servers if i am running DCS BIOS? last time i looked into DCS BIOS, many said it will fail integrity check..

I don't know, I'm afraid - I've not tried yet.
However, from things I've read, it depends on the particular server settings.

Link to comment
Share on other sites

is there someone to check my sketch please ? lot of problems.... 😞

 

 

/* use '#define DCSBIOS_DEFAULT_SERIAL DCSBIOS_IRQ_SERIAL' instead if your Arduino board
 * does not feature an ATMega328 or ATMega2650 controller.
*/
#define DCSBIOS_DEFAULT_SERIAL
#include <DcsBios.h>


#include <LedControl.h>
/* pin 7 is connected to the DataIn
pin 6 is connected to the CLK
pin 5 is connected to LOAD
We have only a single MAX72XX.
*/
LedControl lc=LedControl(7,6,5,1);

/* paste code snippets from the reference documentation here */
//PILOT ARC-159 Frequency
void onPltUhfStringFreqChange(char* newValue) {
lc.setChar(0,0,newValue[6],false);
lc.setChar(0,1,newValue[5],false);
lc.setChar(0,2,newValue[4],false); //true=this is the full stop after digit no 3
lc.setChar(0,3,newValue[2],true);
lc.setChar(0,4,newValue[1],false);
lc.setChar(0,5,newValue[0],false);
}
DcsBios::StringBuffer<7> pltUhfStringFreqBuffer(0x1248, onPltUhfStringFreqChange);
DcsBios::LED pltGunRate(0x127e, 0x8000, 25);
DcsBios::LED pltHookLight(0x12ee, 0x0008, 2);
DcsBios::LED pltSwCooloff(0x12e2, 0x8000, 22);
DcsBios::LED pltMslPrepON(0x12e4, 0x0002, 24);
DcsBios::LED pltGunRatehigh(0x12e2, 0x2000, 25);
DcsBios::LED pltMasterCaution(0x12e2, 0x0200, 23);
DcsBios::LED pltMslModeBore(0x12e4, 0x0008, 26);
DcsBios::LED pltSeamLock(0x12e2, 0x1000, 27);
DcsBios::LED pltFlapsIndLight(0x12ee, 0x0100, 8);
DcsBios::LED pltSpdbrkFullLight(0x12ee, 0x0400, 9);
DcsBios::LED pltSlatsIndLight(0x12ee, 0x0080, 10);
DcsBios::RotaryEncoder pltHsdKnobCrs("PLT_HSD_KNOB_CRS", "-182", "+182", 40, 41);
DcsBios::Potentiometer pltEmergWingSweepltLever("PLT_EMERG_WING_SWEEPLT_LEVER", A3, false, 0, 185);
DcsBios::Switch2Pos pltEmergWingSweepltCover("PLT_EMERG_WING_SWEEPLT_COVER", 51, true);
DcsBios::Potentiometer pltVuhfVol("PLT_VUHF_VOL", A4);
DcsBios::Potentiometer pltUhf1Vol("PLT_UHF1_VOL", A5);
DcsBios::Potentiometer pltHudBright("PLT_HUD_BRIGHT", A2, true);
DcsBios::LED pltTacanCmdButton(0x1222, 0x8000, 48);
DcsBios::Switch2Pos pltHudFilter("PLT_HUD_FILTER", 46);

void setup() {
DcsBios::setup();
//This initializes the MAX7219 and gets it ready of use:
lc.shutdown(0,false); //turn on the display
lc.setIntensity(0,5);//set the brightness
lc.clearDisplay(0); //clear the display

//The following series of "lc.setChar" commands are used to display the number 8 in each digit. This allows us to see each that LED segment is actually working.
lc.setChar(0,0,'8',false);// The first number...0, means there are no other MAX7219's connected to the one we are using.
lc.setChar(0,1,'8',false);// The second number...1, indicates the digit you are sending data too...digit numbering starts at 0.
lc.setChar(0,2,'8',false);// The third number in single quotes is the character thats displayed
lc.setChar(0,3,'8',false);// The statement... true/false is to turn on or off the decimal point (dp) for that particular digit.
lc.setChar(0,4,'8',false);
lc.setChar(0,5,'8',false);
}

void loop() {
DcsBios::loop();
}

Link to comment
Share on other sites

i made some progress , all leds works, only the MAX7219 didn't works ; any idea ?  also , i cannot change the range of my potentiometer adding to these

 

DcsBios::Potentiometer pltEmergWingSweepltLever("PLT_EMERG_WING_SWEEPLT_LEVER", A3);

 

DcsBios::Potentiometer pltEmergWingSweepltLever("PLT_EMERG_WING_SWEEPLT_LEVER", A3, false, 0, 185);

 

Why ? 

 

thanks

 

 

 

forgot the last version of my sketch : 

 

/* use '#define DCSBIOS_DEFAULT_SERIAL DCSBIOS_IRQ_SERIAL' instead if your Arduino board
 * does not feature an ATMega328 or ATMega2650 controller.
*/
#define DCSBIOS_DEFAULT_SERIAL
#include <DcsBios.h>


#include <LedControl.h>
/* pin 7 is connected to the DataIn
pin 6 is connected to the CLK
pin 5 is connected to LOAD
We have only a single MAX72XX.
*/
LedControl lc=LedControl(7,6,5,1);

/* paste code snippets from the reference documentation here */
//PILOT ARC-159 Frequency
void onPltUhfRemoteDispChange(char* newValue) {
lc.setChar(0,0,newValue[6],false);
lc.setChar(0,1,newValue[5],false);
lc.setChar(0,2,newValue[4],false); //true=this is the full stop after digit no 3
lc.setChar(0,3,newValue[2],true);
lc.setChar(0,4,newValue[1],false);
lc.setChar(0,5,newValue[0],false);
}
DcsBios::StringBuffer<7> pltUhfRemoteDispBuffer(0x1474, onPltUhfRemoteDispChange);
DcsBios::LED pltGunRate(0x127e, 0x8000, 25);
DcsBios::LED pltHookLight(0x12ee, 0x0008, 2);
DcsBios::LED pltSwCoolOn(0x12d4, 0x2000, 22);
DcsBios::LED pltMslPrepOn(0x12d4, 0x8000, 24);
DcsBios::LED pltGunRateHigh(0x12d4, 0x0800, 25);
DcsBios::LED pltMasterCaution(0x12d4, 0x0080, 23);
DcsBios::LED pltMslModeBore(0x12d6, 0x0004, 26);
DcsBios::LED pltSeamLock(0x12d4, 0x0400, 27);
DcsBios::LED pltFlapsIndLight(0x12ee, 0x0100, 8);
DcsBios::LED pltSpdbrkFullLight(0x12ee, 0x0400, 9);
DcsBios::LED pltSlatsIndLight(0x12ee, 0x0080, 10);
DcsBios::RotaryEncoder pltHsdKnobCrs("PLT_HSD_KNOB_CRS", "-182", "+182", 40, 41);
DcsBios::Potentiometer pltEmergWingSweepltLever("PLT_EMERG_WING_SWEEPLT_LEVER", A3);
DcsBios::Switch2Pos pltEmergWingSweepltCover("PLT_EMERG_WING_SWEEPLT_COVER", 51, true);
DcsBios::Potentiometer pltVuhfVol("PLT_VUHF_VOL", A4);
DcsBios::Potentiometer pltUhf1Vol("PLT_UHF1_VOL", A5);
DcsBios::Potentiometer pltHudBright("PLT_HUD_BRIGHT", A2);
DcsBios::LED pltTacanComandPlt(0x12d2, 0x0800, 48);
DcsBios::Switch2Pos pltHudFilter("PLT_HUD_FILTER", 46);

void setup() {
DcsBios::setup();
//This initializes the MAX7219 and gets it ready of use:
lc.shutdown(0,false); //turn on the display
lc.setIntensity(0,5);//set the brightness
lc.clearDisplay(0); //clear the display

//The following series of "lc.setChar" commands are used to display the number 8 in each digit. This allows us to see each that LED segment is actually working.
lc.setChar(0,0,'8',false);// The first number...0, means there are no other MAX7219's connected to the one we are using.
lc.setChar(0,1,'8',false);// The second number...1, indicates the digit you are sending data too...digit numbering starts at 0.
lc.setChar(0,2,'8',false);// The third number in single quotes is the character thats displayed
lc.setChar(0,3,'8',false);// The statement... true/false is to turn on or off the decimal point (dp) for that particular digit.
lc.setChar(0,4,'8',false);
lc.setChar(0,5,'8',false);
}

void loop() {
DcsBios::loop();
}

Link to comment
Share on other sites

Did the hornet ECM switch change in the current open beta? Previously moving it I could go through off, stby, bit, etc. Now I move the switch and it performs no function in game. I am using DCS Bio HUB...

 

This is the HUB code: defineTumb("ECM_MODE_SW", 0, 3116, 248, 0.1, {0.0, 0.4}, nil, false, "Dispenser/EMC Panel", "ECM Mode Switch, XMIT/REC/BIT/STBY/OFF")

Link to comment
Share on other sites

hi everyone, I have the problem that the mechanical buttons I use for my ufc many times give me multiple impulses, they suggested me to put a delay in such a way as to perceive only one impulse. how do i put it in the .lua file? are there any other ways to avoid sending multiple pulses?

I use an arduino mega 2560 board

thank you for your invaluable help


Edited by amido
Link to comment
Share on other sites

13 hours ago, amido said:

hi everyone, I have the problem that the mechanical buttons I use for my ufc many times give me multiple impulses, they suggested me to put a delay in such a way as to perceive only one impulse. how do i put it in the .lua file? are there any other ways to avoid sending multiple pulses?

I use an arduino mega 2560 board

thank you for your invaluable help

 

The multiple impulses are called switch "bounce".
DCS-BIOS should "debounce" the switches in software.
Another option is to connect a small 100nF capacitor across the switch.  I've not needed to do that with ordinary buttons, but it works wonders with rotary encoders.


Edited by No1sonuk
Link to comment
Share on other sites

ok .... sorry but I'm a beginner with electronics, what does "in parallel" mean. 
in the image that I posted where do I insert the capacitor? 
I thank you and I apologize for the questions that may be trivial for you.

Schermata-2020-07-03-alle-16.01.23.png


Edited by amido
Link to comment
Share on other sites

14 hours ago, amido said:

ok .... sorry but I'm a beginner with electronics, what does "in parallel" mean. 
in the image that I posted where do I insert the capacitor? 
I thank you and I apologize for the questions that may be trivial for you.

 

Across the switch. - From the green of each button to the black.
Capacitors are open circuit to DC, but will need to discharge so it very slightly slugs the response to the switch.

If you want a technical explanation of switch bounce, have a look here:
https://www.allaboutcircuits.com/technical-articles/switch-bounce-how-to-deal-with-it/

For DCS-BIOS, implementing software debouncing yourself isn't really an option, so go with the capacitor.

Link to comment
Share on other sites

Not so trivial - we all learn something new from day to day. Here you go:

 

debounce.jpg

You can also put the capacitor below the switch - parallel means it does not interrupt the line to the switch but is connected the same way as the switch.

 

Edit: Here you see Why it is called "parallel" - not my work but a good picture of the principle:

 

switch_tutorial6.png


Edited by crash test pilot
  • Like 2
Link to comment
Share on other sites

in the arduino forum I read that all the boards have already implemented the anti bounce system, you just have to activate it.
I tried inserting the following lines but it gives me error:
void setup ()]
  pinMode (button_pin, IMPUT_PULLUP);
do you think it is possible to activate it in DCS_BIOS?

Link to comment
Share on other sites

7 hours ago, amido said:

in the arduino forum I read that all the boards have already implemented the anti bounce system, you just have to activate it.
I tried inserting the following lines but it gives me error:
void setup ()]
  pinMode (button_pin, IMPUT_PULLUP);
do you think it is possible to activate it in DCS_BIOS?

 

"IMPUT_PULLUP" should be "INPUT_PULLUP"

But that's just the internal pullup resistors and has nothing to do with debouncing.
It's used so that a switch connected to ground can give a 0 when pressed and 5V when released.
I think DCS-BIOS might do something with that anyway, as I've never had to do that.

 

7 hours ago, amido said:

do I connect it like this?

 

 

Pretty much. Yes.

A non-polarised 100nF capacitor with a voltage of at least 6V should be fine.


Edited by No1sonuk
Link to comment
Share on other sites

Hello mates. I want to learn how to use DCS-Bios.I did not knew that you can use a POT to give digital commands.So know i want to replace all my rotary encoders which i used them to my HEUY radios and put potensiometers. The question i have is this. I use Arduino Pro Micro with 9 analog axys.Is there any other board with more axys?
Αποτέλεσμα εικόνας για pro micro

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

4 hours ago, slowmover said:

Hello mates. I want to learn how to use DCS-Bios.I did not knew that you can use a POT to give digital commands.So know i want to replace all my rotary encoders which i used them to my HEUY radios and put potensiometers. The question i have is this. I use Arduino Pro Micro with 9 analog axys.Is there any other board with more axys?

Have a look here:
https://www.sparkfun.com/standard_arduino_comparison_guide

There are a few on there with more analogue inputs.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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