

Lowlyslows
Members-
Posts
96 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Lowlyslows
-
https://tekcreations.space/product/f18-hornet-ufc-display-open-hornet/ you’ll need a TM1640 chip to control them.
-
I found the correct ones from tek creations for the ODU
-
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.
-
All, looks like this is now broken do to an update. I am trying to figure out how to make it work again.
-
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.
-
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?
-
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.
-
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')}},
-
@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.
-
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);
-
Awesome! I’ll give it a shot tonight. cheers
-
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);
-
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.
-
Woah! That INPUT_PULLUP code is awesome!
-
I’ll try out your suggestions tonight! I was able to do some stuff this morning, see below. I was able to get the code to function with the modifications in the image. #1 I created a standard switch circuit with 10 being the input which tells the code that the switch has moved #2 I still can't figure this one out so I "removed" it from the code. #define SWITCHPIN 3 always fails #3 I had to change the code from int swState = digitalRead,SWITCHPIN; to int swState = digitalRead(10); otherwise I couldn't get the switch to function due to it failing test. Behavior: The switch in the game moves correctly as it relates to switch position when I move the physical switch. However, the "trick" no longer works and when I set the FLIR to STBY the LTD remains on ARM due to the electromagnet staying energized.
-
Ok, tried the other code. I think I am running into the same naming issue as before. Questions: 1) Is everything above line 17 correct to use this code (See image)? 2) Line 19: the switch is wired to digital pin 2 on the board and the switch completes the circuit by going to GND. Is this correct per the suggested code? Line 19 has #define SWITCHPIN 3, not 2. 3) Line 33: has the same name in it as line 19, SWITCHPIN. It's not passing the "test" if the names are the same. If I change the name on either line (19 or 33) then it passes the test but the switch doesn't move in the game. null
-
Ok, didn't realize I could change the name like that, and it makes sense that the error would pop because of it. Learning! The code works but I get exactly the same behavior using the LED code as the prior code. The game won't logically turn the physical electromagnet off if I set the physical LTD switch to ARM first. If I "trick" it by first setting the game LTD switch to ARM first and then setting the physical LTD switch to ARM, the game will logically de-energize the physical electromagnet. Going to attempt to get the other suggested code to function next!
-
With the other suggested code, I am not sure how to implement it. I assume I still need a line to define the switch so line #7 needs to be there. I am not sure what to do with line 25,26, and 30 as no matter what I try I get errors. Sorry for my noobness. I am trying to learn this stuff. null
-
When I run this code I get the attached error. Compilation error: conflicting declaration 'DcsBios::LED ltdRSw' What would cause this? Thanks for the help! null
-
Where does this live in the code? Above void setup(), in void setup(), or in void loop()?? Also, how do I tie that to a switch (physical switch)? #define DCSBIOS_IRQ_SERIAL #include "DcsBios.h" int Coil = 6; // Magnetic coil on DcsBios::Switch2Pos ltdRSw("LTD_R_SW", 2); //LTD ARM/SAFE // LTD void onLtdRSwChange(unsigned int newCoilValue) { //Controls the output of pin 6 and turns on electromagnet switch (newCoilValue){ case 0: digitalWrite(Coil, LOW); break; case 1: digitalWrite(Coil, HIGH); break; } } DcsBios::IntegerBuffer ltdRSwBuffer(0x74c8, 0x4000, 14, onLtdRSwChange); void setup() { DcsBios::setup(); pinMode (Coil, OUTPUT); } void loop() { DcsBios::loop(); }
-
The electromagnet switch works as you suggest. It’s pretty cool. Yes it springs back to SAFE(off). I am using the Switch2pos code. I learned by accident that the switch will function properly (electromagnet de-energizes) if I first set the LTD game switch to ARM (this also energizes the physical electromagnet) and then set my physical switch to ARM. Then, if I set the FLIR to STBY (in the game) the physical electromagnet will turn off and release the physical switch back to SAFE. What would that one off code look like so I can test it? Sorry to ask but I’m still learning how to do basic code like turn on an LED. Thanks for the help! Hope you had a great Christmas!
-
I put this code in the library F18 LUA on line 1112 (replace the code that's there with it): defineToggleSwitchToggleOnly2("LTD_R_SW", 62, 3002, 441, "Sensor Panel", "LTD/R Switch, ARM/SAFE") This solved the toggling issue, now I need to get the physical switch to de-energize the electromagnet with the FLIR is set to STBY or when an Auto Bombing run is finished. I have been working with these guys as well: F18 LTD/R 2position Switch Bugged · Issue #134 · DCSFlightpanels/dcs-bios (github.com)
-
All, when I use: DcsBios::Switch2Pos ltdRSw("LTD_R_SW", 10); I can get the correct switch to move. However, when I move the physical switch back the switch in the game doesn't move back. What code do I need to use?
-
flightpanels bios worked! I am now having issues figuring out the coding that I need. How are you at coding? I am trying to get a SPST switch when turned off turns the LTD in the F18 to safe. Currently I have to move it twice to do so.