

GSS Rain
Members-
Posts
105 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by GSS Rain
-
How can I use a 5 bit switch with DCS Bios?
GSS Rain replied to Trounce's topic in PC Hardware and Related Software
Thanks. Glad you are looking into it. I would like to see the BCD class and Grey Code class encoders added to the DCS Bios switch.h file or maybe it belongs to the encoders.h file. P.S. I used my laptop and pulled the latest library from github, the Dcs-Bios-arduino-library-0.2.11\src\internal\switch.h all the switch classes show as below if (tryToSendDcsBiosMessage(msg_, buf)) But glad you can figure this out. -
How can I use a 5 bit switch with DCS Bios?
GSS Rain replied to Trounce's topic in PC Hardware and Related Software
Ian wrote a code that I used for the IFF panel BCD switches. It’s in the post under Home Cockpit and then the thread on IFF panel. It works great for BCD encoders that uses 4 bits but if you had 5 or 6 or more I’m sure this code could be adapted for the extra bits. Also he included a neat feature where you could select if the bits were active low “GND” , or active high “5V”. You had to comment out one of the code lines. He explains it in the IFF post. #define DCSBIOS_IRQ_SERIAL #include "DcsBios.h" namespace DcsBios { class SwitchMultiPosBCD : PollingInput { private: const char* msg_; const byte* pins_; char numberOfPins_; char lastState_; char readState() { unsigned char i; unsigned char state = 0; for (i=0; i<numberOfPins_; i++) { unsigned char j = numberOfPins_ - i - 1; state |= (digitalRead(pins_) << j); } return state; } void pollInput() { char state = readState(); if (state != lastState_) { char buf[7]; utoa(state, buf, 10); if (tryToSendDcsBiosMessage(msg_, buf)) lastState_ = state; } } public: SwitchMultiPosBCD(const char* msg, const byte* pins, char numberOfPins) : lastState_(0) { msg_ = msg; pins_ = pins; numberOfPins_ = numberOfPins; unsigned char i; for (i=0; i<numberOfPins; i++) { pinMode(pins, INPUT_PULLUP); } lastState_ = readState(); } }; } const byte iffMode1Wheel1Pins[4] = {5, 6, 7, 8}; DcsBios::SwitchMultiPosBCD iffMode1Wheel1("IFF_MODE1_WHEEL1", iffMode1Wheel1Pins, 4); void setup() { DcsBios::setup(); } void loop() { DcsBios::loop(); } -
Thanks Hans. Just saw your post. Thanks for sharing with the Flight Sim community.
-
I was wondering what were the future plans for upgrading DCS Simple Radio. DCS SR has done amazing simulation for the KY-58 Secure Voice which would not be working at all if it weren't for DCS SR. That panel is listed as non-functional in the original DCS World simulation. Also DCS Simple Radio brings out the features of the AN/AIC-18 Intercom panel, AN/AR-186 VHF, and AN/AR-164 UHF radios. I wish DCS World gave you the option to have cockpit audio (Tacan, ILS, Marker Beacon, etc) route through your headset like DCS SR does. And at the same time have your environmental sounds like engine noise, gun firing, wind, etc, go to the desktop speakers. However, I was hoping for the following upgrades for DCS Simple Radio. 1. DCS Radio to become the tool for not only Radio Simulation but for IFF transponder as well. In a future version, a fighter pilot could use their main radar to designate a target (like a trigger similar to PTT). If the target is in radio range, and if the target such as an A-10 has an IFF, then the IFF settings are sent to the corresponding fighter who designated the target. I'm not expecting DCS SR to insert graphics on the Radar Display or anything like that, just give an audio, or tone, or maybe text message of the results of the interrogation. And on the A-10 cockpit (the target), light the reply light on the IFF to show that it replied to an interrogation. Now for the interrogation to work, the fighter needs to have his IFF on and modes set, the target side needs to have his IFF on and modes set. It seems like Simple Radio is already doing much of that logic when it comes to radios. I know this maybe a lot of work to add this feature but it sure would be nice in my humble opinion. What would really be sweet to is, if that the trigger can be just a search radar lock instead of the full blown missile type radar lock. That may cut down on the missile lock warnings due to buddy spikes. So imagine a scenario where a fighter pilot reads the target's IFF settings, the first two digits may signify the mission type : Escort#1, CAP#1, CAS#3, SEAD#2, etc. The last four digits may identify the aircraft number. For example, Wingman 1, 2, 3, or 4 of that corresponding group. Something of that nature where the information of the IFF settings are given to the interrogator. Another example could be that the interrogator can see if you have your IFF set to emergency. Also the results could be no response due to it being an enemy or even friendly with his IFF off. These scenarios could help out the com's by having a player get information without having to use voice communication. 2. A-10C has an antenna panel where the pilot can select top or bottom antenna to transmit on for UHF and also for IFF. Would be cool if selecting the antenna that is pointed at the target would maybe give a slightly better range. Then that would be one more panel that would become meaningful, or functional. Thanks,
-
Good day Ian. I just wanted to mention some possible improvements for the IFF panel. 1) The Audio/Out/Light 3-position switch: When the toggle switch is operated on the hardware panel, the in game switch only moves slightly. The in game switch travels maybe 1/5 of what it should. So instead of seeing the BAT pointed to AUDIO for example, it only leans in that direction slightly. So I'm not sure if that is a DCS World issue or not. Also can't confirm at the moment if the game still sees this as a valid change of not. ( This effect also happens with the HARS Compass panel for the MAG VAR 3-position switch, and also the environmental panel for the Windshield Rain Remove 3 position switch) 2) REPLY Indicator Light : The light on the hardware panel only comes on if I use the mouse and press the push to test on the computer screen. If I use the mouse and click the AUDIO switch above, the in game REPLY light comes on, but the hardware panel does not. 3) TEST Indicator Light : The light on the hardware panel only comes on if I use the mouse and press the push to test on the computer screen. If I move the toggle switches to M-1, M-2, M-3/A, or M-C, the in game TEST light comes on, but the hardware panel does not. 3) The CODE selector dial: This rotary knob only has encoder type as the input option in the control reference document. It would be good if the control reference document also listed Multi-switch position so that you could use a standard 4 position rotary switch. I pasted the code below based on your code for BCD switches. /* IFF Panel DCS-BIOS version 0.5.5 Arduino Mega */ #define DCSBIOS_IRQ_SERIAL #include "DcsBios.h" namespace DcsBios { class SwitchMultiPosBCD : PollingInput { private: const char* msg_; const byte* pins_; char numberOfPins_; char lastState_; char readState() { unsigned char i; unsigned char state = 0; for (i=0; i<numberOfPins_; i++) { unsigned char j = numberOfPins_ - i - 1; // state |= (digitalRead(pins_[i]) << j); state |= ((digitalRead(pins_[i]) ^ 1) << j); // to invert logic } return state; } void pollInput() { char state = readState(); if (state != lastState_) { char buf[7]; utoa(state, buf, 10); if (tryToSendDcsBiosMessage(msg_, buf)) lastState_ = state; } } public: SwitchMultiPosBCD(const char* msg, const byte* pins, char numberOfPins) : lastState_(0) { msg_ = msg; pins_ = pins; numberOfPins_ = numberOfPins; unsigned char i; for (i=0; i<numberOfPins; i++) { pinMode(pins[i], INPUT_PULLUP); } lastState_ = readState(); } }; } // Mode-1 Wheel 1 const byte iffMode1Wheel1Pins[4] = {42, 43, 44, 45}; DcsBios::SwitchMultiPosBCD iffMode1Wheel1("IFF_MODE1_WHEEL1", iffMode1Wheel1Pins, 4); // Mode-1 Wheel 2 const byte iffMode1Wheel2Pins[4] = {46, 47, 48, 49}; DcsBios::SwitchMultiPosBCD iffMode1Wheel2("IFF_MODE1_WHEEL2", iffMode1Wheel2Pins, 4); // Mode-3A Wheel 1 const byte iffMode3aWheel1Pins[4] = {50, 51, 52, 53}; DcsBios::SwitchMultiPosBCD iffMode3aWheel1("IFF_MODE3A_WHEEL1", iffMode3aWheel1Pins, 4); // Mode-3A Wheel 2 const byte iffMode3aWheel2Pins[4] = {5, 4, 3, 2}; DcsBios::SwitchMultiPosBCD iffMode3aWheel2("IFF_MODE3A_WHEEL2", iffMode3aWheel2Pins, 4); // Mode-3A Wheel 3 const byte iffMode3aWheel3Pins[4] = {9, 8, 7, 6}; DcsBios::SwitchMultiPosBCD iffMode3aWheel3("IFF_MODE3A_WHEEL3", iffMode3aWheel3Pins, 4); // Mode-3A Wheel 4 const byte iffMode3aWheel4Pins[4] = {13, 12, 11, 10}; DcsBios::SwitchMultiPosBCD iffMode3aWheel4("IFF_MODE3A_WHEEL4", iffMode3aWheel4Pins, 4); // IFF Master: OFF - STBY - LOW - NORM - EMER const byte iffMasterPins[5] = {22, 23, 24, 25, 26}; DcsBios::SwitchMultiPos iffMaster("IFF_MASTER", iffMasterPins, 5); // IFF Out: LIGHT - OFF - AUDIO DcsBios::Switch3Pos iffOutAudioLight("IFF_OUT_AUDIO_LIGHT", 27, 28); // Test M-1 DcsBios::Switch3Pos iffTestM1("IFF_TEST_M1", 29, 30); // Test M-2 DcsBios::Switch3Pos iffTestM2("IFF_TEST_M2", 31, 32); // Test M-3 DcsBios::Switch3Pos iffTestM3("IFF_TEST_M3", 33, 34); // Test M-4 DcsBios::Switch3Pos iffTestM4("IFF_TEST_M4", 35, 36); // RAD Test/Mon DcsBios::Switch3Pos iffRadtest("IFF_RADTEST", 37, 38); // IFF On/Out DcsBios::Switch2Pos iffOnOut("IFF_ON_OUT", 39); // IFF MIC/IDENT (typo in Referecnce DOC, says RAD Test/Mon in bold on left side of page, but correct name on right side) DcsBios::Switch3Pos iffMicIdent("IFF_MIC_IDENT", 40, 41); // REPLY Push to Test DcsBios::LED iffReplyTest(0x1128, 0x8000, A1); // TEST Push to Test DcsBios::LED iffTestTest(0x112a, 0x0040, A0); void setup() { DcsBios::setup(); } void loop() { DcsBios::loop(); } Thanks for your hard work.
-
Thanks Tarres, your guidance was spot on. I added the changes and it works like a champ.
-
Thanks Hans.
-
Thanks Hans. I tried google the part number with no luck. Maybe 36555 is the Cage code but it turns up as LITTELL F J MACHINE CO. Website was no help. I was going to mention this as one of the possible improvements for the IFF. That section of code doesn't list the multi switch type as an option. I'm not at my computer but I think it just listed an encoder type. Seeing that you can add those scripts on the fly like Ian did for the BCD, I was going to try and add it. My problem is I just have a regular rotary switch and was going to forgo the momentary in Hold position and the pull up to get to the zero position. My other option was to find the real switch which I was thinking was some kind of encoder. But it be nice that if you could pick regular multi switch for the zero A B Hold mode switch in DCS-BIOS.
-
I need help from one of the smart software guys. My background is electrical so I will struggle with this part a bit. For the A-10C, AN/ARC-186(V) volume knob is device 133, AN/ARC-164 UHF volume knob is device 171, and AN/ARC-186(V)FM volume knob is device 147. How did you find out the device IDs for the A-10C cockpit panels? What would be the AN/AIC-18 VHF_AM volume knob device ID? What would be the AN/AIC-18 UHF volume knob device ID? What would be the AN/AIC-18 VHF_FM volume knob device ID? What would be the AN/AIC-18 Master volume knob device ID? To know if the channel is enabled or disabled by the AN/AIC-18, each volume knob has a built in push pull switch. What would be the SR.getButtonPosition(???) number for each of the three knobs. Meaning AN/AIC-18 VHF_AM (In/Out), AN/AIC-18 UHF (In/Out), and AN/AIC-18 VHF_FM (In/Out)? Lastly, for example VHF_AM, we need to modify the volume line to say: _data.radios[2].volume = SR.getRadioVolume(device_ID_1) x SR.getRadioVolume(device_ID_2) x SR.getRadioVolume(device_ID_3) x SR.getButtonPosition(device_ID_4) But of course write it the correct way to multiply four functions together. Not sure if the argument structure would be f(AxBxCxD) or f(A)xf(B)xf©xf(D) or whatever. :-( Three of the functions have a continuous range from 0.0 to 1.0 but I figure it still should multiply with a discrete value that will be either a 1 or 0 to achieve the ON/OFF effect. Thanks,
-
Yes, DCS-BIOS is looking good. There is a bug in DCS World I think. If you press the M-1, M-2, M-3, or M-4 switch up and hold it , the TEST light comes on as it should. But if you then press the push to test feature, the light turns off. In short, if the light is already on, pressing the push to test turns it off where it should just remain on. But that is minor. There were a few minor isssues I saw with DCS-BIOS as well. For example, if I take my mouse and go in the game and press the Push to Test by clicking and hold, DCS-BIOS lights the indicator on the hardware panel which is normal and it matches the simulation. However, if I take the M-1 switch and press it up, the Test light in the game comes on, but the light on my panel does not. DCs-BIOS lights the light only when the Push to Test is active, but it doesn't light the light for the other conditions like the M-1 thru M4 switches and there was one more switch, I think the Auido/Out/Light switch. There was a few more things but when I get home I was going to write up a more detailed report on the IFF panel. Say Hans, since you have the real IFF, I was wondering if you had a vernier calipers where you could tell me the dimensions of the rotary knobs. Like diameter of the circle, total knob hieght, and width of the grip part. Also the partnumber of the zero mode switch. I suspect it's a Grayhill mechanical encoder. Maybe 26 PTT series. Thanks Hans.
-
I re-booted the test bench PC and the issue went away. I can run the old and new connect-serial-Port and they both start up on the first try with the 2 sec delay. Well the old version was modified to put in the 2 sec delay. So I'm thinking it was something with my PC. Thanks
-
Just finished some testing of the BCD code. It works great. Yes I had to use the inverted line. I just like the amount of detail you can do with DCS-BIOS. The simulator is really coming together. I have big plans for my IFF panel. Just wait and see. :-) Take care Ian. Thanks.
-
That's awesome Ian. I'm not home at the moment but can't wait to try this new feature. When you think about it, that is a lot of devices DCS-BIOS covers. This puts major manufacturer's stuff in play like thumbwheels and Grayhill mechanical encoders. The possibilities are truly stunning.
-
I will change the timeout from 2 seconds to 3 seconds and try the new file that way. I noticed this on my test bench computer. But the other computer that runs the simulator, I think that one was fine. I copied over the old socat files (some modified with 3 sec delay) and they run as normal. But the test bench computer, if I run the old socat file it just freezes after the count down. So I switched to the new socat with v0.5.5 and use that file. But I have to do the procedure in the post above to get it to work. I'll run some more test. If I have no luck I'll try a re-install on the test bench computer. I'll keep you posted. Thanks Ian.
-
The thumb wheels that I have for the IFF panel are BCD output type. 0000 = Display 0 0001 = Display 1 0010 = Display 2 0011 = Display 3 etc. I was trying to write code to make the conversion. DCS-BIOS for thumb wheel is rotary switch. So I figure that a switch just returns a HIGH or a LOW. So I wanted to substitute a variable name for this. But some of my problems were if I have a variable name, how do I assign it the data type HIGH or LOW? The closest I saw was data type boolean. Needless to say, I tried different approaches but I can't even get it to hard code a value to display it. I'm looking for the smart software guy to point me in the right direction to convert BCD to something I can insert into the SwitchMultiPos function and have it still work. Thanks. /* IFF Panel DCS-BIOS version 0.5.5 Arduino Mega */ #define DCSBIOS_IRQ_SERIAL #include "DcsBios.h" /* BCD IN = DATA SENT TO DCS-BIOS * 0000 = 10000000 FOR 0 * 0001 = 01000000 FOR 1 * 0010 = 00100000 FOR 2 * 0011 = 00010000 FOR 3 * 0100 = 00001000 FOR 4 * 0101 = 00000100 FOR 5 * 0110 = 00000010 FOR 6 * 0111 = 00000001 FOR 7 * 1000 = 00000001 FOR 7 * 1001 = 00000001 FOR 7 */ // Define and initiallize output varable to DCS-BIOS // Only one will be LOW at a given time, the rest are HIGH, just like a rotary switch. // Thumbwheel 1 byte Wheel_1_0 = LOW; byte Wheel_1_1 = HIGH; byte Wheel_1_2 = HIGH; byte Wheel_1_3 = HIGH; byte Wheel_1_4 = HIGH; byte Wheel_1_5 = HIGH; byte Wheel_1_6 = HIGH; byte Wheel_1_7 = HIGH; // Thumbwheel 2 byte Wheel_2_0 = HIGH; byte Wheel_2_1 = LOW; byte Wheel_2_2 = HIGH; byte Wheel_2_3 = HIGH; // Thumbwheel 3 byte Wheel_3_0 = HIGH; byte Wheel_3_1 = HIGH; byte Wheel_3_2 = LOW; byte Wheel_3_3 = HIGH; byte Wheel_3_4 = HIGH; byte Wheel_3_5 = HIGH; byte Wheel_3_6 = HIGH; byte Wheel_3_7 = HIGH; // Thumbwheel 4 byte Wheel_4_0 = HIGH; byte Wheel_4_1 = HIGH; byte Wheel_4_2 = HIGH; byte Wheel_4_3 = LOW; byte Wheel_4_4 = HIGH; byte Wheel_4_5 = HIGH; byte Wheel_4_6 = HIGH; byte Wheel_4_7 = HIGH; // Thumbwheel 5 byte Wheel_5_0 = HIGH; byte Wheel_5_1 = HIGH; byte Wheel_5_2 = HIGH; byte Wheel_5_3 = HIGH; byte Wheel_5_4 = LOW; byte Wheel_5_5 = HIGH; byte Wheel_5_6 = HIGH; byte Wheel_5_7 = HIGH; // Thumbwheel 6 byte Wheel_6_0 = HIGH; byte Wheel_6_1 = HIGH; byte Wheel_6_2 = HIGH; byte Wheel_6_3 = HIGH; byte Wheel_6_4 = HIGH; byte Wheel_6_5 = LOW; byte Wheel_6_6 = HIGH; byte Wheel_6_7 = HIGH; void setup() { DcsBios::setup(); pinMode (42, INPUT); // BCD 1 WHEEL 1 pinMode (43, INPUT); // BCD 2 WHEEL 1 pinMode (44, INPUT); // BCD 4 WHEEL 1 pinMode (45, INPUT); // BCD 8 WHEEL 1 pinMode (46, INPUT); // BCD 1 WHEEL 2 pinMode (47, INPUT); // BCD 2 WHEEL 2 pinMode (48, INPUT); // BCD 4 WHEEL 2 pinMode (49, INPUT); // BCD 8 WHEEL 2 pinMode (50, INPUT); // BCD 1 WHEEL 3 pinMode (51, INPUT); // BCD 2 WHEEL 3 pinMode (52, INPUT); // BCD 4 WHEEL 3 pinMode (53, INPUT); // BCD 8 WHEEL 3 pinMode (2, INPUT); // BCD 1 WHEEL 4 pinMode (3, INPUT); // BCD 2 WHEEL 4 pinMode (4, INPUT); // BCD 4 WHEEL 4 pinMode (5, INPUT); // BCD 8 WHEEL 4 pinMode (6, INPUT); // BCD 1 WHEEL 5 pinMode (7, INPUT); // BCD 2 WHEEL 5 pinMode (8, INPUT); // BCD 4 WHEEL 5 pinMode (9, INPUT); // BCD 8 WHEEL 5 pinMode (10, INPUT); // BCD 1 WHEEL 6 pinMode (11, INPUT); // BCD 2 WHEEL 6 pinMode (12, INPUT); // BCD 4 WHEEL 6 pinMode (13, INPUT); // BCD 8 WHEEL 6 digitalWrite(42, HIGH); // Turn on pullup resistor digitalWrite(43, HIGH); // Turn on pullup resistor digitalWrite(44, HIGH); // Turn on pullup resistor digitalWrite(45, HIGH); // Turn on pullup resistor digitalWrite(46, HIGH); // Turn on pullup resistor digitalWrite(47, HIGH); // Turn on pullup resistor digitalWrite(48, HIGH); // Turn on pullup resistor digitalWrite(49, HIGH); // Turn on pullup resistor digitalWrite(50, HIGH); // Turn on pullup resistor digitalWrite(51, HIGH); // Turn on pullup resistor digitalWrite(52, HIGH); // Turn on pullup resistor digitalWrite(53, HIGH); // Turn on pullup resistor digitalWrite(2, HIGH); // Turn on pullup resistor digitalWrite(3, HIGH); // Turn on pullup resistor digitalWrite(4, HIGH); // Turn on pullup resistor digitalWrite(5, HIGH); // Turn on pullup resistor digitalWrite(6, HIGH); // Turn on pullup resistor digitalWrite(7, HIGH); // Turn on pullup resistor digitalWrite(8, HIGH); // Turn on pullup resistor digitalWrite(9, HIGH); // Turn on pullup resistor digitalWrite(10, HIGH); // Turn on pullup resistor digitalWrite(11, HIGH); // Turn on pullup resistor digitalWrite(12, HIGH); // Turn on pullup resistor digitalWrite(13, HIGH); // Turn on pullup resistor } // IFF Code: ZERO - B - A - (HOLD) // Need to find the right Grayhill mechanical encoder // No code for regular rotary switch // IFF Master: OFF - STBY - LOW - NORM - EMER const byte iffMasterPins[5] = {22, 23, 24, 25, 26}; DcsBios::SwitchMultiPos iffMaster("IFF_MASTER", iffMasterPins, 5); // IFF Out: LIGHT - OFF - AUDIO DcsBios::Switch3Pos iffOutAudioLight("IFF_OUT_AUDIO_LIGHT", 27, 28); // Test M-1 DcsBios::Switch3Pos iffTestM1("IFF_TEST_M1", 29, 30); // Test M-2 DcsBios::Switch3Pos iffTestM2("IFF_TEST_M2", 31, 32); // Test M-3 DcsBios::Switch3Pos iffTestM3("IFF_TEST_M3", 33, 34); // Test M-4 DcsBios::Switch3Pos iffTestM4("IFF_TEST_M4", 35, 36); // RAD Test/Mon DcsBios::Switch3Pos iffRadtest("IFF_RADTEST", 37, 38); // IFF On/Out DcsBios::Switch2Pos iffOnOut("IFF_ON_OUT", 39); // IFF MIC/IDENT (typo in Referecnce DOC, says RAD Test/Mon in bold on left side of page, but correct name on right side) DcsBios::Switch3Pos iffMicIdent("IFF_MIC_IDENT", 40, 41); // Mode-1 Wheel 1 // BCD in on pins 42, 43, 44, 45 const byte iffMode1Wheel1Pins[8] = {Wheel_1_0, Wheel_1_1, Wheel_1_2, Wheel_1_3, Wheel_1_4, Wheel_1_5, Wheel_1_6, Wheel_1_7}; DcsBios::SwitchMultiPos iffMode1Wheel1("IFF_MODE1_WHEEL1", iffMode1Wheel1Pins, 8); // Mode-1 Wheel 2 // BCD in on pins 46, 47, 48, 49 const byte iffMode1Wheel2Pins[4] = {Wheel_2_0, Wheel_2_1, Wheel_2_2, Wheel_2_3}; DcsBios::SwitchMultiPos iffMode1Wheel2("IFF_MODE1_WHEEL2", iffMode1Wheel2Pins, 4); // Mode-3A Wheel 1 // BCD in on pins 50, 51, 52, 53 const byte iffMode3aWheel1Pins[8] = {Wheel_3_0, Wheel_3_1, Wheel_3_2, Wheel_3_3, Wheel_3_4, Wheel_3_5, Wheel_3_6, Wheel_3_7}; DcsBios::SwitchMultiPos iffMode3aWheel1("IFF_MODE3A_WHEEL1", iffMode3aWheel1Pins, 8); // Mode-3A Wheel 2 // BCD in on pins 2, 3, 4, 5 const byte iffMode3aWheel2Pins[8] = {Wheel_4_0, Wheel_4_1, Wheel_4_2, Wheel_4_3, Wheel_4_4, Wheel_4_5, Wheel_4_6, Wheel_4_7}; DcsBios::SwitchMultiPos iffMode3aWheel2("IFF_MODE3A_WHEEL2", iffMode3aWheel2Pins, 8); // Mode-3A Wheel 3 // BCD in on pins 6, 7, 8, 9 const byte iffMode3aWheel3Pins[8] = {Wheel_5_0, Wheel_5_1, Wheel_5_2, Wheel_5_3, Wheel_5_4, Wheel_5_5, Wheel_5_6, Wheel_5_7}; DcsBios::SwitchMultiPos iffMode3aWheel3("IFF_MODE3A_WHEEL3", iffMode3aWheel3Pins, 8); // Mode-3A Wheel 4 // BCD in on pins 10, 11, 12, 13 const byte iffMode3aWheel4Pins[8] = {Wheel_6_0, Wheel_6_1, Wheel_6_2, Wheel_6_3, Wheel_6_4, Wheel_6_5, Wheel_6_6, Wheel_6_7}; DcsBios::SwitchMultiPos iffMode3aWheel4("IFF_MODE3A_WHEEL4", iffMode3aWheel4Pins, 8); /* // REPLY Push to Test DcsBios::Switch2Pos iffReplyTest("IFF_REPLY_TEST", PIN); DcsBios::LED iffReplyTest(0x1128, 0x8000, PIN); // TEST Push to Test DcsBios::Switch2Pos iffTestTest("IFF_TEST_TEST", PIN); DcsBios::LED iffTestTest(0x112a, 0x0040, PIN); */ void loop() { DcsBios::loop(); if (digitalRead(45) == HIGH && digitalRead(44) == HIGH && digitalRead(43) == HIGH && digitalRead(42) == HIGH) { Wheel_1_0 = LOW; // Display 0 Wheel_1_1 = HIGH; Wheel_1_2 = HIGH; Wheel_1_3 = HIGH; Wheel_1_4 = HIGH; Wheel_1_5 = HIGH; Wheel_1_6 = HIGH; Wheel_1_7 = HIGH; } else if (digitalRead(45) == HIGH && digitalRead(44) == HIGH && digitalRead(43) == HIGH && digitalRead(42) == LOW) { Wheel_1_0 = HIGH; Wheel_1_1 = LOW; // Display 1 Wheel_1_2 = HIGH; Wheel_1_3 = HIGH; Wheel_1_4 = HIGH; Wheel_1_5 = HIGH; Wheel_1_6 = HIGH; Wheel_1_7 = HIGH; } else if (digitalRead(45) == HIGH && digitalRead(44) == HIGH && digitalRead(43) == LOW && digitalRead(42) == HIGH) { Wheel_1_0 = HIGH; Wheel_1_1 = HIGH; Wheel_1_2 = LOW; // Display 2 Wheel_1_3 = HIGH; Wheel_1_4 = HIGH; Wheel_1_5 = HIGH; Wheel_1_6 = HIGH; Wheel_1_7 = HIGH; } else if (digitalRead(45) == HIGH && digitalRead(44) == HIGH && digitalRead(43) == LOW && digitalRead(42) == LOW) { Wheel_1_0 = HIGH; Wheel_1_1 = HIGH; Wheel_1_2 = HIGH; Wheel_1_3 = LOW; // Display 3 Wheel_1_4 = HIGH; Wheel_1_5 = HIGH; Wheel_1_6 = HIGH; Wheel_1_7 = HIGH; } else if (digitalRead(45) == HIGH && digitalRead(44) == LOW && digitalRead(43) == HIGH && digitalRead(42) == HIGH) { Wheel_1_0 = HIGH; Wheel_1_1 = HIGH; Wheel_1_2 = HIGH; Wheel_1_3 = HIGH; Wheel_1_4 = LOW; // Display 4 Wheel_1_5 = HIGH; Wheel_1_6 = HIGH; Wheel_1_7 = HIGH; } else if (digitalRead(45) == HIGH && digitalRead(44) == LOW && digitalRead(43) == HIGH && digitalRead(42) == LOW) { Wheel_1_0 = HIGH; Wheel_1_1 = HIGH; Wheel_1_2 = HIGH; Wheel_1_3 = HIGH; Wheel_1_4 = HIGH; Wheel_1_5 = LOW; // Display 5 Wheel_1_6 = HIGH; Wheel_1_7 = HIGH; } else if (digitalRead(45) == HIGH && digitalRead(44) == LOW && digitalRead(43) == LOW && digitalRead(42) == HIGH) { Wheel_1_0 = HIGH; Wheel_1_1 = HIGH; Wheel_1_2 = HIGH; Wheel_1_3 = HIGH; Wheel_1_4 = HIGH; Wheel_1_5 = HIGH; Wheel_1_6 = LOW; // Display 6 Wheel_1_7 = HIGH; } else if (digitalRead(45) == HIGH && digitalRead(44) == LOW && digitalRead(43) == LOW && digitalRead(42) == LOW) { Wheel_1_0 = HIGH; Wheel_1_1 = HIGH; Wheel_1_2 = HIGH; Wheel_1_3 = HIGH; Wheel_1_4 = HIGH; Wheel_1_5 = HIGH; Wheel_1_6 = HIGH; Wheel_1_7 = LOW; // Display 7 } else if (digitalRead(45) == LOW && digitalRead(44) == HIGH && digitalRead(43) == HIGH && digitalRead(42) == HIGH) { Wheel_1_0 = HIGH; Wheel_1_1 = HIGH; Wheel_1_2 = HIGH; Wheel_1_3 = HIGH; Wheel_1_4 = HIGH; Wheel_1_5 = HIGH; Wheel_1_6 = HIGH; Wheel_1_7 = LOW; // Display 7 } else if (digitalRead(45) == LOW && digitalRead(44) == HIGH && digitalRead(43) == HIGH && digitalRead(42) == LOW) { Wheel_1_0 = HIGH; Wheel_1_1 = HIGH; Wheel_1_2 = HIGH; Wheel_1_3 = HIGH; Wheel_1_4 = HIGH; Wheel_1_5 = HIGH; Wheel_1_6 = HIGH; Wheel_1_7 = LOW; // Display 7 } else { // Do nothing } }
-
I'm posting this new issue here because maybe its related or similar existing topic?? Not sure If I should start new thread or look for existing thread with same topic. [DCS-BIOS v0.5.5] When I execute the connect-serial-port file to open up the com port it freezes. It does this every time when I first go to use it. The work around I found was to drop in the old file from before in the same directory as the new file. I run the old file and it freezes. I then close the old file and then run the new file. The new file now works as it should. I made a video and a little report to better capture the details of issue. Discrepancy Report :A10C-DR002 https://drive.google.com/open?id=0B4xdTr8IidWTbGZfTERxTFhQM1k Short Video Problem demo at minute 1:25 mark. I'm not sure if anybody else experience that but just wanted to bring it to your attention. Thanks,
-
Looking very good Hans. I like how you used the aircraft toggle switches so you get the right feel as it would be in the real A-10C.
-
Good Day Ian. This is in regards to the Emergency Flight Control Panel's Trim Hat Switch. I can trim the aircraft with the HOTAS Trim hat switch. However, if I enable Trim Override and use the Trim Hat switch on the Emergency Flight Control Panel, it does not work when using DCS-Bios. I create a short video of the event and also a more detailed report of what was happening. https://drive.google.com/drive/folders/0B4xdTr8IidWTbGZfTERxTFhQM1k?usp=sharing Problem starts at minute mark 1:25. Thanks,
-
DCS Simple Radio and the A-10C. Mr. Fisher, great work on Simple Radio. I would like to make a suggestion for the A-10C. Currently DCS Simple Radio doesn't take into account the settings on the AN/AIC-18 Intercom Panel. That panel would not block the pilot from transmitting when hitting the HOTAS push to talk, but I think you should be able to block incoming reception by muting the VHF_AM, VHF_FM, or UHF radio by push/pulling that knob for that channel. Also the individual volume knobs as well as the master volume knob on the AIC-18 does not have any affect on the audio level in DCS Simple Radio. Implementing the AN/AIC-18 for the A-10C would make using the radio more complicated, but more realistic. For example, for max VHF_AM volume heard through your headset: 1. ARC-186 VHF_AM Volume knob set to max. 2. AN/AIC-18 Intercom VHF_AM volume knob set to max. 3. AN/AIC-18 Intercom Master Volume set to max. 4. AN/AIC-18 Intercom VHF_AM (Enable/Disable) set to Enable, otherwise its muted. 5. Assuming all other factors are set correctly like proper frequency, radios powered, etc. This would mean a lot to sim pit builders as it increases the realistic use of the hardware panels.
-
Multicrew Tanker with a Human Boom Operator
GSS Rain replied to MegOhm_SD's topic in DCS Core Wish List
Any links to stated thread ? -
Thanks Hans. Those Max487 chips came in the other day. I like your cable selection. Instead of buying expensive data bus cable, some use CAT5 network cable. You can pick-up Ethernet cable at your local retail store and a lot of brands are 100 ohm impedance which is close to what EIA-485 spec is looking for. http://discountcablesusa.com/ethernet-cables100.html But yeah that looks way cool. Definitely the way to go and it sounds like you have them working using the Arduino Nano too.
-
Great work Patriot. Looks superb.
-
The code below ended up working best for me. I took your timeout line and added it to the connect-serial-port original file. I execute about 30 of them and added the new line only to the one the Mega is on. In the mean time I've ordered some MAX487 chips to prepare for DCS BIOS 2.0. Wish I could have edited the title of this thread to include Arduino Mega USB Com fix. Thanks. REM Specify the number of the COM port your Arduino is connected to: set COMPORT=9 set /A TTYNUM=%COMPORT%-1 mode COM%COMPORT% BAUD=250000 PARITY=N DATA=8 STOP=1 TO=off DTR=on timeout 3 socat\socat -v UDP4-RECV:5010,ip-add-membership=239.255.50.10:127.0.0.1,reuseaddr!!udp-sendto:localhost:7778 /dev/ttyS%TTYNUM% pause
-
For the hat switch, a APEM inc, 500-526 series switch for $35 brand new may work. https://www.digikey.com/product-detail/en/apem-inc/500-526/679-2289-ND/2063280
-
It may take a few clicks to get it work. But was figuring a longer delay was the answer. What I'm still unclear on is operating them simultaneously. I haven't tried this yet but what I usually do is assign a com port number in the script then save the script with that specific com name. I usually make com3 to say com40. Under this new script, if I execute say com 9 and then after it starts I execute com 11, will they both run? I don't use a single script to open more than one com port at the moment. Reason being is when you running more than 30, I visually check each one as it comes online rather than trying to figure out later which one didn't come on. Loose USB connector for example. Thanks again.