Pavespawn Posted February 15, 2018 Posted February 15, 2018 Guys, When I copy over the code to upload the CMSP mode rotary I am unable to compile. This is what I am trying to upload: const byte cmspModePins[5] = {8_0, 9_1, 10_2, 11_3, 12_4}; DcsBios::SwitchMultiPos cmspMode("CMSP_MODE", cmspModePins, 5); I have the same problem with any other code where I have to define the position (PIN_0, PIN_1, etc.) Is there something I am not adding? Thanks. I have done some searches but I can't find an answer.
Hansolo Posted February 15, 2018 Posted February 15, 2018 It's the exact same as romeokilo explained you here; https://forums.eagle.ru/showpost.php?p=3396378&postcount=2 Remove the _0, _1, _2, _3 & _4; const byte cmspModePins[5] = {8, 9, 10, 11, 12}; DcsBios::SwitchMultiPos cmspMode("CMSP_MODE", cmspModePins, 5) You just change out the PIN_0, PIN_1 etc with what ever pins you have. An yes on a Nano you may use analog inputs as well but only 0-5, e.i. const byte cmspModePins[5] = {A0, A1, A2, A3, A4}; DcsBios::SwitchMultiPos cmspMode("CMSP_MODE", cmspModePins, 5) Will also work. Of cause you then have to wire to these pins. Caution pin 13 should preferrably be used as ouput, otherwise you may have de-solder the onboard LED. Cheers Hans 132nd Virtual Wing homepage & 132nd Virtual Wing YouTube channel My DCS-BIOS sketches & Cockpit Album
Pavespawn Posted February 16, 2018 Author Posted February 16, 2018 Thanks very much! Once again I lean on your knowledge! It compiled but still won’t work. I’ll try to figure out if it may be a bad switch or board.
Recommended Posts