Jump to content
The simFlight Network Forums

Recommended Posts

Posted

So I've got an Arduino running radios etc, but I can't get it to swap the frequencies.

 

I send the code from my arduino "swapc1"

 

Lua accepts this, but I can't get the following to work.

 

Sent from Arduino: swapc1:1

  char buffer [20];
  sprintf (buffer, "%s:%d\n", name, value);
//  lcd2.setCursor(0,3);
//  lcd2.print("S:");
//  lcd2.print(buffer);
  Serial.write (buffer);

Lua Script

    if string.match (str,"swapc1:(%x)") then
	ipc.control(66444,1)
    end	

I did have a script trying to manually swap them as well, but would rather use the presets.

 

Anyone able to assist?

Posted

Hi,

 

'swapc1' would suggest you're trying to swap the COM1 radio, but 66444 does COM2. Have you tried 66372 (COM_STBY_RADIO_SWAP)?

 

Another method you could try to swap radios is writing the following byte values to offset 0x3123:

 

8: COM1 swap
4: COM2 swap
2: NAV1 swap
1: NAV2 swap

 

Paul






 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.