Jump to content

Recommended Posts

Posted

Hi all, I've been working my way around the A10 panels and have reached the antenna panels 

The EGI HQ Enable toggle switch works fine, but the UHF and VFH antenna upper / lower / both switches are giving me an issue. I am trying to use an on-off-on three position toggle switch for the both, using the callouts below

DcsBios::Switch3Pos antIff("ANT_IFF", 18, 19);

DcsBios::Switch3Pos antUhf("ANT_UHF", 16, 17);

However they appear to not be recognised in game. I checked them against the old reference and they are the same

However if I use these

const byte antIffPins[2] = {18, 19};
DcsBios::SwitchMultiPos antIff("ANT_IFF", antIffPins, 2);

const byte antUhfPins[2] = {16, 17};
DcsBios::SwitchMultiPos antUhf("ANT_UHF", antUhfPins, 2);

They will go to the lower two positions - please note that the two SwitchMultiPos callouts immediately above have been modified from 3 position to 2 just for testing purposes. This works for both the A10C and A10CII, and I have tested with different hardware and pin numbers to rule out those 

So something about the Switch3Pos is incorrect. I am pretty certain I am looking at the latest version of the reference documentation but would like to know if it is just my use that is non-functioning

Cheers

Les

 

Posted

Can you try these with appropriate switch-reading code:

SendDcsBiosMessage ("ANT_IFF, "0");

SendDcsBiosMessage ("ANT_IFF, "1");  // Middle position

SendDcsBiosMessage ("ANT_IFF, "2");

DON'T put them in the code just like that - add something to choose which to send.

They should be what the 3-position switch code sends depending on switch position.

Posted (edited)

I used the sketch below to test them both, all working fine (actually rather cool watching the switches cycle though!)

#define DCSBIOS_IRQ_SERIAL
#include <DcsBios.h>

void onAcftNameChange(char* newValue) {
  // Change of Aircraft
  DcsBios::resetAllStates();
}
DcsBios::StringBuffer<24> AcftNameBuffer(0x0000, onAcftNameChange);


void setup() {
  DcsBios::setup();
}

void loop() {
sendDcsBiosMessage("ANT_IFF", "0");
delay(500);
sendDcsBiosMessage("ANT_IFF", "1");  // Middle position
delay(500);
sendDcsBiosMessage("ANT_IFF", "2");
delay(500);
sendDcsBiosMessage("ANT_UHF","0");
delay(500);
sendDcsBiosMessage("ANT_UHF","1");
delay(500);
sendDcsBiosMessage("ANT_UHF","2");
delay(500);
}

I then tried this without success

DcsBios::Switch3Pos antUhf("ANT_UHF", 4, 5);

However this worked, bearing in mind the pin 28 doesn't exist on a nano, but switching to pins 4 and 5 moved the switch in game to the correct positions using a two position toggle switch. 

const byte antUhfPins[3] = {4, 28, 5};
DcsBios::SwitchMultiPos antUhf("ANT_UHF", antUhfPins, 3);

 Changing the hardware to an on-on-on switch and the code below it works perfectly

const byte antUhfPins[3] = {4, 5, 6};
DcsBios::SwitchMultiPos antUhf("ANT_UHF", antUhfPins, 3);

Then using the exact same hardware with this code doesn't work

DcsBios::Switch3Pos antUhf("ANT_UHF", 4, 5);

So, for some reason the game or DCS Bios is not accepting the  DcsBios::Switch3Pos code for these.

Can someone lash up a switch and test it in their game with my code above? If it is working for someone else's installation I am going to have to do the nuclear option and do a complete clean install

Les

Edited by lesthegrngo
Posted
3 hours ago, lesthegrngo said:
DcsBios::Switch3Pos antUhf("ANT_UHF", 4, 5);

This line works perfectly for me.
Tested with Uno and on-off-on switch on pins 4 and 5.

Posted

Thanks for checking

I'm going to do a clean install, so the DCS World folder complete, the saved games DCS subfolder, anything else I should erase? Maybe DCS BIOS too?

Cheers

 

Les

Posted

Yes, there are some temp data:

C:\Users\...\AppData\Roaming\DCS-BIOS

C:\Users\...\AppData\Local\DCS.openbeta

C:\Users\...\AppData\Local\DCSFlightpanels_(DCSFP)

 

Regards, Vinc

Regards, Vinc

real life: Royal Bavarian Airforce

online: VJS-GermanKnights.de

[sIGPIC][/sIGPIC]

  • Recently Browsing   0 members

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