Jump to content

DCS-BIOS Discussion Thread


FSFIan

Recommended Posts

Hello - I finally was able to make the ECM change for the hornet, but it is still not working in game.

 

Before changes to DCS Bios :

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")

 

After Changes:

defineTumb("ECM_MODE_SW", 66, 3001, 248, 0.1, {0.0, 0.4}, nil, false, "Dispenser/EMC Panel", "ECM Mode Switch, XMIT/REC/BIT/STBY/OFF")

 

Ardunio code:

const byte ecmModeSwPins[9] = {27, 29, 31, 33, 35};
DcsBios::SwitchMultiPos ecmModeSw("ECM_MODE_SW", ecmModeSwPins, 9);

 

This was working prior to the implementation of the jammer. Any ideas?

Link to comment
Share on other sites

problem is: its not done with changing the lua. the json file has still the old valves. and in hub the will not rewrite automatic

i cant tell how this will be done in HUB.

the Flightpanel fliles are incompatible to hub. so sadly i dont have an good solution for you


Edited by BlackLibrary
Link to comment
Share on other sites

2 hours ago, BlackLibrary said:

problem is: its not done with changing the lua. the json file has still the old valves. and in hub the will not rewrite automatic

i cant tell how this will be done in HUB.

the Flightpanel fliles are incompatible to hub. so sadly i dont have an good solution for you

 

okay - I think I'll make the shift to your fork. I'm having an issue though with the installation instructions here: https://github.com/DCSFlightpanels/DCSFlightpanels/wiki/Installation

 

It says to "click on assets to expand a list of downloadable files"... where is the assets link? I do not see that anywhere.


**Nevermind - I figured it out, I think***


Edited by Guppy
Link to comment
Share on other sites

yes that needs somne redo in the future.

You need the "Dev" version

 

release Versions are bsed on the stable DCS Versions

for beta on the main side hit the green "Code" button and save it as zip

 

unzip and put the script folder in your Savegames of you DCS Version.

 

but think of the export.lua. not override yours if you use some other things to

Link to comment
Share on other sites

So I am so confused as to what files I need to download.

Here is what I did: I went here: https://github.com/DCSFlightpanels/dcs-bios and clicked the green code button. From there I downloaded it as a .zip.

I linked the doc folder to chrome for the control references.

I added "dofile(lfs.writedir()..[[Scripts\DCS-BIOS\BIOS.lua]])" to my export script. I commented out DCSBIOS Hub's line so that it will not be executed.

 

I went to: H:\DCS BIOS_old fork\DCS-BIOS\Programs and launched the multiple com ports.cmd and got the following error:
'socat\socat' is not recognized as an internal or external command,
operable program or batch file.

 

I have no idea, at this point, how to link my arduino boards on COM3,4,5,6,7,8,9 to get them to work.
 

 

Link to comment
Share on other sites

  • 1 month later...

I need the help of someone who knows how to write code. For my TACAN I'm using mega2560 and TM1637 4digits .

it does not work

 

 

#define DCSBIOS_IRQ_SERIAL
#include "DcsBios.h"
#include <TM1637TinyDisplay.h>
#include <LedControl.h>

//FIRST - 4 DIGIT 7 SEGMENT DISPLAY-  tacan
// Module connection pins (Digital Pins)
#define CLK 2
#define DIO 3
TM1637TinyDisplay display(CLK, DIO); //set up the 4-Digit Display

DcsBios::Switch2Pos tacanTestBtn("TACAN_TEST_BTN", 23);
DcsBios::LED tacanTest(0x10da, 0x0400, 13);
DcsBios::PotentiometerEWMA<5, 128, 5> tacanVol("TACAN_VOL", A0);
const byte tacanModePins[5] = {4, 5, 6, 7, 8};
DcsBios::SwitchMultiPos tacanMode("TACAN_MODE", tacanModePins, 5);
DcsBios::Switch2Pos tacanXy("TACAN_XY", 22);
DcsBios::RotaryEncoder tacan10("TACAN_10", "DEC", "INC", 9, 10);
DcsBios::RotaryEncoder tacan1("TACAN_1", "DEC", "INC", 11, 12);


void setup() {
display.setBrightness(7);
DcsBios::setup();
}
void onTacan10Change(unsigned int newValue) {
display.showNumberDec(newValue);    
}
DcsBios::IntegerBuffer tacan10Buffer(0x1158, 0x0f00, 12, onTacan10Change);


void onTacan1Change(unsigned int newValue) {
display.showNumberDec(newValue);   
}
DcsBios::IntegerBuffer tacan1Buffer(0x1158, 0xf000, 9, onTacan1Change);


void onTacanChannelChange (char * newValue){ 
display.showNumberDec(newValue);

}
DcsBios :: StringBuffer <4> tacanChannelBuffer (0x1162, onTacanChannelChange);


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

}

 

Link to comment
Share on other sites

  • 2 months later...

I am having an issue getting the EMERG/PARK Brake Handle to work with two switches running through DCS BIOS. This is how I currently have it setup, but I can't get it to move from PARK back to EMERG after it is there.  This is what I am using:

 

const byte emergencyParkingBrakeRotatePins[3] = {51, 53};
DcsBios::SwitchMultiPos emergencyParkingBrakeRotate("EMERGENCY_PARKING_BRAKE_ROTATE", emergencyParkingBrakeRotatePins, 3);
DcsBios::Switch2Pos emergencyParkingBrakePull("EMERGENCY_PARKING_BRAKE_PULL", 52);

 

I get the same response if I just use the two position switch option. It will move up and down and it will rotate from EMERG to PARK until I get it pulled and set to PARK than it won't move at all. I am finding this strange.

 

Thanks,

Wayne

Wayne Wilson

AKA: hrnet940

Alienware Aurora R3, i7 3820 3.5GHz(4.2GHz setting) processor, EVGA Nvidia RTX 2070 8GB Graphics, 16GB Ram, 1TB SSD.

Link to comment
Share on other sites

What are other people doing that have full cockpit mock ups with the Brakes handle in the F/A-18C Hornet cockpit?  Someone over on Github just told me that this is an issue with no fix and probably won't have one anytime soon.  I have the same switch setup for my Wing Fold handle and it works every single time.  Any help will be very greatly appreciated.  I DON'T want to use my mouse or keyboard during any aspect of my F/A-18C Hornet flight.

 

Thanks,

Wayne


Edited by hrnet940
Forgot the last two lines

Wayne Wilson

AKA: hrnet940

Alienware Aurora R3, i7 3820 3.5GHz(4.2GHz setting) processor, EVGA Nvidia RTX 2070 8GB Graphics, 16GB Ram, 1TB SSD.

Link to comment
Share on other sites

Hello,

 

I don't find it on google and here.

Is there any way to change the intensity (power) of the led pluged in PWM pin?

With a ingame potentiometer or directly in arduino (like a %)

 

My leds are too shiny....

 

Thanks a lot!

 

[Edit] Found!

 

Ex for the JF-17's Landing Gear Transition Light (red):

 

void onlgLTransChange(unsigned int newValue) {
    if (newValue == 1)
    {analogWrite(10, 1);}
    else {analogWrite(10, 0);}
}
DcsBios::IntegerBuffer lgLDChBuffer(0x4858, 0x0040, 6, onlgLTransChange);

 

{analogWrite(10, 1);}

1 = 0 to 255 (0 =off)

10 = pin number


Edited by Roger01
Link to comment
Share on other sites

Better version, Light intensity change with the ingame light intensity potentiometer.

 

Exemple for JF-17 :

 

/* use '#define DCSBIOS_DEFAULT_SERIAL' instead if your Arduino board
 *  does not feature an ATMega328 or ATMega2650 controller.
 *  
 */
#define DCSBIOS_IRQ_SERIAL
#include "DcsBios.h"
int LightKnobValue;
int LTR;

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


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


void onlgLTransChange(unsigned int newValue) 
      {
    LTR = newValue;
    if (newValue == 1)
        {
        analogWrite(10, LightKnobValue);
        }
    else 
        {
        analogWrite(10, 0);}
        }
DcsBios::IntegerBuffer lgLDChBuffer(0x4858, 0x0040, 6, onlgLTransChange);

void onGearIndLightKnobChange(unsigned int newValue) 
      {
      LightKnobValue = newValue/256;
      if (LTR == 1)
        {
        analogWrite(10, LightKnobValue);
        }
      else 
        {
       analogWrite(10, 0);
        }
      }
DcsBios::IntegerBuffer gearIndLightKnobBuffer(0x4802, 0xffff, 0, onGearIndLightKnobChange);

Edited by Roger01
Link to comment
Share on other sites

Do you have resistors installed on your LED's?  If so, bump up the value to reduce the intensity and brightness of the LED's.

 

Wayne

Wayne Wilson

AKA: hrnet940

Alienware Aurora R3, i7 3820 3.5GHz(4.2GHz setting) processor, EVGA Nvidia RTX 2070 8GB Graphics, 16GB Ram, 1TB SSD.

Link to comment
Share on other sites

On 5/26/2021 at 8:26 PM, hrnet940 said:

What are other people doing that have full cockpit mock ups with the Brakes handle in the F/A-18C Hornet cockpit?  Someone over on Github just told me that this is an issue with no fix and probably won't have one anytime soon.  I have the same switch setup for my Wing Fold handle and it works every single time.  Any help will be very greatly appreciated.  I DON'T want to use my mouse or keyboard during any aspect of my F/A-18C Hornet flight.

 

Thanks,

Wayne

 

Hello Wayne,
I have exactly the same behavior. Park Break does not work. Wing Fold works fine. Unfortunately I have not found a solution. 

Link to comment
Share on other sites

in our flightpanel fork there is an fix. 

HUB is atm not updateable since i dont have the rights for it. For other planes i have them.

Someone have managed to use the flightpanel lua in HUB. (they are not compatible).

Link to comment
Share on other sites

@Roger01: It's the PWM functionality of an Arduino. Use values between 0 and 255 to control a LED brightness. 

But it's only working on PWM pins.

 

Regards, Vinc

 


Edited by Vinc_Vega

Regards, Vinc

real life: Royal Bavarian Airforce

online: VJS-GermanKnights.de

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

  • 3 weeks later...
On 5/31/2021 at 8:36 PM, Vinc_Vega said:

@Roger01: It's the PWM functionality of an Arduino. Use values between 0 and 255 to control a LED brightness. 

But it's only working on PWM pins.

 

Regards, Vinc

 

 


Thanks!

 

And an other question :

 

Is it possible to do that on a TFT/LCD (other?) screen plugged in an arduino with DCS bios? 

 

unknown.png

 

And the best way to have this thing, with the less arduino :

 

unknown.png

 

If I buy 4x 8 digits screen, I can't plug all 4 on the same arduino?

 

Thanks a lot!

 

[Edit] My first finished project :

 

unknown.png?width=354&height=524

 


Edited by Roger01
Link to comment
Share on other sites

First picture: no chance with LCDs and arduino, but maybe by exporting a screen overlayed by Helios or using a LED matrix (like the Caution panel in the A-10C).

 

Second picture: maybe by using a small LCD or OLED and arduino.

 

Third picture: 👍


Edited by Vinc_Vega

Regards, Vinc

real life: Royal Bavarian Airforce

online: VJS-GermanKnights.de

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

Thanks!

 

a LED matrix seems to be the best way. I do that after the UFCP.

For the UFCP, a Small LCD can work with an arduino? I have small lcd for Raspberry. I must check that.

 

Thanks again!


Edited by Roger01
Link to comment
Share on other sites

Nice! But please open a new toppic if  you have more specific questions. Next would be to find the right font style and size to fit your needs 

 

Regards, Vinc

Regards, Vinc

real life: Royal Bavarian Airforce

online: VJS-GermanKnights.de

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

  • 3 weeks later...

DCS-BIOS will not work with the new update to DCS 2.7 ???
I updated today to DCS 2.7. Now all Arduino's are unable to do anything 😞 The special edits in the default.lua to simulate 3-way switches are no more working. I very disappointed.

Think we need an update for DCS-BIOS too...

Link to comment
Share on other sites

  • Recently Browsing   0 members

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