Jump to content

No1sonuk

Members
  • Posts

    1594
  • Joined

  • Last visited

Everything posted by No1sonuk

  1. Airbus pilot seat material images. I took these photos... Large files - sizes shown Dark blue with rule (2.4Mb): Dark Blue Torn (3.1Mb): Light blue (sides) with rule (1.9Mb): Bonus image - Bare seat (partially disassembled) (8.2Mb!):
  2. I took some photos with steel rule which I'll upload when I get home. In the meantime, this appears to be the exact fabric used for Airbus pilot seats: https://www.iwantfabric.com/paris-blue-stripes-upholstery-seating-wool-fabric.html
  3. Do they show up in the Arduino IDE?
  4. We repair them. No airport wandering required.
  5. If it helps, Les, I can probably get you a close-up photo of the fabric on an Airbus pilot seat tomorrow.
  6. The double ActionButton option just worked for me with the P51 gen switch example.
  7. OK. ActionButton won't work then. UNLESS, you rig a second one to turn off using the other contact on a SPDT switch. So maybe this: DcsBios::ActionButton ltdRSwToggleOn("LTD_R_SW", "1", 5); DcsBios::ActionButton ltdRSwToggleOff("LTD_R_SW", "0", 6); // Second contact on same switch. Note different names before parenthesis DcsBios::LED ltdRSw(0x74c8, 0x4000, 4); That trades code simplicity for using extra IO pins. Otherwise, you'll need to do it with polling the switch and sendDcsBiosMessage or the DCS-BIOS/HID hybrid idea mentioned earlier.
  8. The "toggle" part might be what's causing that. Did you try it with "1"?
  9. I think it's FAR easier than you've made it. I just did a test with these two lines: DcsBios::ActionButton gen("GEN", "1", 8); DcsBios::LED genHold(0x5000, 0x0001, 13); Those two lines could run a mag switch... ActionButton only fires the command once, on the falling edge of the switch input. In my example, the switch turns on the P51 generator switch, and the LED responds to the in-game switch position. I triggered the switch and left it in place. The light came on. I then moved the switch in DCS (with the physical switch still on), and it turned off, and stayed off, and the LED went out. Then moving the physical switch to off did nothing. For the mag switch, the hold solenoid could be driven in place of the LED to hold the switch on. Test sketch for P51: #define DCSBIOS_IRQ_SERIAL #include "DcsBios.h" /* paste code snippets from the reference documentation here */ DcsBios::ActionButton gen("GEN", "1", 8); // Sends switch position "1" to the "GEN" switch on the pin 8 falling edge DcsBios::LED genHold(0x5000, 0x0001, 13); void setup() { DcsBios::setup(); } void loop() { DcsBios::loop(); } EDIT: This is flawed and I didn't notice - there's no way to turn off the control with the physical switch...
  10. Not 100% sure what you mean by "ethernet shields and a Arduino Due", but I know a Leonardo can take status data from DCS and send "keypresses" in one device: That sends joystick button presses, but it could easily be changed for keypresses.
  11. Have a look here: That's for an Arduino Pro micro or Leonardo to give 3 different button outputs for a single on-off-on switch.
  12. I recently posted code for a 3 position switch to on-on-on, but I can't find it with the phone app.
  13. Did you read the comments? Those aren't on-off-on switches.
  14. Yes. In my post, I mentioned "WIBBLE" was just to make it unique. The label between the function and parenthesis (bleedAirKnobWIBBLE in this case) can be anything you want. That's to make the control in the arduino code unique. The part inside the parenthesis is the critical part for DCS. "BLEED_AIR_KNOB" is the start of the message sent to DCS, and that's the part that can't be changed.
  15. FYI. I submitted code to the Flightpanels guys that would replace the LED function with one where you can add ",false" on the end to invert it. No idea when it'll make it to the full "build", though.
  16. OK... I'm answering the question asked... Those two lines I sent in my last message should give what I thought was asked for: Left and right rotation by the encoder and press to zero...
  17. In the DCS-BIOS Arduino library examples, there's a "one of everything" sketch. If you want to learn how those commands work, you can look in the Arduino library source code. BE CAREFUL not to accidentally edit them, though, in case you screw something up. On my computer, those files are located here: C:\Users\timja\Documents\Arduino\libraries\dcs-bios-arduino-library-0.3.7\src\internal Looking at the LED code in there, it possibly wouldn't take much effort to add an active low type, or a flag that can be set if required. The 2 position switch has that.
  18. Having looked at the Arduino library code, it looks to me like all the switch types are fancy packaging that leads to sendDcsBiosMessage commands. I think whatever comes after the switch type is an arbitrary name to prevent clashes. So try this: DcsBios::RotaryEncoder bleedAirKnob("BLEED_AIR_KNOB", "DEC", "INC", 19, 20); DcsBios::ActionButton bleedAirKnobWIBBLE("BLEED_AIR_KNOB", "0",21); // or whatever pin the encoder switch is Actionbutton only sends the command on the falling edge of the switch (connecting to gnd), not the rising edge. "WIBBLE" is in there because it's pretty much guaranteed you won't have any other function with that in it.
  19. The power voltage doesn't affect the code unless you're measuring voltages. That code goes where all the DCS-BIOS lines go - usually above the setup, outside the setup or loop. They're functions in their own right. I don't have access to the control reference right now, so I don't know if the numbers are right.
  20. I have another idea. Post up the switch code you tried that gave the conflict error.
  21. Try adding this into the main void loop: If(digitalRead(encoderPushPin)== 0){ sendDcsBiosMessage("BLEED_AIR_KNOB", "0"); delay(10);} That should read the encoder switch every time through the loop and send a "0" to DCS if it's pushed. it's quick and dirty, and you might want to add some state checking so it doesn't keep sending it.
  22. Wouldn't removing the stop washer do that without opening the switch?
  23. You can use the code if it's too much hassle to rewire. I've done it for driving Neopixel addressable LEDs. Try this in the code function: if (newValue == 1){digitalWrite(LEDPIN, LOW);} else{digitalWrite(LEDPIN,HIGH);} That should do it.
  24. Try this: DcsBios::RotaryEncoder bleedAirKnob("BLEED_AIR_KNOB", "0", "INC", 19, 20); I'm not sure it'll work, but from looking at the library source code, it looks like it might...
  25. If you use DCS-BIOS, you can program an arduino to send any value you want using sendDcsBiosMessage. If you haven't already set up DCS-BIOS, I recommend the "Flightpanels fork " as that's currently actively updated.
×
×
  • Create New...