Jump to content

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


Recommended Posts

Thanks Andrew, I have the rotary switch with pull action sorted, it would greatly appreciated if you can add the function!

 

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.

Link to comment
Share on other sites

  • Replies 173
  • Created
  • Last Reply

Top Posters In This Topic

the way i've been looking at doing the rotary with pull rather then push was to have it consider 'pushed' to be off so in the Ardunio if pin x is high then button = false if it's low then button = true that way you can use an existing push button with a spring action (like the real thing).

 

Is that kinda what you did Blue?

i7 13700k, 64gb DDR5, Warthog HOTAS, HP Reverb G2 VR, win 11, RTX 3070

TGW Dedicated Server Admin, Australian PVE/PVP gameplay. (taskgroupwarrior.info/2020)

Link to comment
Share on other sites

Hi Rob,

 

How would you integrate the button into the rotary?

 

I built mine like this, https://forums.eagle.ru/showthread.php?t=219982&page=20

 

If Andrew is able to implement the pull command then I'll write code that sends the pull message when a pos3->pos4 is detected or a push if pos4->pos3 is detected.

 

cheers

 

John

 

the way i've been looking at doing the rotary with pull rather then push was to have it consider 'pushed' to be off so in the Ardunio if pin x is high then button = false if it's low then button = true that way you can use an existing push button with a spring action (like the real thing).

 

Is that kinda what you did Blue?


Edited by Blue73
Link to comment
Share on other sites

I'm trying to do some work with the IFEI.

 

void onIfeiBingoChange(char* newValue) {
   /* your code here */
}
DcsBios::StringBuffer<5> ifeiBingoBuffer(0x545a, onIfeiBingoChange);

 

How do I convert newValue into an integer?

 

Google does not seem to be helping me here. I'm guessing that newValue is an array of char datatypes?

 

also, what's the best way to output values for debugging?

 

Thanks,

Link to comment
Share on other sites

Hi Rennes, can the c function atoi() help here? If you're getting a number represented as a string this function will convert it to an integer.

 

For debugging I just send my debug messages as regular dcs messages and watch the (DCS-BIOS)serial console screen. Let me know if you want a specific example.

 

cheers

 

John

 

I'm trying to do some work with the IFEI.

 

void onIfeiBingoChange(char* newValue) {
   /* your code here */
}
DcsBios::StringBuffer<5> ifeiBingoBuffer(0x545a, onIfeiBingoChange);

 

How do I convert newValue into an integer?

 

Google does not seem to be helping me here. I'm guessing that newValue is an array of char datatypes?

 

also, what's the best way to output values for debugging?

 

Thanks,

Link to comment
Share on other sites

Never mind, I figured it out.

 

Not sure if it's the right way to do it, but this seems to work:

 

String sNewValue(newValue);
intNewValue = sNewValue.toInt();

 

edit: I think we posted at the same time.

 

I didn't try that, I did see it while looking for an answer but for some reason I didn't think it would work in this case, not sure why. I'll give it a try.

 

For the debugging, I guess that's what I'm asking. How do you send a message to the console screen? Sorry, kinda new to this.


Edited by Rennes
Link to comment
Share on other sites

Hi Rennes, This is what I do for debugging. Also get ready to hit the pause key if you're debugging inbound messages from DCS.

 

//create this function

void debugMsg ( const char *sIn, int iIn )
{
 char sValue[7];
 char sMsg[128];
 snprintf(sMsg,128,"--DEBUG-> %s,",sIn);
 utoa(iIn, sValue, 10);
 DcsBios::tryToSendDcsBiosMessage(sMsg, sValue);

}

//function use, I send debug strings and values.

void loop()
{
   debugMsg("Test Debug Msg",20);
}

Never mind, I figured it out.

 

Not sure if it's the right way to do it, but this seems to work:

 

String sNewValue(newValue);
intNewValue = sNewValue.toInt();

edit: I think we posted at the same time.

 

I didn't try that, I did see it while looking for an answer but for some reason I didn't think it would work in this case, not sure why. I'll give it a try.

 

For the debugging, I guess that's what I'm asking. How do you send a message to the console screen? Sorry, kinda new to this.


Edited by Blue73
Link to comment
Share on other sites

  • 3 weeks later...

Hello!

 

Any one know how works the EMERGENCY_PARKING_BRAKE_PULL ?

 

Then the brake is pulled I cant use any "dcs bios message" to push de brake. Any idea?

 

Thanks!

 

[Edit] WING_FOLD_PULL worls perfectly for exemple.


Edited by Roger01
Link to comment
Share on other sites

  • 3 months later...

Is this library included as part of official DCS-BIOS or we still have to download it apart of DCS-BIOS? Thanks!

 

EDIT:

Someone is using this library to export the display of the UFC? I can export the word like ATTH,HSEl,BALT etc..... bu't I can't display the two points before the word of the currently selected item, any idea ?

Currently testing with U8G library, maybe don't have this characters?


Edited by Maverick87Shaka

FlighRIG => CPU: RyZen 5900x | RAM: 64GB Corsair 3000Mhz | GPU: nVIDIA RTX 4090 FE | OS Storage: SSD NVMe Samsung 850 Pro 512GB, DCS Storage: SSD NVMe Sabrent 1TB | Device: Multipurpose-UFC, VirPil T-50, TM WARTHOG Throttle, TrackHat, MFD Cougar with screen.

Our Servers => [ITA] Banshee | Krasnodar - PvE | PersianConquest PvE Live Map&Stats | Syria Liberation PvE Conquest

Support us on twitch subscribing with amazon prime account linked, it's free!

Link to comment
Share on other sites

  • 2 weeks later...

Hey guys,

 

I'm still learning the DCS-Bios. I have in the past made the AOA indicator work just fine. I'm now trying to get Servo motors working with the different gauges around the cockpit. As a test, I tried different gauges, but none of them seemed to work. I then put the code in for the VSI on the A-10 and the servo motor worked. Same with the F-14. I checked a few gauges in the P-51 since there are so many... but none of them are working in the F-18. I have the v1.0 loaded in, along with the most recent version of bios.

 

 

Any ideas what I could possibly be doing wrong?

A-10C - FC3 - CA - L-39 - UH1 - P-51 - Hawk - BS2 - F-86 - Gazelle - F-5E - AV8B - F/A-18C

i5-4590 - GTX 1060 - Oculus CV1 - TM:Warthog

[sIGPIC]http://forums.eagle.ru/signaturepics/sigpic9979_1.gif[/sIGPIC]

Link to comment
Share on other sites

So, in doing more testing, the F-18 lua file had for the VSI, (6000,3000,etc...) whereas the A-10 only had (-1, 1). When I removed all the fpm and pointer angles, I get the Servo motor to work. Haven't tested the other gauges yet. I should have the VSI built soon.

A-10C - FC3 - CA - L-39 - UH1 - P-51 - Hawk - BS2 - F-86 - Gazelle - F-5E - AV8B - F/A-18C

i5-4590 - GTX 1060 - Oculus CV1 - TM:Warthog

[sIGPIC]http://forums.eagle.ru/signaturepics/sigpic9979_1.gif[/sIGPIC]

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...

Currently testing with U8G library, maybe don't have this characters?

 

 

This is the same as the profile in the dcs-bios download. And since we’re talking ufc..

 

I’m using the liquidcrystal_i2c and u8g2 libs to drive the scratchpad and comms displays and keep getting strange characters on the tens and twenty. I can’t imagine i’m the the only one having this issue. I’ve tried printing the newValue as is, converting it to a string, to ints etc.

 

Any help would be greatly appreciated.

 

221f9573a369cc779cd4e27aedb1d209.jpg

8139fdaf929399c35b2eab6a3983cbdc.jpg

8a46e42bc7aa1f909dfdf700f448fdb3.jpg

 

edit: I ended op casting the char to a String and replacing the odd characters with a String.replace('~','2');String.replace('´','1'); Dirty hack but it works.

 

Cheers, michel


Edited by longuich
solved
Link to comment
Share on other sites

  • 3 weeks later...
Hi All, Has anyone had the issue where the FLIR_SW and LTD_R_SW switches on the Sensor panel no longer does anything in the sim?

 

Hi Blue73. Its been a long time. I have not been flying the past couple months.

 

Started up my panels over the weekend and yeah my FLIR Sensor switch and LTD/R switch are working in the terminal window but do nothing in the sim.

 

Not sure what it could be and to be honest not had a very hard look.

Link to comment
Share on other sites

Guys, regarding the FLIR switch issues it seems that the latest updates have changed some things, including how the LTD/R ARM position is implemented.

 

Not sure which version of the F18 library you're on (v1.0 on this thread or the v1.1 update on DCS flight panels github) - but neither worked for me out of the box.

 

The following changes have my switches working:

 

define3PosTumb("FLIR_SW", 62, 3001, 439, "Sensor Panel", "FLIR Switch, ON/STBY/OFF")
define3PosTumb("LTD_R_SW", 62, 3002, 441, "Sensor Panel", "LTD/R Switch, ---/SAFE/AFT") -- ARM position is handled by another parameter
defineToggleSwitch("LST_NFLR_SW", 62, 3004, 442, "Sensor Panel", "LST/NFLR Switch, ON/OFF")

You'll notice the device ID must be 62 (the TGP) and the counters skip one command ID (3003) controlling the ARM position - this you will have to add somewhere (like the end of the library)

defineToggleSwitch("LTD_R_ARM", 62, 3003, 441, "Sensor Panel", "LTD/R Switch, ARM/SAFE")

As you can see this function has the same clickable ID (441) as the rest of the LTD/R switch.

The switch is working but it is not pretty.. Maybe someone can LUA the LTD/R back into a single parameter with a custom toggle switch function in the library?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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