Jump to content

DCS-BIOS F/A-18C library. Get it here!


Recommended Posts

The Anti Ice Pitot switch also has this same issue, treated as a toggle.

 

I just tested with a physical switch and it works fine.

Intel i7 13700K @ 5.3 GHz / ASUS TUF Gaming Z490-Plus / 64 Gb G.Skill DDR4-3600 / RTX 4090 / 2TB Kingston KC3000 NVME / Win 10 x64 Pro / Pimax Crystal / WINWING F/A-18 HOTAS

A-10C, AJS-37, AV-8B, F-4E, F-5E, F-14, F-15E, F-16, F/A-18C, F-86F, FC3, Christen Eagle 2, FW190D-9, Mosquito, P-47D, P-51D, Spitfire, AH-64D, KA-50, UH-1H

Combined Arms, WWII Asset Pack, China Assets Pack, Super Carrier, Falklands Assets

Nevada, Normandy, Persian Gulf, The Channel, Syria, Mariana Islands, South Atlantic, Sinai

Link to comment
Share on other sites

  • Replies 173
  • Created
  • Last Reply

Top Posters In This Topic

v1.0 uploaded on initial post to correct behaviour of the FUEL DUMP switch.

 

The way the switch is working internally is still flawed, but have coded around it :)

Intel i7 13700K @ 5.3 GHz / ASUS TUF Gaming Z490-Plus / 64 Gb G.Skill DDR4-3600 / RTX 4090 / 2TB Kingston KC3000 NVME / Win 10 x64 Pro / Pimax Crystal / WINWING F/A-18 HOTAS

A-10C, AJS-37, AV-8B, F-4E, F-5E, F-14, F-15E, F-16, F/A-18C, F-86F, FC3, Christen Eagle 2, FW190D-9, Mosquito, P-47D, P-51D, Spitfire, AH-64D, KA-50, UH-1H

Combined Arms, WWII Asset Pack, China Assets Pack, Super Carrier, Falklands Assets

Nevada, Normandy, Persian Gulf, The Channel, Syria, Mariana Islands, South Atlantic, Sinai

Link to comment
Share on other sites

It turns out I was using someone else's library, after installing yours it does work correctly. Thanks Andrew. :)

 

Someone else has an F18 library? Or has someone taken mine and modified it?

Intel i7 13700K @ 5.3 GHz / ASUS TUF Gaming Z490-Plus / 64 Gb G.Skill DDR4-3600 / RTX 4090 / 2TB Kingston KC3000 NVME / Win 10 x64 Pro / Pimax Crystal / WINWING F/A-18 HOTAS

A-10C, AJS-37, AV-8B, F-4E, F-5E, F-14, F-15E, F-16, F/A-18C, F-86F, FC3, Christen Eagle 2, FW190D-9, Mosquito, P-47D, P-51D, Spitfire, AH-64D, KA-50, UH-1H

Combined Arms, WWII Asset Pack, China Assets Pack, Super Carrier, Falklands Assets

Nevada, Normandy, Persian Gulf, The Channel, Syria, Mariana Islands, South Atlantic, Sinai

Link to comment
Share on other sites

Hi Andrew

 

Funny question. The ALR-67 RWR Buttons, are Switch2Pos and seem to be latching.

I figure it is probably a DCS thing, but would it be possible to get DCS-BIOS to treat these as momentary push buttons.

 

The reason I ask, your library inspired me to build a desktop UFC, got it all printed out, found the perfect buttons, setup the code and for the life of me could not figure out why when I used them the RWR would come to life and then die again. Then I figured if I held the button it would stay on, so am assuming they are latching buttons.

 

I really should have tested all the functions before putting the UFC together, and now I am being lazy and hoping DCS-BIOS has some functionality I could use to solve this. The other issue here in this country is actually getting the electronics to use. You have no idea how I am battling to get a encoder with a push button. Anyway I digress.

 

Thanks,

 

Ross

Link to comment
Share on other sites

Funny question. The ALR-67 RWR Buttons, are Switch2Pos and seem to be latching.

I figure it is probably a DCS thing, but would it be possible to get DCS-BIOS to treat these as momentary push buttons.

s

 

Yes it is possible, although the pushbuttons are actually supposed to latch.

 

Set your control reference to advanced mode and use the ActionButton code instead of the default Switch2Pos and things should work the way you want:

 

DcsBios::ActionButton rwrPowerBtnToggle("RWR_POWER_BTN", "TOGGLE", PIN);

 

instead of

 

DcsBios::Switch2Pos rwrPowerBtn("RWR_POWER_BTN", PIN);

Intel i7 13700K @ 5.3 GHz / ASUS TUF Gaming Z490-Plus / 64 Gb G.Skill DDR4-3600 / RTX 4090 / 2TB Kingston KC3000 NVME / Win 10 x64 Pro / Pimax Crystal / WINWING F/A-18 HOTAS

A-10C, AJS-37, AV-8B, F-4E, F-5E, F-14, F-15E, F-16, F/A-18C, F-86F, FC3, Christen Eagle 2, FW190D-9, Mosquito, P-47D, P-51D, Spitfire, AH-64D, KA-50, UH-1H

Combined Arms, WWII Asset Pack, China Assets Pack, Super Carrier, Falklands Assets

Nevada, Normandy, Persian Gulf, The Channel, Syria, Mariana Islands, South Atlantic, Sinai

Link to comment
Share on other sites

Yes it is possible, although the pushbuttons are actually supposed to latch.

 

I was thinking that but then don't know enough about the inner workings of DCS and DCS-BIOS. It does seem strange they work differently to other buttons. If I assign them to my generic joystick controller it is a simple momentary push button.

 

 

Set your control reference to advanced mode and use the ActionButton code instead of the default Switch2Pos and things should work the way you want:

 

DcsBios::ActionButton rwrPowerBtnToggle("RWR_POWER_BTN", "TOGGLE", PIN);

 

instead of

 

DcsBios::Switch2Pos rwrPowerBtn("RWR_POWER_BTN", PIN);

 

Thanks so much for this bud. Can't wait to get home now and try this.

 

TA

Link to comment
Share on other sites

Thanks so much for this bud. Can't wait to get home now and try this.

 

I didn't want to give bad advice so tested it myself.

The power pushbutton works perfect with a momentary pushbutton if you use the code I gave above.

 

The other 4 pushbuttons on the panel are momentary action so using the standard switch2pos code works fine (tested that as well).

Intel i7 13700K @ 5.3 GHz / ASUS TUF Gaming Z490-Plus / 64 Gb G.Skill DDR4-3600 / RTX 4090 / 2TB Kingston KC3000 NVME / Win 10 x64 Pro / Pimax Crystal / WINWING F/A-18 HOTAS

A-10C, AJS-37, AV-8B, F-4E, F-5E, F-14, F-15E, F-16, F/A-18C, F-86F, FC3, Christen Eagle 2, FW190D-9, Mosquito, P-47D, P-51D, Spitfire, AH-64D, KA-50, UH-1H

Combined Arms, WWII Asset Pack, China Assets Pack, Super Carrier, Falklands Assets

Nevada, Normandy, Persian Gulf, The Channel, Syria, Mariana Islands, South Atlantic, Sinai

Link to comment
Share on other sites

I didn't want to give bad advice so tested it myself.

The power pushbutton works perfect with a momentary pushbutton if you use the code I gave above.

 

The other 4 pushbuttons on the panel are momentary action so using the standard switch2pos code works fine (tested that as well).

 

Just got home and also did a quick test and it is working perfectly.

 

Thanks a mill Andrew.

Link to comment
Share on other sites

Hi Andrew, I'm wondering if you can help me with the radar emergency pull switch? Mapping a pin to position 4 works but I have to in-sim pull the rotary switch first. Is there a DCS-BIOS message I can send that raises the switch?

 

Control SNSR Panel: RADAR Switch (MW to pull), OFF/STBY/OPR/EMERG(PULL)

 

Much appreciated.

 

cheers

 

John

Link to comment
Share on other sites

  • 2 weeks later...

Can one of you guru's help me out with the UFC display output?

 

All of the option display work great across multiple 1602LCD's with an I2C backpack

 

but the "UFC Scratch pad" I'm at a loss. It will register and show on the LCD as I make a change, but It will not show something constant. For example if I rotate the comm knob it doesn't show the freq, but if I punch it in it shows, then goes blank.

 

Any ideas?

 

define DCSBIOS_IRQ_SERIAL
#include <DcsBios.h>
#include <Wire.h> 
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd1(0x3E,16,2);
LiquidCrystal_I2C lcd2(0x3F,16,2);
LiquidCrystal_I2C lcd3(0x3D,16,2);
LiquidCrystal_I2C lcd4(0x3B,16,2);

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

//WE define our LCD 16 columns and 2 rows
lcd1.init();
lcd1.init();
lcd1.backlight();

//lcd.backlight(); Power off the back light
lcd2.init();
lcd2.init();
lcd2.backlight();

lcd3.init();
lcd3.init();
lcd3.backlight();

lcd4.init();
lcd4.init();
lcd4.backlight();

}

void loop(){ 
DcsBios::loop();
}
void onUfcOptionDisplay1Change(char* newValue) {
   lcd1.clear();
   lcd1.setCursor (0,0);
   lcd1.print(newValue);
}
DcsBios::StringBuffer<4> ufcOptionDisplay1Buffer(0x542a, onUfcOptionDisplay1Change);

void onUfcOptionDisplay2Change(char* newValue) {
   lcd1.setCursor (0,1);
   lcd1.print(newValue);
}
DcsBios::StringBuffer<4> ufcOptionDisplay2Buffer(0x542e, onUfcOptionDisplay2Change);

void onUfcOptionDisplay3Change(char* newValue) {
   lcd2.clear();
   lcd2.setCursor (0,0);
   lcd2.print(newValue);
}
DcsBios::StringBuffer<4> ufcOptionDisplay3Buffer(0x5432, onUfcOptionDisplay3Change);

void onUfcOptionDisplay4Change(char* newValue) {
   lcd2.setCursor (0,1);
   lcd2.print(newValue);
}
DcsBios::StringBuffer<4> ufcOptionDisplay4Buffer(0x5436, onUfcOptionDisplay4Change);

void onUfcOptionDisplay5Change(char* newValue) {
   lcd3.clear();
   lcd3.setCursor (0,0);
   lcd3.print(newValue);
}
DcsBios::StringBuffer<4> ufcOptionDisplay5Buffer(0x543a, onUfcOptionDisplay5Change);

void onUfcScratchpadString1DisplayChange(char* newValue) {
   lcd4.clear();
   lcd4.setCursor (0,0);
   lcd4.print(newValue);
}

DcsBios::StringBuffer<2> ufcScratchpadString1DisplayBuffer(0x5446, onUfcScratchpadString1DisplayChange);

void onUfcScratchpadString2DisplayChange(char* newValue) {
   lcd4.clear();
   lcd4.setCursor (3,0);
   lcd4.print(newValue);
}

DcsBios::StringBuffer<2> ufcScratchpadString2DisplayBuffer(0x5448, onUfcScratchpadString2DisplayChange);

void onUfcScratchpadNumberDisplayChange(char* newValue) {
   lcd4.clear();
   lcd4.setCursor (5,0);
   lcd4.print(newValue);
}
DcsBios::StringBuffer<8> ufcScratchpadNumberDisplayBuffer(0x543e, onUfcScratchpadNumberDisplayChange);

Link to comment
Share on other sites

C

but the "UFC Scratch pad" I'm at a loss. It will register and show on the LCD as I make a change, but It will not show something constant. For example if I rotate the comm knob it doesn't show the freq, but if I punch it in it shows, then goes blank.

 

I haven't got my UFC displays up and running yet so I can't test this directly. One thing I'd suggest is to run dcbios in live mode and see if the UFC Scratchpad output is actually being set correctly in the conditions where you are not seeing it on your display.

 

At least that will narrow it down to either being a dcsbios problem or a problem with your code and/or display.

Intel i7 13700K @ 5.3 GHz / ASUS TUF Gaming Z490-Plus / 64 Gb G.Skill DDR4-3600 / RTX 4090 / 2TB Kingston KC3000 NVME / Win 10 x64 Pro / Pimax Crystal / WINWING F/A-18 HOTAS

A-10C, AJS-37, AV-8B, F-4E, F-5E, F-14, F-15E, F-16, F/A-18C, F-86F, FC3, Christen Eagle 2, FW190D-9, Mosquito, P-47D, P-51D, Spitfire, AH-64D, KA-50, UH-1H

Combined Arms, WWII Asset Pack, China Assets Pack, Super Carrier, Falklands Assets

Nevada, Normandy, Persian Gulf, The Channel, Syria, Mariana Islands, South Atlantic, Sinai

Link to comment
Share on other sites

Thanks for all the work you put into this!

 

You are welcome, the more people that use it the happier I am :)

 

And By the way, did you ever get your problems with the AV-8B lua fixed?

 

Nope, the module just doesn't expose the inputs/outputs in the same way as every other module.

Intel i7 13700K @ 5.3 GHz / ASUS TUF Gaming Z490-Plus / 64 Gb G.Skill DDR4-3600 / RTX 4090 / 2TB Kingston KC3000 NVME / Win 10 x64 Pro / Pimax Crystal / WINWING F/A-18 HOTAS

A-10C, AJS-37, AV-8B, F-4E, F-5E, F-14, F-15E, F-16, F/A-18C, F-86F, FC3, Christen Eagle 2, FW190D-9, Mosquito, P-47D, P-51D, Spitfire, AH-64D, KA-50, UH-1H

Combined Arms, WWII Asset Pack, China Assets Pack, Super Carrier, Falklands Assets

Nevada, Normandy, Persian Gulf, The Channel, Syria, Mariana Islands, South Atlantic, Sinai

Link to comment
Share on other sites

I have a problem with the "DUMP FUEL" lever switch. When the aircraft is on the ground, the switch works correctly, the "ON" position gives the "ON" position in the cockpit, the "OFF" position gives the "OFF" position in the cockpit. When the plane flies in the air, the switch reacts only in one position "ON", the position "OFF" does not work. After landing, the situation returns to normal.

 

 

PS.

I read the posts and see that it's not just me who has this problem. So this is some error in DCS Bios and not in my panels?


Edited by padonis
Link to comment
Share on other sites

Hi Padonis, Andrew has fixed this in his latest version, well at least it's fixed for me. Have you updated your library?

 

I have a problem with the "DUMP FUEL" lever switch. When the aircraft is on the ground, the switch works correctly, the "ON" position gives the "ON" position in the cockpit, the "OFF" position gives the "OFF" position in the cockpit. When the plane flies in the air, the switch reacts only in one position "ON", the position "OFF" does not work. After landing, the situation returns to normal.

 

 

PS.

I read the posts and see that it's not just me who has this problem. So this is some error in DCS Bios and not in my panels?

Link to comment
Share on other sites

I have not updated yet, I will check it today. And which is the last version? Has many things changed in it? Recently, when I was updating, I had to make many corrections in Arduino files :).

Is this update already included in these libraries? https://github.com/DCSFlightpanels/dcs-bios/releases

 

Thank you very much.

 

https://forums.eagle.ru/showpost.php?p=3793799&postcount=72


Edited by padonis
Link to comment
Share on other sites

Is it possible to add inputs for things that are not necessarily cockpit controls? Things like NVG gain up and down, or simulator commands like opening the comms menu? I'd like to use some of the non functional switches for stuff like that.

Link to comment
Share on other sites

I have not updated yet, I will check it today. And which is the last version? Has many things changed in it? Recently, when I was updating, I had to make many corrections in Arduino files :).

Is this update already included in these libraries? https://github.com/DCSFlightpanels/dcs-bios/releases

 

Thank you very much.

 

https://forums.eagle.ru/showpost.php?p=3793799&postcount=72

 

No idea, that's someone taking my code and rehosting it.

 

Only guarantee is to get the latest version from the first post in this thread.

Intel i7 13700K @ 5.3 GHz / ASUS TUF Gaming Z490-Plus / 64 Gb G.Skill DDR4-3600 / RTX 4090 / 2TB Kingston KC3000 NVME / Win 10 x64 Pro / Pimax Crystal / WINWING F/A-18 HOTAS

A-10C, AJS-37, AV-8B, F-4E, F-5E, F-14, F-15E, F-16, F/A-18C, F-86F, FC3, Christen Eagle 2, FW190D-9, Mosquito, P-47D, P-51D, Spitfire, AH-64D, KA-50, UH-1H

Combined Arms, WWII Asset Pack, China Assets Pack, Super Carrier, Falklands Assets

Nevada, Normandy, Persian Gulf, The Channel, Syria, Mariana Islands, South Atlantic, Sinai

Link to comment
Share on other sites

Is it possible to add inputs for things that are not necessarily cockpit controls? Things like NVG gain up and down, or simulator commands like opening the comms menu? I'd like to use some of the non functional switches for stuff like that.

 

That is probably more of a general dcsbios question than specific to the F18 module.

Intel i7 13700K @ 5.3 GHz / ASUS TUF Gaming Z490-Plus / 64 Gb G.Skill DDR4-3600 / RTX 4090 / 2TB Kingston KC3000 NVME / Win 10 x64 Pro / Pimax Crystal / WINWING F/A-18 HOTAS

A-10C, AJS-37, AV-8B, F-4E, F-5E, F-14, F-15E, F-16, F/A-18C, F-86F, FC3, Christen Eagle 2, FW190D-9, Mosquito, P-47D, P-51D, Spitfire, AH-64D, KA-50, UH-1H

Combined Arms, WWII Asset Pack, China Assets Pack, Super Carrier, Falklands Assets

Nevada, Normandy, Persian Gulf, The Channel, Syria, Mariana Islands, South Atlantic, Sinai

Link to comment
Share on other sites

Thank you, gentlemen.

 

I have one more question. How to deal with the rotary switch "RADAR switch (MW to pull), OFF / STBY / OPR / EMERG (PULL)" on the panel "Sensor Panel"? I mean the position "PULL EMERG" (MW to pull).

You can not pull the knob.

 

 

attachment.php?attachmentid=204220&d=1549818475


Edited by padonis
Link to comment
Share on other sites

I have one more question. How to deal with the rotary switch "RADAR switch (MW to pull), OFF / STBY / OPR / EMERG (PULL)" on the panel "Sensor Panel"? I mean the position "PULL EMERG" (MW to pull).

You can not pull the knob.

 

You need to either find a rotary that has a pull function or work something out to approximate the functionality.

 

Looking at this though I see that I have missed the functionality in dcsbios to capture the pull motion, I will look at adding this shortly.

Intel i7 13700K @ 5.3 GHz / ASUS TUF Gaming Z490-Plus / 64 Gb G.Skill DDR4-3600 / RTX 4090 / 2TB Kingston KC3000 NVME / Win 10 x64 Pro / Pimax Crystal / WINWING F/A-18 HOTAS

A-10C, AJS-37, AV-8B, F-4E, F-5E, F-14, F-15E, F-16, F/A-18C, F-86F, FC3, Christen Eagle 2, FW190D-9, Mosquito, P-47D, P-51D, Spitfire, AH-64D, KA-50, UH-1H

Combined Arms, WWII Asset Pack, China Assets Pack, Super Carrier, Falklands Assets

Nevada, Normandy, Persian Gulf, The Channel, Syria, Mariana Islands, South Atlantic, Sinai

Link to comment
Share on other sites

  • Recently Browsing   0 members

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