Jump to content

Throttle position activating stuff


outbaxx

Recommended Posts

Hi guys

 

Using DCS-BIOS

I want to set a switch in DCS depending on my throttle position. So when my throttle is below a value the switch is set to 1 and if it’s above a value it’s set to 0.

I don’t want a physical switch connected just control the switch in the sim depending on my throttle position.

(The throttle is not connected with DCS-bios)

Is this possible?

And if so, could you give me some pointers to how it’s done?

 

Regards

F

Link to comment
Share on other sites

You can use JoystickGremlin or similar to simulate a button being held while the throttle is below X%.

 

If DCS has a bindable function for whatever you are trying to have it do, then that will work, though you have to run JoystickGremlin in the background.

Link to comment
Share on other sites

Thanks, if I can’t get it within DCS-BiOS I’ll check that one out.

 

Is it possible to set a button/switch in DCS-BIOS without having a physical device connected?

We have the DcsBios::integerbuffer buttonchange(x046c, 0xffff, 0, onbuttonchange) but is there a DcsBios::setinput button(0x46c, 1) or anything like that?

Link to comment
Share on other sites

  • 3 weeks later...
I can’t figure it out, really feel stupid over here.

How do I set a switch/button to a certain value without having the switch/button connected to the Arduino?

 

Regards

F

 

 

There are two functions in the DCS-BIOS Arduino Library:

 

 

void sendDcsBiosMessage(msg, arg)

bool trySendDcsBiosMessage(msg, arg)

 

 

The first one will block until the message can be sent (for example, when you are on a RS-485 slave that already has a message in its transmit buffer), the second version will just ignore the message and return false in that case.

 

 

For example, to put the A-10C into reverse gear, you could use:

sendDcsBiosMessage("GND_SAFE_OVERRIDE", "1");

 

 

For examples on how to use the second variant, see:

https://github.com/dcs-bios/dcs-bios-arduino-library/blob/master/src/internal/Switches.h

Link to comment
Share on other sites

Ian;4091887']There are two functions in the DCS-BIOS Arduino Library:

 

 

void sendDcsBiosMessage(msg, arg)

bool trySendDcsBiosMessage(msg, arg)

 

 

Thank you so much!

It sort of worked:) it seems like the High Pressure Valve in the AJS37 doesn’t work like a on/off switch.

The state can be 1 and if I set it to 1 again it will turn off the valve but the state is still 1, same goes for 0. Need to figure out how to read it’s position without reading the state as it can be both on and off in both state 1&0...

 

Regards

F

Link to comment
Share on other sites

Ok, is it possible to read the physical Throttle position ie the windows value?

The issue I’m having is that the “raw gauge value” of the throttle show the animated throttle position, so even if I put my physical throttle all the way back I won’t get a lower value than 3276 as the cut off animation waits for a input.

If I advance my throttle, the next value is 6553, as the animation simulates a detent there, so I can’t read any value between 3276 and 6553.

So, is it possible to read the physical throttle position values?

 

Regards

F

Link to comment
Share on other sites

Anything outside the "cockpit argument" values (which control the animations) and the return values of the list_indication() and list_cockpit_params() functions in DCS is currently outside of the scope of DCS-BIOS and will probably stay out of scope for a long time.

 

You will need to write a separate program that monitors your USB throttle. When it wants to trigger a command via DCS-BIOS, that program can open a TCP connection to localhost:7778 and send "MESSAGE ARGUMENT\n", e.g. "GND_SAFE_OVERRIDE 1\n".

Link to comment
Share on other sites

Ian;4095327']Anything outside...

 

Thanks for answering, that’s a bit much for this poor brain :) , I’ll just have to go back and install a button after all.

Again big thanks for your answer, saved me a lot of time troubleshooting something that wouldn’t work the way I approached it!!

 

Regards

F

Link to comment
Share on other sites

  • Recently Browsing   0 members

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