Jump to content

Blue73

Members
  • Posts

    473
  • Joined

  • Last visited

Everything posted by Blue73

  1. Thanks Chouclak, hello from down-under! I have a picture of it about a third of the way through this thread. If you can wait I'll upload detailed diagrams. STL's will come later. cheers John
  2. Here's the circuit I've settled on for my panels. It may came in useful for someone new to a DCS-BIOS master/slave setup. Just the standard layout with some minor tweaks. cheers John
  3. Thanks mate! I'm just now coming out of a 6 month build frenzy, taking 2 weeks break before getting back into it.
  4. It will apply to your case, if you do have any issues I'm happy to help. cheers John
  5. Not a problem Marques :) Absolutely you can use it for TACAN, though currently this only works for input types like switches, rotaries, pots, etc... Any output controls like LEDs or servos aren't supported. cheers John
  6. Thanks Nanne and very much happy to help where I can. :) cheers John
  7. Yes very true, for your controls to be seen as joysticks you need it to present as a HID. One method is to use a Leonardo but there are other plug-and-play systems many people use. This is purely using DCS-BIOS which has direct I/O messaging with DCS. cheers John
  8. cheers mate! It has felt like a long time but thanks to not having any major setbacks or obsessing too much on the finer details I've maintained the momentum to keep pushing forward. It'll be a shame when that keyboard dies, I like the G19. You can see my old BMS keyboard profile on the screen back before I discovered DCS and VR :)
  9. Thanks VampireOne for your support during the build. cheers John
  10. Thanks Dehuman for building the A-4 library.
  11. Modular Panel (WIP) : Lower Panels Completed Hi All, The final panel the SNSR panel is now complete. Next I'll be working on the front panels that span the sides and reach the desk where the keyboard current is, like in a T structure. It'll be all plastic so I'll need to conscious of the weight. VR means I wont need to see the screen. I've cut out the internal stop from within the 8 pin rotary INS switch so it can complete a full circle. I've designed the 3 position RADAR mode switch with the spring loaded pull action to activate the emergency option. cheers John
  12. Thanks for your comments Gotwake! :) I can see the dedicated pit happening one day.
  13. Hi Vinc, I cant reproduce on the F-18, it must be unique to certain control behaviors. It does makes sense to skip polling of the trigger control. Thanks. cheers John
  14. Hello fellow builders, hopefully others may find this useful. This is the code that will enable you to change the control mapping based on the aircraft loaded. I've tested it with my A-10C Fuel Panel which only has a bunch of Switch2's and a couple of POTs, but I've shown how to also use with the other switch types. I've had to add a small member function to all the DCS-BIOS input libraries to gain access to the msg_ private variable. If you want to try Unzip/Copy the attached file to your Arduino DCSBIOS library location, backup up the old one first. Location: C:\Users\<username>\Documents\Arduino\libraries\dcs-bios-arduino-library-0.2.11\src\internal dcs-bios library dynamic map.zip Sample Code below //////////////////////////////////////////////////// // // DCS-BIOS Dynamic Control Mapping based on Aircraft Type // // #define DCSBIOS_IRQ_SERIAL #include "DcsBios.h" bool g_bRun = true; //main loop control ///////////////////////////////////////////////////////// // Define Control Layout - supports input types Switch2Pos, Switch3Pos, SwitchMultiPos, ActionButton, RotaryEncoder, Potentiometer // ///////////////////////////////// // Examples // // DcsBios::Switch2Pos switch2_01("BATTERY_SW", 3); // DcsBios::Switch3Pos switch3_01("BATTERY_SW", 3,4); // // const byte pinArray[3] = {3, 4, 5}; // DcsBios::SwitchMultiPos switchM_01("BATTERY_SW", pinArray, 3); // // DcsBios::RotaryEncoder enc_01("BATTERY_SW", 3,4); // #define NUMBER_OF_CONTROLS 16 DcsBios::Switch2Pos switch2_01("UNDEF", 14); DcsBios::Switch2Pos switch2_02("UNDEF", 15); DcsBios::Switch2Pos switch2_03("UNDEF", 2); DcsBios::Switch2Pos switch2_04("UNDEF", 3); DcsBios::Switch2Pos switch2_05("UNDEF", 4); DcsBios::Switch2Pos switch2_06("UNDEF", 5); DcsBios::Switch2Pos switch2_07("UNDEF", 12); DcsBios::Switch2Pos switch2_08("UNDEF", 7); DcsBios::Switch2Pos switch2_09("UNDEF", 8); DcsBios::Switch2Pos switch2_10("UNDEF", 18); DcsBios::Switch2Pos switch2_11("UNDEF", 19); DcsBios::Switch2Pos switch2_12("UNDEF", 16); DcsBios::Switch2Pos switch2_13("UNDEF", 17); DcsBios::Switch2Pos switch2_14("UNDEF", 9); DcsBios::Potentiometer pot_01("UNDEF", 6); DcsBios::Potentiometer pot_02("UNDEF", 7); ///////////////////////////////////////////////////////// struct _controllayout_type { const char * cntrl_name[NUMBER_OF_CONTROLS]; _controllayout_type(const char *_name[] ) { for (int i = 0; i<NUMBER_OF_CONTROLS; i++ ) cntrl_name[i] = _name[i]; } void MakeCurrent() { ///////////////////////////////// // Needs to match the control map objects (DcsBios::#####) defined above // switch2_01.SetControl(cntrl_name[0]); switch2_02.SetControl(cntrl_name[1]); switch2_03.SetControl(cntrl_name[2]); switch2_04.SetControl(cntrl_name[3]); switch2_05.SetControl(cntrl_name[4]); switch2_06.SetControl(cntrl_name[5]); switch2_07.SetControl(cntrl_name[6]); switch2_08.SetControl(cntrl_name[7]); switch2_09.SetControl(cntrl_name[8]); switch2_10.SetControl(cntrl_name[9]); switch2_11.SetControl(cntrl_name[10]); switch2_12.SetControl(cntrl_name[11]); switch2_13.SetControl(cntrl_name[12]); switch2_14.SetControl(cntrl_name[13]); pot_01.SetControl(cntrl_name[14]); pot_02.SetControl(cntrl_name[15]); } }; // Example: Assign A-10 controls const char *controlnames_A10C[] = { //define all aircraft DCS-BIOS messages including unused controls (e.g. "UNDEF"), needs to have NUMBER_OF_CONTROLS elements "FSCP_BOOST_MAIN_L", //switch2_01 "FSCP_BOOST_MAIN_R", //switch2_02 "FSCP_BOOST_WING_L", //switch2_03 "FSCP_BOOST_WING_R", //switch2_04 "FSCP_TK_GATE", //switch2_05 "FSCP_CROSSFEED", //switch2_06 "FSCP_EXT_TANKS_WING", //switch2_07 "FSCP_EXT_TANKS_FUS", //switch2_08 "FSCP_AMPL", //switch2_09 "FSCP_FD_MAIN_L", //switch2_10 "FSCP_FD_MAIN_R", //switch2_11 "FSCP_FD_WING_L", //switch2_12 "FSCP_FD_WING_R", //switch2_13 "FSCP_LINE_CHECK", //switch2_14 "ALCP_RCVR_LTS", //pot_01 "UNDEF_PT_2", //pot_02 }; _controllayout_type cl_A10C(controlnames_A10C); // Example: Assign UH-1H controls const char *controlnames_UH1H[] = { "UNDEF_SW2_01", //switch2_01 "UNDEF_SW2_02", //switch2_02 "UNDEF_SW2_03", //switch2_03 "UNDEF_SW2_04", //switch2_04 "UNDEF_SW2_05", //switch2_05 "LDG_LIGHT_SW", //switch2_06 "UNDEF_SW2_07", //switch2_07 "UNDEF_SW2_08", //switch2_08 "UNDEF_SW2_09", //switch2_09 "ANTICOLL_LTS_SW", //switch2_10 "STARTER_GEN_SW", //switch2_11 "UNDEF_SW2_12", //switch2_12 "UNDEF_SW2_13", //switch2_13 "BAT_SW", //switch2_14 "BRT_CONSOLE", //pot_01 "THROTTLE" //pot_02 }; _controllayout_type cl_UH1H(controlnames_UH1H); //_controllayout_type cl_F18C; void setup() { DcsBios::setup(); } void onAcftNameChange(char* newValue) { g_bRun = false; //signal main loop to skip DcsBios::Loop delay(500); if (!strcmp(newValue, "A-10C")) { cl_A10C.MakeCurrent(); } else if (!strcmp(newValue, "UH-1H")) { cl_UH1H.MakeCurrent(); } else if (!strcmp(newValue, "FA-18C_hornet")) { //cl_F18C.MakeCurrent(); } g_bRun = true; } DcsBios::StringBuffer<16> AcftNameBuffer(0x0000, onAcftNameChange); void loop() { if ( g_bRun ) { DcsBios::loop(); } } cheers John
  15. I've bought them in bulk from China through AliExpress, and yes I have had a few that had heat issues with some that ended up destroying themselves. I didn't know the cheaper ones had a history of thermal issues. I've since installed a pull-down resistor on the RE'/DE line since I noticed I had issues mainly when removing the Arduino from the 487 for programming. I assumed it was that pin floating and going into constant transmit mode. Anyway so far no more thermal issues.
  16. Hi Andrew, I'm wondering if you can help me with the radar emergency pull switch? Mapping a pin to position 4 works but I have to in-sim pull the rotary switch first. Is there a DCS-BIOS message I can send that raises the switch? Control SNSR Panel: RADAR Switch (MW to pull), OFF/STBY/OPR/EMERG(PULL) Much appreciated. cheers John
  17. That looks great! Also looks like you've spent allot of time on your pit, fantastic!
  18. My pleasure Vinc :) Sorry for the late reply, been busy lately. I've implemented the battery switch trigger, code below for my SNSR panel. It detects a battery switch change then kicks off 10 rounds of switch synchronisation. //SNSR Panel #define DCSBIOS_RS485_SLAVE 20 #define TXENABLE_PIN 2 #include <DcsBios.h> #define DCSBIOS_IRQ_SERIAL DcsBios::Switch3Pos flirSw("FLIR_SW", 11, 12); DcsBios::Switch2Pos lstNflrSw("LST_NFLR_SW", 15); DcsBios::Switch3Pos ltdRSw("LTD_R_SW", 13, 14); #define FORCEPOLLCYCLES 10 unsigned int g_iInitIntervalCounter = 0; unsigned int g_iForcePollCycles = 0; void setup() { DcsBios::setup(); } void loop() { DcsBios::loop(); if ( g_iForcePollCycles > 0 ) { //repeat poll for this many cycles if ( ++g_iInitIntervalCounter == 0 ) { PollAllControls(); //main loop 1->65535->0 then polls g_iForcePollCycles--; } } } void onBatterySwChange(unsigned int newValue) { //Battery Switch change, start polling controls FORCEPOLLCYCLES times g_iForcePollCycles = FORCEPOLLCYCLES; } DcsBios::IntegerBuffer batterySwBuffer(0x54b6, 0x0600, 9, onBatterySwChange); void PollAllControls() { flirSw.pollInputCurrent(); lstNflrSw.pollInputCurrent(); ltdRSw.pollInputCurrent(); } cheers John
  19. Flickering over water fixed but on carrier deck still flickering.
  20. It turns out I was using someone else's library, after installing yours it does work correctly. Thanks Andrew. :)
  21. Thanks Andrew, I did try this technique but I couldn't reliably get all my buttons to sync. I've noticed when you have allot of buttons some messages are missed but caught on the next poll. I could trigger maybe a 30 second period of this from the AC change event.
×
×
  • Create New...