

No1sonuk
Members-
Posts
1594 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by No1sonuk
-
Covered toggle switch where cover can trigger event?
No1sonuk replied to TEMPEST.114's topic in Home Cockpits
Found this in my "ideas" folder. I can't remember where I got it. EDIT- Original poster identified: https://forum.dcs.world/topic/247738-vr-desk-mounted-crap-cat/ The pin is a button that activates when the cover is opened. -
These might help: https://www.737diysim.com/wiring-a-switch-to-arduino https://www.gaugemasterretail.com/magento/rightlines-article/to-switch-or-not-to-switch.html
-
Considering you can fine tune those, you really don't need the extra code. I found also that some of the controls font need it. e.g. the UHF frequency controls do, but the VHF ones don't.
-
For that money, you could probably build your own CNC machine good enough for that job.
-
I tried it again, and it worked in both Flightpanels AND Hub. The only thing I can think of is that it doesn't work with "INC" and "DEC" on controls that take numbers like "-2400". I put the numbers in and it worked fine. /* Tell DCS-BIOS to use a serial connection and use interrupt-driven communication. The main program will be interrupted to prioritize processing incoming data. This should work on any Arduino that has an ATMega328 controller (Uno, Pro Mini, many others). */ //#define DCSBIOS_IRQ_SERIAL #define DCSBIOS_DEFAULT_SERIAL #include "DcsBios.h" /* paste code snippets from the reference documentation here */ typedef DcsBios::RotaryEncoderT<POLL_EVERY_TIME, DcsBios::FOUR_STEPS_PER_DETENT> FourStepRotaryEncoder; // A custom rotary encoder with four quadrature steps per physical detent. //FourStepRotaryEncoder uhf1mhzSel("UHF_1MHZ_SEL", "DEC", "INC", 3, 2); FourStepRotaryEncoder intAimVol("INT_AIM_VOL", "-2400", "+2400", 3, 2); void setup() { DcsBios::setup(); } void loop() { DcsBios::loop(); }
-
IIRC, it worked for me. I'll try again later.
-
You can do that with the DCS-BIOS and arduino library parts of the Flightpanels fork.
-
Rotary encoders: It was in Discord I was pointed to the DCSFP Wiki here: https://github.com/DCSFlightpanels/dcs-bios-arduino-library/wiki/RotaryEncoder Example 2: typedef DcsBios::RotaryEncoderT<POLL_EVERY_TIME, DcsBios::FOUR_STEPS_PER_DETENT> FourStepRotaryEncoder; // A custom rotary encoder with four quadrature steps per physical detent. FourStepRotaryEncoder tacan1("TACAN_1", "DEC", "INC", 0, 1); Once you've done the typedef line, the "FourStepRotaryEncoder" can be called in any line in place of "DcsBios::RotaryEncoder".
-
Switch sync: I don't think DCS-BIOS sends all switch positions when it starts - only when you change them. In some ways that's a good thing. It means you won't need to go round setting everything if you run a hot start. Encoders: They are probably 2 or 4 pulse per detent. Someone posted how to stop that by defining a new encoder type. I'll search for that later.
-
I think the ratio might be the number of pulses per detent. If you have it set wrong, the number of steps the board outputs may not match the number of clicks.
-
Nothing, and no response to emails sent weeks ago either.
-
No. What you're describing had a physical switch which was activated by the cover, and the physical switch under it. The SwitchWithCover2Pos function works on one physical switch. When you flip the switch, it opens the cover in DCS, then flips the switch. If you want physical switch cover stuff, have a look here:
-
The 36-way ones have a 4-way hat plus 32 buttons. If you don't need many more, I'd suggest an Arduino Pro Micro or Leonardo - those two can behave as HIDs with no special coding mods as they have the 32u4 processor which has built-in USB. Just use the joystick library. Size-wise, the Pro Micro is a little bit shorter than a Nano, and the Leonardo is the same basic form factor as the Uno.
-
Covered toggle switch where cover can trigger event?
No1sonuk replied to TEMPEST.114's topic in Home Cockpits
DcsBios::SwitchWithCover2Pos pltLaunchbarAbort("PLT_LAUNCHBAR_ABORT", "PLT_LAUNCHBAR_ABORT_COVER", 6); The two labels within the brackets come from the two separate switch and cover controls in the control reference. And this is the invert: DcsBios::Switch2Pos switch2PosExample("AHCP_TGP", 1, TRUE); // Inverted standard switch The "TRUE" might need to be "true". -
Which Bodnar board?
-
Covered toggle switch where cover can trigger event?
No1sonuk replied to TEMPEST.114's topic in Home Cockpits
Which version of DCS-BIOS are you using? The Flightpanels fork now has a special control that lifts the cover when you flip the switch. I'd need to search the threads here to find these. -
For gauges and MFDs, if you know the part numbers or mil-spec numbers, you can quite often find the info using Google. e.g. A-10C Altimeter - Mil-A-83419: http://everyspec.com/MIL-SPECS/MIL-SPECS-MIL-A/MIL-A-83419C_41674/ A-10 MFCD: http://lynx.dk/blueprints/A-10C MFCD Dimensions.pdf
-
Covered toggle switch where cover can trigger event?
No1sonuk replied to TEMPEST.114's topic in Home Cockpits
IIRC, adding a ",true" to the DCS-BIOS switch definition reverses the function. -
I'd definitely go with the Bodnar for the encoders and simple switches. The Bodnar encoder config software also helps with encoders that have more than one pulse per detent, so don't immediately dismiss it. You really only need the arduinos if you want fancy switch functions such as originally discussed - i.e. 3 different outputs for 2 inputs. If you don't need an output for the centre off, you can also use the Bodnar.
-
You could theoretically run an 8x8 diode-blocked matrix on a Leonardo. Then the HID part is taken care of by default.
-
Ah, but that image looks like it has the right USB chip - the second 2x3 pin header near the USB and small square chip are the indicators. That's a 16u2. Did you try this video: It looks simple enough to me. There's something there about installing and using a special library in the IDE as well.
-
Which EXACT Mega do you have? A photo would help. "Compatible" Unos and Megas don't always have the right USB interface device to be able to reflash the firmware.
-
That doesn't change the overlay polarity.
-
Is there a USB joystick test app that supports more than 32 buttons? I've been using Pointy's joystick test app until recently, but it has stopped working.
-
No Idea. I've not tried it.