Lowlyslows Posted December 21, 2022 Posted December 21, 2022 Hey all! I am a building a F18 sim pit. I am trying to get the LTD/R to function with a toggle switch. I built the toggle switch into a functioning magnetic switch. The switch is a momentary on switch which is held in place by a magnet that is controlled by a MOSFET board. All of that tested great except the switch in the simulator. F18 Module: I enter the code: DcsBios::Switch2Pos ltdRArm("LTD_R_ARM", PIN); I change the PIN to the correct pin on the arduino UNO board. When I use the switch in moves the LST/NFLR switch in the simulator. thoughts?
No1sonuk Posted December 21, 2022 Posted December 21, 2022 Three things: 1) Are you using the Hub or Flightpanels version of DCS-BIOS? 2) Have you tried the LST/NFLR switch code in case they're transposed? 3) For a magnetically held switch, you might need to use the "actionbutton" code for the switch, or even doing it longhand with "sendDcsbiosMessage". Then you can use the switch position read to turn the hold magnet on if DCS says the switch is on. I think that using "Switch2Pos" won't let DCS switch it off if the physical switch is on. I had such a problem with a Mosquito gear lever test.
Lowlyslows Posted December 21, 2022 Posted December 21, 2022 30 minutes ago, No1sonuk said: Three things: 1) Are you using the Hub or Flightpanels version of DCS-BIOS? 2) Have you tried the LST/NFLR switch code in case they're transposed? 3) For a magnetically held switch, you might need to use the "actionbutton" code for the switch, or even doing it longhand with "sendDcsbiosMessage". Then you can use the switch position read to turn the hold magnet on if DCS says the switch is on. I think that using "Switch2Pos" won't let DCS switch it off if the physical switch is on. I had such a problem with a Mosquito gear lever test. Hey! 1) I am using Hub. 2) I did try it and it didn’t do anything with the LST code on either switch. 3) not so worried about that part yet until I can get the switch to function in the game. However, I am following the warthog project for similar guidance. could this be a Lua issue on the module itself? Sorry, I’m new to this level/coding.
BlackPixxel Posted December 21, 2022 Posted December 21, 2022 (edited) Hi! Is there already a way to get Blackshark 3 to work with DCS BIOS? I would like to use my existing Panel from Blackshark 2 for it, but it seems that there is no module yet for it. Should it work with the default Ka-50 plugin, or would I have to wait until a dedicated plugin gets added? Maybe it is as simple as changing some name inside of the existing plugin and it would work? Edited December 21, 2022 by BlackPixxel
No1sonuk Posted December 21, 2022 Posted December 21, 2022 1 hour ago, BlackPixxel said: Hi! Is there already a way to get Blackshark 3 to work with DCS BIOS? I would like to use my existing Panel from Blackshark 2 for it, but it seems that there is no module yet for it. Should it work with the default Ka-50 plugin, or would I have to wait until a dedicated plugin gets added? Maybe it is as simple as changing some name inside of the existing plugin and it would work? I don't know about Hub, but the Flightpanels guys posted on their discord on the 17th that they're working on integrating the two in the same way as the A-10C and A-10C II are. 1 hour ago, Lowlyslows said: Hey! 1) I am using Hub. 2) I did try it and it didn’t do anything with the LST code on either switch. 3) not so worried about that part yet until I can get the switch to function in the game. However, I am following the warthog project for similar guidance. could this be a Lua issue on the module itself? Sorry, I’m new to this level/coding. I don't know if Hub is actively bugfixed at the moment. I know Flightpanels fork is actively maintained.
Lowlyslows Posted December 21, 2022 Posted December 21, 2022 38 minutes ago, No1sonuk said: I don't know about Hub, but the Flightpanels guys posted on their discord on the 17th that they're working on integrating the two in the same way as the A-10C and A-10C II are. I don't know if Hub is actively bugfixed at the moment. I know Flightpanels fork is actively maintained. Is Flightpanels the same thing as DCS-BIOS?
Lowlyslows Posted December 21, 2022 Posted December 21, 2022 How does DCS-BIOS work? The LTD/R and the LST/NFLR are not functioning properly. I wonder if there is something written wrong somewhere that I can possibly change and fix but I have no clue how this DCS BIOS works. Does the LUA file from DCS BIOS communicate with the F18 lua to action in the game? Even if I toggle them from the control reference page it still moves the wrong switch. LTD/R code pushed to the arduino: DcsBios::Switch2Pos ltdRArm("LTD_R_ARM", 10); //this code moves the LST/NFLR LST/NFLR code pushed to the arduino: DcsBios::Switch2Pos lstNflrSw("LST_NFLR_SW", 10); //this code moves the FLIR
BlackPixxel Posted December 21, 2022 Posted December 21, 2022 Thanks, will take a look at the flightpanel stuff!
No1sonuk Posted December 22, 2022 Posted December 22, 2022 (edited) 2 hours ago, Lowlyslows said: Is Flightpanels the same thing as DCS-BIOS? Yes. And no... It was "forked" from a version if DCS-BIOS earlier than Hub. As I understand it, it was originally made so that the Saitek flight panels could be used with DCS. The fork now consists of a version of DCS-BIOS as well as an additional app for the flight panels, and also the StreamDecks. You can use just the DCS-BIOS part if you want. Flightpanels is actively maintained, but Hub isn't. Edited December 22, 2022 by No1sonuk Phone app going nuts and disrupting input
Candiru89 Posted December 23, 2022 Posted December 23, 2022 Will be there a command reference for Black Shark 3? Or is there any other way to use my stuff programmed for BS2 to work on BS3?
BlackLibrary Posted December 23, 2022 Posted December 23, 2022 use the Black Shark one its the same. But only in Marter branch of FP BIOS. Hub will not get it. aka WarLord DCSFlightpanels DCS-BIOS Fork DCSFlightpanels arduino-library DCSFlightpanels DCSFlightpanels-Profiles DCS FP / BIOS Discord Server
Candiru89 Posted December 23, 2022 Posted December 23, 2022 2 hours ago, BlackLibrary said: use the Black Shark one its the same. But only in Marter branch of FP BIOS. Hub will not get it. Can you elaborate please?
Candiru89 Posted December 23, 2022 Posted December 23, 2022 6 hours ago, BlackLibrary said: use the Black Shark one its the same. But only in Marter branch of FP BIOS. Hub will not get it. I downloaded dcs-bios-master. It reads data from all modules, including bs but not from black shark 3.
amido Posted December 29, 2022 Posted December 29, 2022 hello all, i have a problem with the sketch for ufc f 18. i can't get 0.91 inch screens to work. I use the TCA9548A multiplexer. I've searched the internet but the ones I've found always give me errors. Could any of you help me? thank you and wish you a happy new year
byteman59 Posted December 30, 2022 Posted December 30, 2022 Hello everyone, I have a question on the T/O Trim button and LED on the SAS Panel for the a10-II. I have the TO button setup as a momentary button. When should the Take-Off led light up? Currently the LED is on constantly, even when the TO button is pressed. Any suggestions would be greatly appreciated, thanks in advance! Bob
No1sonuk Posted December 30, 2022 Posted December 30, 2022 IIRC, the T/O trim LED should light when the button is pressed, after the trims have been reset. So if the trims were offset, the first time you press and hold the button, there'll be a pause while the trims move, then the light will come on. Release the button, and the light goes out. Press the button again, and the light should come on immediately as the trims are already reset.
byteman59 Posted December 30, 2022 Posted December 30, 2022 (edited) 11 hours ago, No1sonuk said: IIRC, the T/O trim LED should light when the button is pressed, after the trims have been reset. So if the trims were offset, the first time you press and hold the button, there'll be a pause while the trims move, then the light will come on. Release the button, and the light goes out. Press the button again, and the light should come on immediately as the trims are already reset. Thanks No1sonuk, Looks like will need to reverse my pinmode for the LED as it is on when button is not pressed. How would i base the code to reverse the LED function? Edited December 30, 2022 by byteman59
No1sonuk Posted December 30, 2022 Posted December 30, 2022 If you're using the latest version of the Flightpanels fork of DCS-BIOS, adding ",false" after the pin number should invert it. e.g. DcsBios::LED takeOffTrim(0x1026, 0x0400, PIN, false);
No1sonuk Posted December 30, 2022 Posted December 30, 2022 If that doesn't work (e.g. you're using Hub), you could try wiring the LED as "active low" (see attached image). The normal way to wire LEDs on the Arduino is the "active high" connection, where the LED is turned on when the pin turns on. However, the "active low" version would turn the LED on when the pin turns off.
byteman59 Posted December 30, 2022 Posted December 30, 2022 I do have my LED currently using active low. 3.3v > LED(3.3fv) then connected to Arduino.
byteman59 Posted December 30, 2022 Posted December 30, 2022 btw, any idea why my sketch fails with exit status 1 no matching function for call to 'DcsBios::PollingInput::PollingInput()' when using dcs-bios arduino library from forks master 3.7. Does not fail when using Hub 0.2.11 library I have included my sketch for review. The sketch contains code for IFF and SAS panels. IFF_SAS.ino
No1sonuk Posted December 30, 2022 Posted December 30, 2022 1 hour ago, byteman59 said: I do have my LED currently using active low. 3.3v > LED(3.3fv) then connected to Arduino. Then that's why your LED is the lighting the wrong way round. DCS-BIOS assumes active high wiring for LEDs, but active low for switches (it uses the internal pullups). No idea on the pollinginput thing.
byteman59 Posted January 2, 2023 Posted January 2, 2023 On 12/30/2022 at 1:12 PM, No1sonuk said: Then that's why your LED is the lighting the wrong way round. DCS-BIOS assumes active high wiring for LEDs, but active low for switches (it uses the internal pullups). No idea on the pollinginput thing. Got the LED working correctly, but the LED will not turn on when i hold the TO Trim button for over 20 seconds. Does anything else need to be set?
No1sonuk Posted January 2, 2023 Posted January 2, 2023 5 minutes ago, byteman59 said: Got the LED working correctly, but the LED will not turn on when i hold the TO Trim button for over 20 seconds. Does anything else need to be set? Not as far as I know.
Recommended Posts