Jump to content

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


Recommended Posts

OK I have found the problem ... I included an old copy of the hornet library json files. These are regenerated every time you start a flight in a hornet. So go and have a quick fly and if you have dcs-bios set up correctly it will regenerate the documentation.

 

Correct page should look like this:

hornet.thumb.png.bebf87f00010e84aeb721f38fab56342.png

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

OK thanks.

I understand that after copying the files into the appropriate folders, I have to start the mission with F-18 first. And then check the links in Goole's browser to copy them to Arduino?

Otherwise, I will see bad links. As it was with me?

Link to comment
Share on other sites

  • 3 weeks later...

I can't get

 

DcsBios::ActionButton ufc0Toggle("UFC_0", "TOGGLE", PIN);

 

to work I do get the lights on Arduino I get the spew of the codes in the connect-serial-port.cmd

 

I could only get UFC button to work as switch2way. Any ideas?

Link to comment
Share on other sites

I could only get UFC button to work as switch2way. Any ideas?

 

Just tested with a physical pushbutton and it works perfect for me.

Stupid question but do you have one side of the pusbutton connect to the I/O pin and the other connected to GND?

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

Just tested with a physical pushbutton and it works perfect for me.

Stupid question but do you have one side of the pusbutton connect to the I/O pin and the other connected to GND?

 

Yeah it was I'm going to get a new uno if it doesn't work again leonardo hid for UFC. Thanks!

Link to comment
Share on other sites

  • 3 weeks later...

Just wondering what you guys are using as lcd for the UFC in the Hornet.

I think i will use some 128*32 oled i2c displays, just a bummer that i need 3 arduino to let them run simultanous.

Is the Hornet DCS Bios now official or is it still a "workaround" ?

 

Cheers Evilfisher

Link to comment
Share on other sites

Is the Hornet DCS Bios now official or is it still a "workaround" ?

 

Can't answer your first question as I haven't worked it out myself yet.

 

As to your second, it's official as it can be for now. I've tried unsuccessfully to contact Ian to get the library rolled into the official DCS-Bios release. So for now I will just have to keep releasing updates here.

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

  • 2 weeks later...

Hi Andrew,

 

 

First of all thank you for developing this library for the F-18!

 

I'm having an issue which could just be me, I'm using the rotaryencoder function for the INS_SW and RADAR_SW.

 

DcsBios::RotaryEncoder insSw("INS_SW", "DEC", "INC", 10, 11);

 

I see the INS_SW DEC and INC messages but the sim INS rotary doesn't rotate. Other switches are working okay.

 

INS_SW DEC

< 2018/08/08 22:31:02.878143 length=11 from=6204 to=6214

INS_SW DEC

< 2018/08/08 22:31:02.885124 length=11 from=6215 to=6225

INS_SW DEC

 

Should this be working or is there something I'm missing?

 

 

Thanks.

 

 

cheers

 

 

John


Edited by Blue73
Link to comment
Share on other sites

Sorry mate been off the air with work for a while, I will see if I can get a chance to look at this later this week.

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

  • 2 weeks later...

I cant even get the bloody control-reference to open in firefox! I am not cut out for PCs

 

 

Did that finally - this is going to be a long day!

 

 

Hey with the F/A-18 - do you have to add a new library or is the DCS Bios 7.01 fine?


Edited by Mr_Burns
Link to comment
Share on other sites

For some reason when I ran it today it all worked fine, so I blame the computer.

 

 

Looks like its going to take me about 3 nanos for the UFC and Hud control box though. What is a better arduino solution for say all of the left hand panels so I dont have as many USB devices, and you create breakout boards?

Link to comment
Share on other sites

Yesterday after the update i saw ingame in the Hornet Pit that the lights of the gear lever while moving has been enabled.

Do i just need to update/refresh and the code will be implemented or do i need to download a new version of dcs bios?

 

Cheers Evilfisher

Link to comment
Share on other sites

Looks like RADAR_SW and INS_SW aren't implemented yet as I cannot get them to work as a multi-position switch either. Bleed air works no problems.

 

As Capt Zeen pointed out elsewhere, one of the latest DCS updates changed the device ids for some functions. This includes the Radar and INS switches. Until AndrewW updates the library, here's a quick fix for those two switches. Edit your FA-18C_hornet.lua (..\Saved Games\DCS\Scripts\DCS-BIOS\lib):

Change

defineTumb("RADAR_SW", 43, 3001, 440, 0.1, {0.0, 0.3}, nil, false, "Sensor Panel", "RADAR Switch (MW to pull), OFF/STBY/OPR/EMERG(PULL)")
defineTumb("INS_SW", 45, 3001, 443, 0.1, {0.0, 0.7}, nil, false, "Sensor Panel", "INS Switch, OFF/CV/GND/NAV/IFA/GYRO/GB/TEST")

to

defineTumb("RADAR_SW", 42, 3001, 440, 0.1, {0.0, 0.3}, nil, false, "Sensor Panel", "RADAR Switch (MW to pull), OFF/STBY/OPR/EMERG(PULL)")
defineTumb("INS_SW", 44, 3001, 443, 0.1, {0.0, 0.7}, nil, false, "Sensor Panel", "INS Switch, OFF/CV/GND/NAV/IFA/GYRO/GB/TEST")

Tested and works as a multi position switch again. Haven't tried with an encoder though.

Other functions have broken in a similar way, e.g. the KY58 panel. Compare your FA-18C_hornet.lua module with devices.lua (..\DCS World\Mods\aircraft\FA-18C\Cockpit\Scripts).

 

Yesterday after the update i saw ingame in the Hornet Pit that the lights of the gear lever while moving has been enabled.

Do i just need to update/refresh and the code will be implemented or do i need to download a new version of dcs bios?

 

Cheers Evilfisher

 

Quick fix, edit your FA-18C_hornet.lua and add it yourself:

 

Change

--create_caution_lamp(CautionLights.CPT_LTS_LDG_GEAR_HANDLE)

to

defineIndicatorLight("GEAR_LEVER_LIGHT", 227, "Landing Gear Handle and Warning Tone Silence", "Gear Lever Light")

Start a flight with the hornet to update your documentation files and the function will show up in the dcs bios documentation (refresh the page) in the landing gear handle and warning tone silence category. Tested and works with an LED.

Link to comment
Share on other sites

Thank you DeadMeat! Works now.

 

 

 

As Capt Zeen pointed out elsewhere, one of the latest DCS updates changed the device ids for some functions. This includes the Radar and INS switches. Until AndrewW updates the library, here's a quick fix for those two switches. Edit your FA-18C_hornet.lua (..\Saved Games\DCS\Scripts\DCS-BIOS\lib):

Change

defineTumb("RADAR_SW", 43, 3001, 440, 0.1, {0.0, 0.3}, nil, false, "Sensor Panel", "RADAR Switch (MW to pull), OFF/STBY/OPR/EMERG(PULL)")
defineTumb("INS_SW", 45, 3001, 443, 0.1, {0.0, 0.7}, nil, false, "Sensor Panel", "INS Switch, OFF/CV/GND/NAV/IFA/GYRO/GB/TEST")

to

defineTumb("RADAR_SW", 42, 3001, 440, 0.1, {0.0, 0.3}, nil, false, "Sensor Panel", "RADAR Switch (MW to pull), OFF/STBY/OPR/EMERG(PULL)")
defineTumb("INS_SW", 44, 3001, 443, 0.1, {0.0, 0.7}, nil, false, "Sensor Panel", "INS Switch, OFF/CV/GND/NAV/IFA/GYRO/GB/TEST")

Tested and works as a multi position switch again. Haven't tried with an encoder though.

Other functions have broken in a similar way, e.g. the KY58 panel. Compare your FA-18C_hornet.lua module with devices.lua (..\DCS World\Mods\aircraft\FA-18C\Cockpit\Scripts).

 

 

 

Quick fix, edit your FA-18C_hornet.lua and add it yourself:

 

Change

--create_caution_lamp(CautionLights.CPT_LTS_LDG_GEAR_HANDLE)

to

defineIndicatorLight("GEAR_LEVER_LIGHT", 227, "Landing Gear Handle and Warning Tone Silence", "Gear Lever Light")

Start a flight with the hornet to update your documentation files and the function will show up in the dcs bios documentation (refresh the page) in the landing gear handle and warning tone silence category. Tested and works with an LED.

Link to comment
Share on other sites

No prob.

Note that when you change stuff like this in your dcs bios module it may rebuild the addresses for other stuff. Most likely your LEDs will be affected, but also switches if you're outputting their position. Simply check your arduino code against the new documentation and it should be obvious if you need to change something and re-upload to the board.

 

For example I had the APU ready light coded at DcsBios::LED apuReadyLt(0x54b4, 0x0100, PIN); but it changed to DcsBios::LED apuReadyLt(0x54b2, 0x8000, PIN); after I messed with what I described in the previous post. I don't know if it is possible to retain addresses between updates to the module, so I think we have to live with having to fix code during the development of the Hornet, as functions are added and changed. Oh well :music_whistling:

Link to comment
Share on other sites

Hi DeadMeat, Thanks for the heads up. Your first paragraph has me thinking, how do you deal with the initial position of the switches? I've had to scan all switches then call tryToSendDcsBiosMessage for each switch to update the sim switches. Wondering if there's a better way.

 

cheers

 

John

 

 

No prob.

Note that when you change stuff like this in your dcs bios module it may rebuild the addresses for other stuff. Most likely your LEDs will be affected, but also switches if you're outputting their position. Simply check your arduino code against the new documentation and it should be obvious if you need to change something and re-upload to the board.

 

For example I had the APU ready light coded at DcsBios::LED apuReadyLt(0x54b4, 0x0100, PIN); but it changed to DcsBios::LED apuReadyLt(0x54b2, 0x8000, PIN); after I messed with what I described in the previous post. I don't know if it is possible to retain addresses between updates to the module, so I think we have to live with having to fix code during the development of the Hornet, as functions are added and changed. Oh well :music_whistling:

Link to comment
Share on other sites

Backlight DCS Bios

 

I like to bump this topic, as i just finished making my own backlightcapable FA18c Panels

 

I cant find the (green) backlight for the panels, am i missing something?

DCS Bios seems to have all the lighting switches/knobs but the function of actually turning on/off the green backlight doesnt seem to be available.

How do you Guys managed it?

 

Cheers Evilfisher

Link to comment
Share on other sites

I like to bump this topic, as i just finished making my own backlightcapable FA18c Panels

 

I cant find the (green) backlight for the panels, am i missing something?

DCS Bios seems to have all the lighting switches/knobs but the function of actually turning on/off the green backlight doesnt seem to be available.

How do you Guys managed it?

 

Cheers Evilfisher

 

I don't think there's a specific output for backlight in any module. What you could do is something like this, where you basically read the position of the consoles dimmer knob/pot and output that as a PWM signal controlling the intensity of LEDs directly (be careful not to fry the board by exceeding the amp ratings) or via a mosfet setup. For extra credit you could add some checks to infer if conditions allow the backlight to function when turning the knob, e.g. power on the AC bus..

void onConsolesDimmerChange(unsigned int newValue) { 
   analogWrite(PIN, map(newValue, 0, 65535, 0, 255));
   
}
DcsBios::IntegerBuffer consolesDimmerBuffer([color="Red"]0x5552c, 0xffff,[/color] 0, onConsolesDimmerChange);

Be sure to check your own documentation for the correct function address in red.

Hi DeadMeat, Thanks for the heads up. Your first paragraph has me thinking, how do you deal with the initial position of the switches? I've had to scan all switches then call tryToSendDcsBiosMessage for each switch to update the sim switches. Wondering if there's a better way.

 

cheers

 

John

 

I don't check for initial state I just reset the switches before starting according to the mission scenario (air start, cold start..)

While I don't think there's a native or simple way to scan for switch state at startup I suppose you could scan for the module name change (indicating a mission start) and then do the senddcsbiosmessage dance for the whole lot. Ian commented on the topic here a while ago..

Link to comment
Share on other sites

Hey Deadmeat

 

Thank you very much for your reply, i was hoping to get away easy with dcs bios.

I wil read more into this topic to be shure i wont burn anything up.

Meanwhile i will bypass it and leave the lights on until i figure out on how to do the poti thingy you suggested.

 

Thank you very much for your help and reply

 

Cheers Evilfisher

Link to comment
Share on other sites

  • Recently Browsing   0 members

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