Jump to content

DCS-BIOS CMSP Mode Select SwitchMultiPos Issue


Pavespawn

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...