Jump to content

DCS-BIOS Discussion Thread


FSFIan

Recommended Posts

Holycat(IIAF) have you tried the example Ian did on Youtube?

 

He did several other turtorials but I guess this may be the one suited for your request. Be advised though that the example is from an earlier version of DCS-BIOS so the initial sketch looks a little different.

 

Cheers

Hans

Link to comment
Share on other sites

[FSF]Ian and all, I am relatively new to DCS and over the last year I have been learning the A-10C as time permits. First time poster. I recently decided to get into DCS-Bios in hopes of putting together a pit of my own. I have been through much of this thread, your User Guide and put together the Master Caution circuit using the Uno board. After several attempts, I have been unable to make it work. I find the IDE software and your instructions to be straightforward, but....

 

The LED caution light will not light up (confident I have the polarity correct) and I only see logging in the cmd window when I press the reset button. I get UFC_MASTER_CAUTION1 when I press it and UFC_MASTER_CAUTION0 when I let off. I get no interaction in DCS.

 

In preparing the sketch, I find some deviations between the example in the User Guide and the IRQSerial template provided in the library. The line "#include <servo.h> is omitted from the template and the control reference code for LED masterCaution has different numbers (**,**). I assume this is just a matter of an updated library.

 

I admire the work you and others are doing with this and look forward to making it all come together. I know it has to be something simple, but just don't see it yet. Any help from you or others to put me on track is greatly appreciated!

Link to comment
Share on other sites

@Chapman: please open a separate thread for further troubleshooting (this thread has gotten confusing in the past when several conversations were going on at once). Try the interactive control reference (see youtube video) and if that works, try using TCP instead of UDP (edit connect-serial-port.cmd and use "set PROTOCOL=TCP").

Link to comment
Share on other sites

Hey, I'm giving this a try as my BetaInnovations products no longer have software support.

 

I couldn't find a callback for the eject handle in the A10C, does it not exist? How would I implement a physical eject handle with dcs-bios? Thanks

 

*edit* for clarity, I have the hardware built to trip a microswitch when yanked, I'm just chasing the appropriate arduino code. Thanks

DCS Wishlist: | Navy F-14 | Navy F/A-18 | AH-6 | Navy A-6 | Official Navy A-4 | Carrier Ops | Dynamic Campaign | Marine AH-1 |

 

Streaming DCS sometimes:

Link to comment
Share on other sites

I suspected as much, thanks. So given your arduino experience is way more advanced than mine, how would you do it? All I can think of is a) sending a keystroke from the arduino (rather than Lua callback) or b) somehow configuring the duino as a HID?

DCS Wishlist: | Navy F-14 | Navy F/A-18 | AH-6 | Navy A-6 | Official Navy A-4 | Carrier Ops | Dynamic Campaign | Marine AH-1 |

 

Streaming DCS sometimes:

Link to comment
Share on other sites

OK so my Pro Micro arrived and I've designed this for my eject handle. Seems to work OK on my dev box but we'll see once it's hooked up to DCS. Thanks again for the guidance [FSF]Ian

 

// Eject switch for DCS World
// Requires ATmega32U4 based Arduino (Pro Micro, Leonardo etc)
// Connect eject switch from D2 to 5V
// Connect 10k resistor from D2 to GND
// Connect USB to sim host PC

const char ctrlKey = KEY_LEFT_CTRL; // Windows/Linux
// const char ctrlKey = KEY_LEFT_GUI; // MacOS
const char ejectKey = 'e';
const int buttonPin = 2;
bool debounce = false;
int buttonState = 0;

void setup() {
 Keyboard.begin();
 pinMode(buttonPin, INPUT);
}

void loop() {
 // has eject been pressed?
 buttonState = digitalRead(buttonPin);
 if (buttonState == HIGH) {
   if (!debounce) {
     debounce = true;
     eject();
   }
 } else {
   debounce = false;
 }
}

void eject() {
 // give it 5 presses in case of something lost in the ether
 for (int i = 0; i < 5; i++) {
   Keyboard.press(ctrlKey);
   delay(50);
   Keyboard.write(ejectKey);
   delay(50);
   Keyboard.release(ctrlKey);
   delay(100);
 }
}

 

TxCY5fk.png

DCS Wishlist: | Navy F-14 | Navy F/A-18 | AH-6 | Navy A-6 | Official Navy A-4 | Carrier Ops | Dynamic Campaign | Marine AH-1 |

 

Streaming DCS sometimes:

Link to comment
Share on other sites

Hello , can i use Arduino pro micro + KEY MATRIX + DCS Bios ?

 

Yes and no.

 

No, there is no support for a key matrix in the DCS-BIOS Arduino Library. That means you can't expect to copy and paste a code snippet and have things work out of the box.

 

Yes, you can use DCS-BIOS with anything you can connect to an Arduino board, if you know or are willing to learn C++.

 

For example, to push down the master caution reset button in the A-10C, you can use the following code in your Arduino sketch:

sendDcsBiosMessage("UFC_MASTER_CAUTION 1\n");

And to release it again:

sendDcsBiosMessage("UFC_MASTER_CAUTION 0\n");

 

For more information, consult the "import protocol" section of the Developer Guide and the "input interfaces" section of the user guide. You can also read through the source code of the DCS-BIOS Arduino Library, for example Switches.h. (Those classes use a different function, tryToSendDcsBiosMessage, that won't block if it cannot send the message right away; if it returns false, it means the message has not actually been sent.)

 

 

@Everyone: please excuse the long response times. I am dealing with a tinnitus right now that is preventing me from getting a good night's sleep on a regular basis.

Link to comment
Share on other sites

what is this mean?

 

0 [main] socat 8120 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer. Please report this problem to

 

and my switch did not work in the game ...

 

Using Arduino NanoV3 and simple sketch with APU on electric panel .

 

This warning is normal on Windows 10 and does not affect the correct operation of DCS-BIOS. Your issue must be somewhere else.

 

Please create a new thread (this one is not meant for support requests) and include your Arduino sketch and a detailed description of what you tried, what behavior you expected, and what happened instead.

Link to comment
Share on other sites

  • 1 month later...

Hi friends! Recently was involved in the case, originally brought the desired result that inspired further work, but of course there are questions... 1. If the issue is resolved with the lamps retracted position on the MiG-21? Can't solve this problem, is there a solution? 2.I want to make a universal signal Board under all types of flyable craft in DCS particularly interested in su-25,27 and MiG-29, can at the moment to implement it?

Link to comment
Share on other sites

Hi guys!

 

DCS Bios is very perfect for me, but is there a command line for the Master Caution? (not the led!)

 

Cause this :

 

void onMasterCautionChange(unsigned int newValue) {

/* your code here */

}

DcsBios::IntegerBuffer masterCautionBuffer(0x1012, 0x0800, 11, onMasterCautionChange);

 

It's work only if the LED (ingame) is ON, so the code inside "twinkle" like this :

 

 

I want a code who works all the time then the Master Caution (the fonction, not the led) is ON.

 

Any idea? Thanks a lot!

 

Ps: I'm noob with C and programmation.

Link to comment
Share on other sites

Thanks for reply.

 

The

 

DcsBios::Switch2Pos ufcMasterCaution("UFC_MASTER_CAUTION", PIN);

 

Is only when I push the Master Caution reset button, no?

 

I have trying with this code and It work (LCD 7 segment) only if I push the reset button.

Link to comment
Share on other sites

DcsBios::Switch2Pos ufcMasterCaution("UFC_MASTER_CAUTION", PIN);

 

Should be for when you press the master caution to reset alarms. I am now not sure what you are trying to accomplish?

Do you want to have your 7-segment showing Master Caution all the time and only flash when when alarm occurs?

 

Cheers

Hans

Link to comment
Share on other sites

Hi friends! Recently was involved in the case, originally brought the desired result that inspired further work, but of course there are questions... 1. If the issue is resolved with the lamps retracted position on the MiG-21? Can't solve this problem, is there a solution? 2.I want to make a universal signal Board under all types of flyable craft in DCS particularly interested in su-25,27 and MiG-29, can at the moment to implement it?

 

I have a fix for the inverted landing gear lights, somewhere. It was originally made by the Ikarus people for their application, but if I recall it correct I managed to get it into DCS-Bios as well. Need to go through some old posts...

 

Found the thread, not the solution: https://forums.eagle.ru/showthread.php?t=159671

There is a script that needs to be updated with some code to invert the inverted signals. Since the Viggen module was released I haven't been playing the MIG-21 and the panels with indicators has been disconnected as well.

I do have the code somewhere and I can dig for it if you need it.


Edited by BravoYankee4
Added comment
Link to comment
Share on other sites

I have a fix for the inverted landing gear lights, somewhere. It was originally made by the Ikarus people for their application, but if I recall it correct I managed to get it into DCS-Bios as well. Need to go through some old posts...

 

Found the thread, not the solution: https://forums.eagle.ru/showthread.php?t=159671

There is a script that needs to be updated with some code to invert the inverted signals. Since the Viggen module was released I haven't been playing the MIG-21 and the panels with indicators has been disconnected as well.

I do have the code somewhere and I can dig for it if you need it.

 

would be very grateful if you can help with this matter. Already a lot of branches on the forum reviewed, but the solution to the problem never found.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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