Jump to content

No1sonuk

Members
  • Posts

    1601
  • Joined

  • Last visited

Everything posted by No1sonuk

  1. 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.
  2. I have another idea. Post up the switch code you tried that gave the conflict error.
  3. 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.
  4. Wouldn't removing the stop washer do that without opening the switch?
  5. 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.
  6. 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...
  7. 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.
  8. Then use the active high version - it's what the LED code was designed for.
  9. If you try the "active low" wiring from my first response to this thread, it might do what you want.
  10. OK. But those are not what you asked about. You asked about 2 different controls. The "0x0800" is the "bit mask" to isolate the bit you want from the "0x110C" address. The rest of my response stands. The LED code switches an LED on and off dependent on the state of the bit. The IntergerBuffer code feeds the value (1 or 0 in this case) into a function you write. "DcsBios::IntegerBuffer efcpMrfcsBuffer(0x110c, 0x0800, 11, onEfcpMrfcsChange)" means take bit 0x0800 from address 0x110c, shift it 11 places to the right, then feed it to the function named "onEfcpMrfcsChange". The shift is so that the value is 1 or 0 rather than 2048 or 0. DcsBios::LED efcpMrfcs(0x110c, 0x0800, LED_PIN); Will do the same as this: void onEfcpMrfcsChange(unsigned int newValue) { if (newValue == 1) { digitalWrite(LED_PIN, HIGH); } else { digitalWrite(LED_PIN, LOW); } } DcsBios::IntegerBuffer efcpMrfcsBuffer(0x110c, 0x0800, 11, onEfcpMrfcsChange); But the second one could also be used to carry out other actions based on the newValue number.
  11. DcsBios::LED efcpMrfcs(0x110c, 0x0800, PIN); Lights an LED as an indicator for a switch input. DcsBios::IntegerBuffer efcpTrimOverrideBuffer(0x110c, 0x0004, 2, onEfcpTrimOverrideChange); Runs the code in the onEfcpTrimOverrideChange function when the switch changes. Note they're for different switches
  12. When asking questions about individual DCS-BIOS functions for a specific aircraft, PLEASE at least say WHICH aircraft it is so people can find it easily if they don't already know what it is. The DCS-BIOS version would help too. Thanks.
      • 1
      • Like
  13. On my computer, that is the full path - I have DCS on a separate SSD. E:\dcs-bios-master\Programs Get the zip from here: https://github.com/DCSFlightpanels/dcs-bios There's an installation guide here: https://github.com/DCSFlightpanels/dcs-bios/blob/master/Scripts/DCS-BIOS/doc/DCS-BIOS-FLIGHTPANELS_Install Guide.pdf
  14. It's in the dcs-bios-master\Programs folder
  15. Actionbutton might work, but I'm not sure how to use it without looking it up.
  16. Yes. Flightpanels is actively updated. Hub currently isn't.
  17. If you're using the Flightpanels fork of DCS-BIOS, it should be relatively easy to get it updated. I don't know if the Hub version can be currently.
  18. IIRC, he uses Bodnar boards for his switch and analogue inputs.
  19. DCS-BIOS keeps the switch on if the physical switch is on, and it overrides the game. I'm not sure if actionbutton would work. My plan for a similar switch is a hybrid of HID and DCS-BIOS.
  20. I powered my 487s with 5V from the arduino regulators. Connected to the 5V pin means it gets power no matter how you power the arduino. As for connecting DCS-BIOS: I regularly connect and disconnect USB-connected arduinos with no issues while a mission is running. I use the Flightpanels fork. I don't know if the connection problems are related to the Hub version.
  21. This was just suggested: https://github.com/DCSFlightpanels/dcs-bios-arduino-library/blob/master/examples/Synchronization/Synchronization.ino
  22. Should be OK. As far as I can see, the MAX487 draws a couple of mA in normal operation. As for the current the Nano can supply, the second answer here is interesting: https://arduino.stackexchange.com/questions/35121/max-current-of-vin-and-5v-pin-on-arduino-nano Because of the heat the regulator has to dissipate, you could draw more current from the Nano if you used 9V or 7V VIN. If you're running RS485 about anyway, why not run a 5V rail with it? Have a decent current regulator or two in central location(s) that you can fan cool and run 5V with the RS485 - That's how I designed my Nano breakout. I included a 4-wire RS485 bus:- 5V, GND, two signal.
  23. Are you using Hub or Flightpanels Fork? I've posted a link to this thread on the Flightpanels Discord.
  24. Looks like there are a few bugs with the throttle system: 1) The animation of the twist grip goes the wrong way. IIRC, twist right should be closed. 2) The throttle twist doesn't respond to the "both engines throttle" axis input. 3) The both engines throttle axis input doesn't work until after the engines are started. 4) The throttle idle position has no stop, meaning you can't tell where it is unless you have the prompts on. 5) The throttle needs to fully open for the engine to start (matches realistic idle position of twist fully right)
  25. Not sure if it's the case, but I would have thought the F18 displays send ASCII characters from DCS because some of them are text. This would mean the zero would be sent from DCS as 40 in decimal, one is 41 and so on. I can't see if your code accounts for that.
×
×
  • Create New...