Jump to content

Lowlyslows

Members
  • Posts

    96
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. https://tekcreations.space/product/f18-hornet-ufc-display-open-hornet/ you’ll need a TM1640 chip to control them.
  2. I found the correct ones from tek creations for the ODU
  3. Hello, This used to work: But due to an update on how the points are created in the F10 map and they belong to a particular unit, you can no longer do this. Would it be possible to add in a "Mark to Unit" feature of the mission editor? Not 100% sure this will fix this but regardless being able to setup a target list within the mission editor would be great. OR create a way for mission designers to load pre planned targets for the harrier to use.
  4. All, looks like this is now broken do to an update. I am trying to figure out how to make it work again.
  5. Hey all, I’m building a Harrier simpit. Looking for recommendations for what screens to use (see image). I was thinking OLED maybe but I am having a hard time finding the right size for the UFC scratchpad. Any help would be appreciated.
  6. Engines, Looks awesome! Are you willing to share your files? I just posted the F18 landing gear lever on thingiverse. Slight mod and it will work great for the Harrier build. I’ll post that once I get the mod done. https://www.thingiverse.com/thing:6077234/files Also, what axis did you use for the cursor slew?
  7. Hello, When I host a multiplayer server and we cold start F18s and follow the guidance from the deck crew to get attached to a catapult, the plane will get thrown into the air and trashed. This only happens to the guys that join my server, not me. If we start hot and are on the catapult from the start we can launch.
  8. added this to the Mods\aircraft\FA-18C\Input\FA-18C\joystick\default.lua just below line 840 Now the switch turns on and off with a single command on/off toggle switch (single pole). Now I need to figure out how to make the command to be momentary and not hold the bind. --added 1 line below 03JAN23 { down = tgp_commands.LtdrArm, up = tgp_commands.LtdrArm, cockpit_device_id = devices.TGP_INTERFACE, value_down = 1.0, value_up = 0.0, name = _('LTD/R Switch (special) - ON/OFF'), category = {_('Special For Joystick'), _('Right Console'), _('Sensor Panel')}},
  9. @No1sonuk Got the pro micro working. I thought it would help but not in this case and I think I figured out what is going on. BLUF: I need code that makes the switch act like a button press and release instead of a button press and hold. Issue is: I can only get the LTD switch to move to ARM. When I move the physical switch back from ARM to Safe, it stays at ARM. Also, I noticed something. When I use the physical switch to move the LTD game switch to ARM and then move the FLIR to STBY, the LTD electromagnet doesn't de-energize. If I use the keyboard and bind the ARM position to the S key, press the S key which moves the LTD game switch to ARM and release the S key, moving the FLIR switch to STBY will de-energize the LTD electromagnet. However, if I hold the S key down and then move the FLIR switch to STBY, the electromagnet stays energized. This leads me to believe that my physical switch is HOLDING the bind active and not allowing the logic to de-energize the electromagnet.
  10. ok, I added the code. If the right gen is OFF then the electromagnet doesn't energize. If the right gen is NORM (ON) then the electromagnet energizes when the LTD/R switch is moved up to ARM. The issue I am having now which is odd in 2 ways. 1) When I turn the right gen off the electromagnet stays energized. 2) If I shut the Main Battery OFF now with the below code, the electromagnet de-energizes. It doesn't do that with the original code, just since I added the above new code. Update 31DEC22: I swapped the generator code over to the LST switch. Works correctly. Why would the R Gen code work differently than the LST code? #define DCSBIOS_IRQ_SERIAL #include "DcsBios.h" #define Coil 6 // Magnetic coil #define ltdsw 2 #define flrsw1 5 int rGenSwState = 0; // Right Generator Switch state for use in other routines DcsBios::Switch2Pos ltdRSw("LTD_R_SW", 2); //LTD ARM/SAFE DcsBios::Switch2Pos lstNflrSw("LST_NFLR_SW", 3); //LST ON/OFF DcsBios::Switch3Pos flirSw("FLIR_SW", 4, 5); //FLIR ON/STBY/OFF void setup() { DcsBios::setup(); pinMode (Coil, OUTPUT); } void loop() { DcsBios::loop(); } //LTD Electromagnet Control void onLtdRSwChange(unsigned int altCoilValue) { switch (altCoilValue){ case 0: digitalWrite(Coil, LOW); break; case 1: int swState = digitalRead(flrsw1); if (swState == HIGH){ digitalWrite(Coil, LOW);} else if (rGenSwState == 0) { digitalWrite(Coil, LOW); } else {digitalWrite(Coil, HIGH);} break; } } DcsBios::IntegerBuffer ltdRSwBuffer(0x74c8, 0x4000, 14, onLtdRSwChange); void onRGenSwChange(unsigned int newValue) { rGenSwState = newValue; } DcsBios::IntegerBuffer rGenSwBuffer(0x74c4, 0x4000, 14, onRGenSwChange);
  11. Awesome! I’ll give it a shot tonight. cheers
  12. Ok, so I went back to the basics. I don't fully understand why we were doing the code the way you suggested and that's because I am so new to coding. But I did learn a ton! I have figured out how to make the switch state of the FLIR switch drive when the LTD/R switch can power up the electromagnet. When the FLIR is ON and the LTD/R switch is moved to ARM the electromagnet energizes. When I moved either the FLIR to STBY or the LTD/R switch to SAFE the electromagnet de-energizes. Two Things: 1) I still have no idea how to get the logic from the F18 module to drive this. The A10 with the same code I started with works just fine but the F18 doesn't for some reason. I am not any closer to figuring out how to get the LTD/R switch to move to SAFE after an auto lasing bombing run. 2) How do I get the code to read the status of something. Example would be Right Generator Control Switch set to NORM (output integer 1) which would allow the LTD/R switch to energize the electromagnet. 3) How would I tie that code into what I have that's working except for #1 above? Code below: #define DCSBIOS_IRQ_SERIAL #include "DcsBios.h" #define Coil 6 // Magnetic coil #define ltdsw 2 #define flrsw1 4 DcsBios::Switch2Pos ltdRSw("LTD_R_SW", 2); //LTD ARM/SAFE DcsBios::Switch2Pos lstNflrSw("LST_NFLR_SW", 3); //LST ON/OFF DcsBios::Switch3Pos flirSw("FLIR_SW", 4, 5); //FLIR ON/STBY/OFF void setup() { DcsBios::setup(); pinMode (Coil, OUTPUT); } void loop() { DcsBios::loop(); } //LTD Electromagnet Control void onFlirSwChange(unsigned int altCoilValue) { switch (altCoilValue){ case 0: digitalWrite(Coil, LOW); break; case 1: digitalWrite(Coil, LOW); break; case 2: int swState = digitalRead(ltdsw); if (swState == HIGH){ digitalWrite(Coil, LOW);} else {digitalWrite(Coil, HIGH);} break; } } DcsBios::IntegerBuffer flirSwBuffer(0x74c8, 0x3000, 12, onFlirSwChange);
  13. Got the INPUT_PULLUP code to work which is awesome! I'm thinking that maybe the code should see the status of all the things that effect the switch. Question is, how do I pull the status of a switch to use within an if, if else, and else statement? For example, what is the status of the FLIR switch. If it's in the correct position (ON) then allow the electromagnet to energize when the physical LTD/R is moved to ARM. If the FLIR is in STBY or OFF then the electromagnet can't energize.
  14. Woah! That INPUT_PULLUP code is awesome!
×
×
  • Create New...