

No1sonuk
Members-
Posts
1594 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by No1sonuk
-
This link doesn't give your post.
-
"0" and "1" are the positions of the switch. A 3-position switch also has "2". "1" is the middle position in that case.
-
I'm pretty sure the "DcsBios::" is not required. I don't remember using it with this function. SendDcsBiosMessage is a bottom level function. IIRC, "SendDcsBiosMessage" will wait until DCS confirms it has received the message, but "tryToSendDcsBiosMessage" doesn't wait.
-
Let me introduce you to SendDcsBiosMessage... This magic function is what's at the bottom of all the other functions like switch2pos, etc. So for example: SendDcsBiosMessage ("CDU_V", "1"); // This tells DCS that CDU button V has been pressed. SendDcsBiosMessage ("CDU_V", "0"); // This tells DCS that CDU button V has been released. You could write your code to use this using switch/case code
-
There's always the LCD or OLED display option.
-
Arduino-code to get the F/A-18C instrument-panels LEDs lit.
No1sonuk replied to Purzel's topic in Home Cockpits
This is likely your problem. Hub is woefully out of date - especially for the F-18. You'll be better off removing it and switch to the "Flightpanels Fork", which is actively updated. https://github.com/DCS-Skunkworks -
I just tested it, and it did nothing. It didn't move any switches in-game.
-
3 pins (single pole) will do.
-
Code and font files attached. Written for Arduino Uno and 3.3 inch TFT shield. NOTE: It is NOT EVEN REMOTELY finished. There are test strings and some things don't work. IIRC, the conclusion is that it may require special code to make it work properly. It's NOT nearly as simple as the CDU. DCS_ARC210_3.3TFT_Test.zip
-
Batch com port initialisation: There's the multi com port .bat as mentioned above, but you might be able to write a version that will also trigger DCS after doing the socat things.
-
The ARC-210 code is a PITA because it has different formats between screens. I don't remember where the devs have left it. I'll look later. I made something that kind of works. I'll post it when I get home.
-
First-off: Try this to get the end values the Arduino sees when it does the A/D conversion: https://www.arduino.cc/en/Tutorial/BuiltInExamples/AnalogReadSerial Then try this: DcsBios::Potentiometer consolesDimmer("CONSOLES_DIMMER", A0, false, min_value, max_value); Yup. Input range mapping was added to the function last year sometime. You'll need to make sure you have the latest Arduino library The "false" means "don't reverse the operation" - change it to "true" if your pot goes the wrong way and you don't want to remap it in-game or rewire it. The function works without those last 3 parameters because defaults are set. The defaults are : false, min_value = 0 , max_value = 1023 The DCS-BIOS code then automatically maps like this for non-reversed: State = map(analogRead(pin), min_value, max_value, 0, 65535); And like this for reversed: State = map(analogRead(pin), min_value, max_value, 65535, 0); You could also do this if you just need to reverse the pot, but not change the min and max: DcsBios::Potentiometer consolesDimmer("CONSOLES_DIMMER", A0, true);
-
PM me please to remind me to write something here when I get home from work.
-
You're using the functions wrong. Try analogRead in a main loop function, then use SendDcsBiosMessage to send the numbers to DCS.
-
Oh. So it's a bug with DCS itself? Report it for bug fixing.
-
Something like this in the Arduino code? unsigned int AltMetres = 0; // Put this at the top with your variable definitions. void onAltMslFtChange(unsigned int newValue) { AltMetres = newValue * 0.3048; // Add code here for what you want to do with the data or use the global variable in your main loop. } DcsBios::IntegerBuffer altMslFtBuffer(0x0434, 0xffff, 0, onAltMslFtChange);
-
I'm using a 3.5" TFT for my mini-CWP, and mine seems to be correct. Have you checked the addresses and masks are correct?
-
Multiply ALT_MSL_FT by 0.3048 to get metres.