Jump to content

Sting57

Members
  • Posts

    233
  • Joined

  • Last visited

Everything posted by Sting57

  1. Ok tried your idea with this DcsBios::ActionButton ltdRSwToggle("LTD_R_SW", "TOGGLE", 5); DcsBios::LED ltdRSw(0x74c8, 0x4000, 4); // my magnet is on this through a MOSFET It almost works. I have to put the ltd switch in to ARM position (the magnet comes on holding the switch in place). I then have to move the switch back to SAFE and then back into ARM. If i do that, ie switch it to ARM twice. The switch then acts as expected, ie, if I go to NAV mode or master arm to safe or FLIR to stby, the switch then snaps back to the SAFE position as expected. If I don't do it twice then its the same problem i started with, ie it never releases the switch.
  2. Interesting will try the LED idea tonight and report back. Wonder if DCSBIOS can be updated? @BlackLibrary
  3. I am using a 45 degree rotary switch and i have just wired the pins every 90 degrees and then programed this function from FP DCS BIOS const byte bleedAirKnobPins[4] = {PIN_0, PIN_1, PIN_2, PIN_3}; DcsBios::SwitchMultiPos bleedAirKnob("BLEED_AIR_KNOB", bleedAirKnobPins, 4);
  4. no luck with that code. getting exactly the same result.
  5. Thanks will try this tonight.
  6. hmm ok thats not a bad idea. Any chance you could share your code?
  7. In that vid he uses an uno Sent from my Moto G (5S) using Tapatalk
  8. Yeah that is the only thing i can think of too. I wonder how the warthog project got around that issue.
  9. Additional info. Even if the jet is cold and i switch to arm in my pit it stays on, it should not stay on at all in a cold jet.
  10. Hi all I am attempting to set up a Mag switch for the teh LAser Arm switch in the Hornet. I have been following the Warthog Projects Video on Mag switches Here is the code i ended up with based on that vid and files provided #define DCSBIOS_IRQ_SERIAL #include <DcsBios.h> #include <SPI.h> #include <Wire.h> //comm port 18 int onLtdRSw_Coil = 4; // Magnetic coil CH4 // Sensor Panel DcsBios::Switch2Pos ltdRSw("LTD_R_SW", 5); // LASER Switch Arm void onLtdRSwChange(unsigned int newCoilValue) { switch (newCoilValue){ case 0: digitalWrite(onLtdRSw_Coil, LOW); break; case 1: digitalWrite(onLtdRSw_Coil, HIGH); break; } } DcsBios::IntegerBuffer ltdRSwBuffer(0x74c8, 0x4000, 14, onLtdRSwChange); void setup() { DcsBios::setup(); pinMode (onLtdRSw_Coil, OUTPUT); } void loop() { DcsBios::loop(); } Outcome: The Switch only parital works. Once i turn the switch to arm, it does magnetize, however it will not automatically demagnatise, ie by switching the FLIR switch to stby or after a bomb has passed its time to impact (this is when the switch should return to safe). It does however work /demagnatise if i click the actual switch in the 3d cockpit back to safe. Its like once the switch has been put in the arm position, the automatic process for returning to safe don't work but the manual clicking the button does. Would love to see if any one has any ideas i might try. thanks Mike
  11. Some actual flying as opposed to building... https://youtu.be/cKAojyDVYpw Lights test https://youtu.be/JC3pMxjmGZI
  12. So awesome. Are you using 2projectors? I am currently using a 65 inch tv. Sent from my Lenovo TB-X605F using Tapatalk
  13. This turned out to be super simple. In Helios I just added the view ports (in Helios you had to install some additional patches) for the UFC and IEFI (hornet based pit). I then just set the size and location. For me i just used 1 pixel high and wide and the location to outside my viewing area. Helios simply added the 2 lines(one for each viewport) to the monitorsetup lua. Easy
  14. Like this thread......
  15. Hi all, is it a known issue that when you go to the HUD only view DCS BIOS stops sending outputs? This was on the Hub version using TekCreation IEFI and UFC.
  16. Hi mate I use Helios for all my outputs, easy to use and not mucking around with LUA files.
  17. Hey mate that is the fp fork. Sent from my Lenovo TB-X605F using Tapatalk
  18. Thanks. You mean somewhere in this line? defineToggleSwitch("SPIN_RECOVERY_COVER", 2, 3008, 139, "Map Gain/Spin Recovery Panel", "Spin Recovery Switch Cover, OPEN/CLOSE")
  19. Yes I tried the Romeokilo way for the SPIN switch on the hornet defineToggleSwitch("SPIN_RECOVERY_COVER", 2, 3008, 139, "Map Gain/Spin Recovery Panel", "Spin Recovery Switch Cover, OPEN/CLOSE") The issue was that switched worked in reverse, ie when the switch was in the centre position, the action sent to DCS was to close the cover and when the momentary was pushed (ie i closed the guard) DCS opened the cover! Any way to reverse the function?
  20. June last year i decided to make a vr pit First Cuts taking shape first time soldering.... Need to learn cable management... TekCreation Panels Side Console early build Test Fit Left Console Flood lighting test About this point I transition from VR to full pit.... DDI's AMPCD and Tekcreation UFC and IEFI in place Night lighting work has commenced How I feel when I am in it.
  21. This makes it all too easy. No mucking around with files etc
  22. Last i spoke to Tek Creation he is in the process of moving all his controllers over to the Flight Panels fork.
  23. Here is an early shot of mine and an older vid. Its all Tekcreation panels.
  24. Did you have any luck getting this to work? I was going to try these commands display.ssd1306_command(SSD1306_DISPLAYOFF); // To switch display off display.ssd1306_command(SSD1306_DISPLAYON); // To switch display back on using the MetadataEnd/_UPDATE_COUNTER
  25. Well just for future Reference and incase someone else needs this, i have this working. Full Code of an OLED Radar Alt in the Hornet #define DCSBIOS_IRQ_SERIAL #include <DcsBios.h> #include <SPI.h> #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SH110X.h> /* Uncomment the initialize the I2C address , uncomment only one, If you get a totally blank screen try the other*/ #define i2c_Address 0x3c //initialize with the I2C addr 0x3C Typically eBay OLED's #define SCREEN_WIDTH 128 // OLED display width, in pixels #define SCREEN_HEIGHT 64 // OLED display height, in pixels #define OLED_RESET -1 // QT-PY / XIAO Adafruit_SH1106G display = Adafruit_SH1106G(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); unsigned int minHeightPointer = 0; //Set Height unsigned int radarAlt = 0; //Radar Altitude unsigned int offFlag = 0; void setup() { display.begin(0x3C, true); // Address 0x3C default display.clearDisplay(); DcsBios::setup(); } void loop() { DcsBios::loop(); } void onRadaltOffFlagChange(unsigned int newValue) { offFlag=map(newValue, 0, 64355, 0 , 1); } DcsBios::IntegerBuffer radaltOffFlagBuffer(0x750c, 0xffff, 0, onRadaltOffFlagChange); //Min Height Pointer void onRadaltMinHeightPtrChange(unsigned int newValue) { if (newValue <=2034) { minHeightPointer = map(newValue, 0, 2034, 0, 1); } else if ((newValue >2034) && (newValue <=34407)) { minHeightPointer = map(newValue, 2035 , 34407, 0, 400); } else if ((newValue >34407) && (newValue <52559)) { minHeightPointer = map(newValue, 34408, 52559, 401, 1000); } else { minHeightPointer = map(newValue,52560, 64355, 1001, 5000); } display.clearDisplay(); display.clearDisplay(); display.setTextSize(2); display.setTextColor(SH110X_WHITE); display.setCursor(10,5); display.print("RADAR ALT"); display.setCursor(5,25); display.print("RAlt:"); display.setCursor(5,50); display.print("Min:"); display.setTextSize(1); display.setCursor(120,50); display.print(offFlag); display.setTextSize(2); display.setTextColor(SH110X_WHITE,SH110X_BLACK); // Draw white text on Black Background display.setCursor(70,25); display.print(radarAlt); display.setCursor(70,50); display.print(minHeightPointer); display.display(); } DcsBios::IntegerBuffer radaltMinHeightPtrBuffer(0x7508, 0xffff, 0, onRadaltMinHeightPtrChange); // Radar Altitude void onRadaltAltPtrChange(unsigned int newValue) { if (newValue <=2034) { radarAlt = map(newValue, 0, 2034, 0, 1); } else if ((newValue >2034) && (newValue <=34407)) { radarAlt = map(newValue, 2035 , 34407, 0, 400); } else if ((newValue >34407) && (newValue <52559)) { radarAlt = map(newValue, 34408, 52559, 401, 1000); } else { radarAlt = map(newValue,52560, 64355, 1001, 5000); } display.clearDisplay(); display.clearDisplay(); display.setTextSize(2); display.setTextColor(SH110X_WHITE); display.setCursor(10,5); display.print("RADAR ALT"); display.setCursor(5,25); display.print("RAlt:"); display.setCursor(5,50); display.print("Min:"); display.setTextSize(1); display.setCursor(120,50); display.print(offFlag); display.setTextSize(2); display.setTextColor(SH110X_WHITE,SH110X_BLACK); // Draw white text on Black Background display.setCursor(70,25); display.print(radarAlt); display.setCursor(70,50); display.print(minHeightPointer); display.display(); } DcsBios::IntegerBuffer radaltAltPtrBuffer(0x750a, 0xffff, 0, onRadaltAltPtrChange); I was wondering if some one could help me with the OFF flag though. What I am wanting is for the field to be blank (or a . would be fine) then when the OFF flag is on it displays the text "OFF" As it is in an int, I can't display text (string value) unsigned int offFlag = 0; void onRadaltOffFlagChange(unsigned int newValue) { offFlag=map(newValue, 0, 64355, 0 , 1); } DcsBios::IntegerBuffer radaltOffFlagBuffer(0x750c, 0xffff, 0, onRadaltOffFlagChange); display.setTextSize(1); display.setCursor(120,50); display.print(offFlag); Any ideas on how to read an int value to display a text value? Here is a quick vid of the display working. Notice the little 0 at the bottom right hand corner changes to a 1 when the value equals 64355 https://youtu.be/J5Ts5pgSdwA
×
×
  • Create New...