Jump to content

rocketeer

Members
  • Posts

    743
  • Joined

  • Last visited

Everything posted by rocketeer

  1. Hmm, according to the VAICOM manual, Always use TX6 with your own commands if you want to use the plugin’s Exposed Variables. Page 13. But then page 27 says: The AUX function on TX6 can be used for non-radio communications functions e.g. for non-VAICOM PRO commands that you added yourself. Future extension may use this node also. so future extensions may also use this node. but right now it can already be used for custom commands? but can't just press and say the word, must use this advanced exposed variables stuff? I don't even know which button on the hotas or panels is a good candidate for TX6,
  2. I have VA and Vaicom working. Chatter working. I fly the A10C. VHF AM, FM, UHF working. The manual recommends to use TX6 for self created commands. At first i tried using TX4 for custom commands. Does not work so well. 1. Which throttle button do you guys recommend for TX6? I tried button 1, the mouse button on the throttle. Then I tried speedback aft and forward. All are push buttons but Vaicom only shows the press and not the release, although i mapped both press and release for TX6. On the VAC window when you press TX1 to 4 and let go the headset icon listens for as long as you say the command and stops, the the log shows press. But for the button assigned to TX6, the log shows press, the headset listen and stop in a split second. At least for TX4 it listens for as long as you hold the press. I know we can create custom profile and daisy chain it to the main vaicom for dcs world profile. 2. But the vaicom profile itself also lets you create commands. Is one way better than the other? When i try saying the commands at the custom profile itself, it seems to recognize the words. I also trained the vaicom pro list of commands many times. And did the MS training. When daisy chained, it seems to not recognize the words so well. Then sometimes even going straight back to the custom profile it doesn't recognize the words too. For some commands I tried many variations of calling it, but still doesn't recognize them 90% of the time, even with pauses.
  3. I copied the a10c.lua file from a zip download and put it in the saved games sub folder and replaced existing file. now dcs bios works for all switches! yay. I had to edit this new lua file to fix that toggle again. Now the IFF Code dial and the audio light toggle work. OMG! thanks Han!
  4. Han, thanks for your suggestion again. I thought I have reverted back to the old lua but seems like i didn't. Guess i did that for my laptop but forgot to do so for the PC. Anyway, I can't test it right now. Two days ago I installed VoiceAttack. Got that to work and add conditions for various menu. Then installed Viacom free license. Got that to work too. But when I bought the pro license, it seemed to have broken dcs bios. Not sure how. Now all switches don't work. I'd try deleting the saved games sub folders etc. to get dcs bios working first before i can test the IFF. Thanks for your help as always.
  5. Han, thanks for the file. It works. Well sort of. First I tried on my laptop. Arduino compiled. But in DCS the turning of the knob stops at the two ends, ZERO and HOLD. When in between at A or B, the whole knob rotates CW and CCW continuously! It only stops this crazy self rotating when I hit ZERO or HOLD. Then I tried my new gaming PC. Arduino won't even compile when processor is ATmega328. It does compile when I choose the second option ATmega 328 (old bootloader). Then using Quick's Dcsbios Debug Tool, I could see the turns give out INC or DEC. But in DCS it does not rotate at all. Other toggles and the other dial would turn except this one. So one works partially on my laptop, self rotating in between A and B. The other does not work at all on the PC. And compiles only choosing old bootloader. So strange. I am not using the latest dcs bios version. i'm using dcs-bios-v0.7.1. Since all my other arduino boards and switches work, i'm afraid to change the version and screw up something.
  6. Han, thanks so much for always being prompt with reply and solutions. You said to use arduinos with ATMega328 controller. I have Megas and Nanos. The nano has ATMega328P. will that work? I tried your new code. It says fatal error: timer.h: No such file or directory I googled and import a few timer zip files into the library. All contains the timer.h file. Each time I compile it still says no such file. So now I am stuck since it can't compile. Also please let me know if I can use theNano or I need to get a pro mini/uno etc. THANKS!!!
  7. Hansolo, thanks for being patient and so helpful. :notworthy: Now as for the IFF Code Dial, i believe after we change the A10C.lua file with this line: defineTumb("IFF_CODE", 43, 3007, 199, 0.1, {0.0, 0.3}, nil, true, "IFF", "IFF Code: ZERO - B - A - (HOLD)") we are to still use your long code and not the default 2 lines dcs bios code? I have stripped away the long code for all other switches and left only the relevant code for the IFF Dial below. Did I get it right? Timer tm; int Code_dial_ingame = 1; // hold value from DCS //IFF Code: ZERO - B - A - (HOLD) void onIffCodeChange(unsigned int newValue_Code) { Code_dial_ingame = newValue_Code; } DcsBios::IntegerBuffer iffCodeBuffer(0x111a, 0xc000, 14, onIffCodeChange); void setup() { DcsBios::setup(); //Code dial inputs DDRC = B00000000; // set PINA (digital 30-37) as inputs PORTC = B11111111; // Sets (digital 30-37) with internal pull up tm.startTimer(200, setIFF); } int inputCode_dial() { int valueCode_dial; if (PINC == B11111111) { valueCode_dial = 0; //ZERO } if (PINC == B01111111) { valueCode_dial = 1; //B } if (PINC == B10111111) { valueCode_dial = 2; //A } if (PINC == B11011111) { valueCode_dial = 3; //HOLD } return valueCode_dial; } void loop() { DcsBios::loop(); tm.runTimers(); } void setIFF(int timer){ if (Code_dial_ingame < inputCode_dial()) { sendDcsBiosMessage("IFF_CODE", "INC"); } if (Code_dial_ingame > inputCode_dial()) { sendDcsBiosMessage("IFF_CODE", "DEC"); } } At the end, we are still using a rotary encoder, to rotate clockwise/anti-clockwise correct? Because I see the message for INC or DEC. Normally we would use a rotary switch, which will mean defining a multipos switch and stating how many pins. But there are only 4 positions on the IFF Code Dial, but you stated: // set PINA (digital 30-37) as inputs for DDRC and PORTC, whatever these two are? That is 8 inputs each. double of what i expected. Can you elaborate why and what for? Physically, how should I wire the switch? Am I still using a rotary encoder, that normally has only 3 legs? A rotary switch if used would be 4 legs plus the ground. Your code is too advanced for me. :wacko: This PINC, not sure what it is for. But it is B + a 8 digit number that changes by 1 or 0. and that determines the position of the dial.
  8. This is embarassing. I changed the A10C.lua file under my downloads\dcs bios folder! Because that's my idea where lua files are located. :music_whistling: Looking at your screenshot, then I realized that I should change the lua file under Saved Games subfolder. :doh: Now the IFF Audio Light Toggle switch works! It flips up and down in big swings like the other toggles. Thanks so much! :thumbup::thumbup::thumbup:
  9. Second question. The solution by Quick, edit the A10c lua file: find: define3PosTumb("IFF_OUT_AUDIO_LIGHT", 43, 3009, 301, "IFF", "IFF Out: LIGHT - OFF - AUDIO") replace: defineTumb("IFF_OUT_AUDIO_LIGHT", 43, 3009, 301, 1,{-1, 1}, nil, true,"IFF", "IFF Out: LIGHT - OFF - AUDIO") Did it work for you? In the sim, using the mouse, this toggle will flip up, down, center at about 45 degrees. Using dcs bios, flipping the physical toggle will also move the toggle in the sim up and down like 5 degrees, the movement is hardly noticeable. I edited the lua file and replaced the suggested code and it still moves a little bit only. Does the suggested code change work or am I missing a step? All other toggles in the IFF panel flip up and down to a much bigger degree as always.
  10. Thanks everyone. Hansolo, you have always been helpful to those struggling with dcs bios or the RS485 setup. Appreciate you also sharing your code for the panels. Yes the frame is from Lynx's. They are great. For the Master Mode switch i just use the default two line code and it works without problem. Question about your solution for the IFF Code switch. Normally the dcs bios code for a rotary switch is a 2 line code as a multiposition switch. Somehow this time for the IFF code switch it's not possible to be so. I see your solution is about 30-40 lines for this one switch. I guess it was necessary else you wouldn't make it so long for this one switch. Question: //Code dial inputs DDRC = B00000000; // set PINA (digital 30-37) as inputs PORTC = B11111111; // Sets (digital 30-37) with internal pull up tm.startTimer(200, setIFF); what is this internal pull up thing? is there some resistor that i need to add or just a software declaration here?
  11. It's very nice of you to share these files. Your work is just outstanding. Although I am done with my A10 pit and don't even have a CNC machine. RM, I sent you PMs twice regarding something else. Didn't get reply. Did you see my PM?
  12. Finally completed. :beer: Powered by 9 Arduino Megas and DCS Bios. Pimax headset with Vive delux audio strap Ejection seat arm handle. Spring loaded.
  13. Guys, the dcs bios code in simple or advanced mode for the IFF Dial: ZERO - B - A - (HOLD) is DcsBios::RotaryEncoder iffCode("IFF_CODE", "DEC", "INC", PIN_A, PIN_B); This dial is obviously a rotary switch. I googled and can't find any code for the rotary switch. Does one exist?
  14. This Auxiliary Landing Gear Handle. I've always thought it is a push button and just for show and non functional. Shows that I don't know the aircraft well. Spent much more time building than flying it. Now I learned that there are two parts. From DCS Bios documentation. Auxiliary Landing Gear Handle Lock Button DcsBios::Switch2Pos auxGearLock("AUX_GEAR_LOCK", PIN); Auxiliary Landing Gear Handle DcsBios::Switch2Pos auxGear("AUX_GEAR", PIN); So when the main landing gear handle fails to bring the gear down or up, we are to use this one. From trying it on the ground so far, not in the air, I observed the following: 1. push pin down to unlock gear handle 2. pull aux gear handle 3. after landing gear comes down or up, push aux gear handle back in 4. pin pops up, gear handle becomes locked Without pushing pin you can't pull the aux gear handle as it is locked. I can build the aux gear handle on rod and a push pull switch. I can make the pin with a latched push button, not the momentary type. And with dcs bios both gear handle and the unlock pin will function accordingly. But I can't make the physical pin lock the gear handle in real life. This needs to function like a car door-push a pin to lock or unlock, mechanically, not a powered door lock to complicate things. Anyone tried something like this? At minimum I can build the gear handle and pin separately via the push pull switch and latched push button, with the latter locking the former.
  15. Thanks Han for sharing this. I'd try to digest it. :thumbup:
  16. This dcs bios code for the emergency trim hat is for a rotary switch. const byte efcpEmerTrimPins[5] = {PIN_0, PIN_1, PIN_2, PIN_3, PIN_4}; DcsBios::SwitchMultiPos efcpEmerTrim("EFCP_EMER_TRIM", efcpEmerTrimPins, 5); Using the code above, it gets stuck in one position, does not move back to the center. I am using this one from digikey. it's more like 4 sets of push buttons. https://www.digikey.ca/product-detail/en/apem-inc/500-526/679-2289-ND/2063280 i can't find any code for 4 sets of push button for this switch via google. how did you guys get it to work?
  17. Not sure if the size fits, but this is 16 times cheaper than Mouser. https://www.aliexpress.com/item/AC220V-16mm-Self-reset-Momentary-push-button-switch-lamp/32481117474.html?spm=2114.search0104.3.13.28c260b5UcMKaH&ws_ab_test=searchweb0_0,searchweb201602_4_10065_10068_10890_319_10546_10059_10884_317_10548_10887_10696_321_322_10084_453_10083_454_10103_10618_10307_537_536,searchweb201603_70,ppcSwitch_0&algo_expid=207f2a78-793b-4cb1-8c84-1c103af2e6eb-4&algo_pvid=207f2a78-793b-4cb1-8c84-1c103af2e6eb With LED lamp and a choice of color and voltage.
  18. Before we had dcs bios, using keyboard encoder would be the easiest. But they are expensive. Now with dcs bios, using arduino is easy. Buying arduino boards from Aliexpress is so cheap. like $7 for a mega. I have a full A-10C cockpit, powered by 8 megas. if you were to cover all cockpit inputs, you will need many BU0386X which cost about 10x more than a mega each.
  19. I believe there is a chrome extension to view photobucket pictures.
  20. I'm out of town for a while. I'd test it when I get back. Figuring this out and getting it to work later would be pretty satisfying. Thanks, John.
  21. Two new F-16 ebay listings. https://www.ebay.com/itm/223461490741 https://www.ebay.com/itm/223461503491
  22. Wow John, you are like a DCS Bios coach! :thumbup: How I wish we have this as a course in college! It would be the most fun class and the exercises with dcs bios and arduino boards would be swell. I understand now where you got those strange lines of code. This: void onRightLouverChange(unsigned int newValue) { /* your code here */ } DcsBios::IntegerBuffer rightLouverBuffer(0x54ec, 0xffff, 0, onRightLouverChange); is from the advanced view of the Right Louver's Output type. I usually just use the simple view except when declaring multipos switch. Following your example, I looked at non functional toggle switch in the A10C's advanced view I get this for a toggle in the Antenna panel: void onAntEgihqtodChange(unsigned int newValue) { g_iForcePollCycles = FORCEPOLLCYCLES; } DcsBios::IntegerBuffer antEgihqtodBuffer(0x11bc, 0x0001, 0, onAntEgihqtodChange); The rest of your code I can just copy, except this part. DcsBios::tryToSendDcsBiosMessage("RIGHT_LOUVER", "+3200"); Right Louver you said you have declared it as an encoder. so it's declaration is DcsBios::RotaryEncoder rightLouver("RIGHT_LOUVER", "-3200", "+3200", PIN_A, PIN_B); when you send dcs bios message you used +3200 for this encoder. now if I use not an encoder but a toggle, how do i send the dcs bios message? For this switch it has several types of messages. Input fixed step message. DcsBios::RotaryEncoder antEgihqtod("ANT_EGIHQTOD", "DEC", "INC", PIN_A, PIN_B); Input set state message. const byte antEgihqtodPins[2] = {PIN_0, PIN_1}; DcsBios::SwitchMultiPos antEgihqtod("ANT_EGIHQTOD", antEgihqtodPins, 2); Input Action message. DcsBios::ActionButton antEgihqtodToggle("ANT_EGIHQTOD", "TOGGLE", PIN); Lastly Output type. void onAntEgihqtodChange(unsigned int newValue) { /* your code here */ } DcsBios::IntegerBuffer antEgihqtodBuffer(0x11bc, 0x0001, 0, onAntEgihqtodChange); In Simple View it would be just: DcsBios::Switch2Pos antEgihqtod("ANT_EGIHQTOD", PIN); so send message would be something like this? DcsBios::tryToSendDcsBiosMessage("ANT_EGIHQTOD", "TOGGLE"); I'm assuming we use the action message. I'm slowly wrapping my head around this :music_whistling:
  23. John, i'm trying to digest your code. You have 4 players. 1. A trigger pin assigned to pin 4 2. fcsBitSw - a circuit breaker. a 2pos sw both connected to slave 5 board? 3. RIGHT_LOUVER - a pot? connected to slave 5 or 20 or somewhere else? does it even matter? since it seems to be the global guy. if trigger pin toggle is flipped, send signal to right louver, the global switch then poll controls clear fcsBitSw poll on slave 5 On Slave 20 4. lstNflrSw - some toggle on sensor panel? check if right louver value changed and if so, poll controls for switches this board clear LST_NFLR_SW poll on slave 20 Did I understand the logic correctly? Questions. 1. onRightLouverChange is anything you made up for a switch state? So I say onAntEGIChange etc? IntegerBuffer rightLouverBuffer(0x54ec, 0xffff, 0, onRightLouverChange); 2. Similarly, rightLouverBuffer is a variable, i can call whateverBuffer? 3. then the values inside 0x54ec, 0xffff, 0, are these fixed? 4. DcsBios::tryToSendDcsBiosMessage("RIGHT_LOUVER", "+3200"); if this is a pot you do a +3200. what does that mean? If i check change for a global button or light or toggle then how do i say tryToSendDcsBiosMessage (?,?) i'm amazed how did you know to code all these!
  24. John, thanks so much! I'd get it a try.
×
×
  • Create New...