Need help with Magneto LVAR

Post any technical issues here. This forum gets priority from our staff.
new reply
jclay13
Senior Airman
Posts: 197
Joined: 02 Aug 2014, 23:05
Location: Iowa

Need help with Magneto LVAR

Post by jclay13 »

I'm using the latest version of FSUIPC for FSX and have a MACRO to change the LVARS for the C182. I have numerous ones that work for various switches and light switches but trying to create one for the MAGNETO and cannot get it to work.

Here is the variable and values from the A2A Variable List:
(L:Magnetos1,enum)
-starter key (0–Off; 1–Right; 2–Left; 3–Both; 4–Start)
Settable

From the FSUIPC manual the format in the MACRO is:
N=L:name=ACTION
Where ACTION must be one of: Set, Inc, Dec, Sbits, Cbits, Cyclic or Toggle (only the first 3 letters are needed):
I've provided the definitions down below.

Here is what I have in the Macro:
1=L:Magnetos1=Set,0
2=L:Magnetos1=Set,1
3=L:Magnetos1=Set,2
4=L:Magnetos1=Set,3
5=L:Magnetos1=Set,4


I've tried every ACTION also and cannot get it to work. Any help would be appreciated!



Set
copies the parameter in the Macro invocation to the identified Lvar. Alternatively, a value can be given explicitly here, by “Set,n”. Values are limited to the normal parameter range, –32768 to 32767.
Inc
increments the value, and here the parameter (explicit or supplied) gives the upper limit, which can be equalled but not exceeded.
Dec
decrements the value, with the parameter setting the lower limit.
Sbits
sets bits into the value, assuming it is a 32-bit integer, according to the parameter (i.e OR's the parameter into the value).
Cbits
clears bits from the value, assuming it is a 32-bit integer, according to the parameter (i.e AND's the value with the inverse of the parameter).
Cyclic
is the same as Inc, but after the limit is reached the next value is 0.
Toggle
changes the value to zero if it is non-zero, or 1 if it is zero.

MarcE
Senior Master Sergeant
Posts: 1652
Joined: 27 Jun 2009, 03:39
Location: Southern Germany
Contact:

Re: Need help with Magneto LVAR

Post by MarcE »

Why don‘t you simply use LINDA?

https://www.avsim.com/forums/forum/427-linda-downloads/

Under „available aircraft modules“ there is one for the 182

User avatar
Nick - A2A
A2A Captain
Posts: 13734
Joined: 06 Jun 2014, 13:06
Location: UK

Re: Need help with Magneto LVAR

Post by Nick - A2A »

Hello Jon,

LINDA is certainly one option, but another approach is to simply use the A2A C182 input configurator or the default FSUIPC magneto commands. The technique which works best for you will depend on the type of physical switch that you're using, so if you can give us a bit more info on your hardware, we can probably help to point you in the right direction.

Thanks,
Nick
A2A Simulations Inc.

jclay13
Senior Airman
Posts: 197
Joined: 02 Aug 2014, 23:05
Location: Iowa

Re: Need help with Magneto LVAR

Post by jclay13 »

Nick - A2A wrote: 07 May 2021, 14:54 Hello Jon,

LINDA is certainly one option, but another approach is to simply use the A2A C182 input configurator or the default FSUIPC magneto commands. The technique which works best for you will depend on the type of physical switch that you're using, so if you can give us a bit more info on your hardware, we can probably help to point you in the right direction.

Thanks,
Nick
Hi Nick,

It's for the Honeycomb Alpha Yoke. As you may know, it has more than 32 buttons with 3 of the 5 Starter Switch positions greater than 32 which causes a challenge. Only OFF (31) and RIGHT (32) is visible in the Windows Control Properties for Game Controllers.

I first tried the A2A C182 input configurator but it's not recognizing all of the buttons on the Honeybomb Alpha Starter Switch. It shows OFF and RIGHT as (31), LEFT as (32), BOTH as (33), and START as (34). In addition, the A2A C182 input configurator has Magneto Inc. and Magneto Dec. which doesn't work for a FIVE button starter switch unless I'm overlooking something.

I then switched to using the Honeycomb Configurator for FSXSE and created Press Events with Variables set to MAGNETO_OFF, MAGNETO_RIGHT, MAGNETO_LEFT, MAGNETO_BOTH, MAGNETO_START. With that, the switch cycles from OFF all the way to START and back to BOTH. When I move the Honeycomb switch from BOTH to LEFT though, the 182 switch stays in the BOTH postion. If I move the Honeycomb switch to RIGHT, the 182 switch moves again, but it's behind a position and moves to LEFT. Then when I move the Honeycomb switch to OFF, the 182 switch is at RIGHT. No matter what combination of Press Events and Release Events I try, the 182 switch is always off by one position.

Since A2A aircraft use their own variables, I decided to try CUSTOM VARS in the Honeycomb Configurator with the key of L and set the Value to what the A2A docs show. Switch doesn't move at all in the 182 so that was a bust.

I've also tried FSUIPC and it recognizes all of the switch postions on the Honeycomb Alpha starter switch and used the default FSUIPC magneto commands but once again, the 182 switch is stuck in certain postions.

Finally, I tried using my exising FSUIPC MACRO that I have setup and working for the C182 to control numerous other switches and tried setting the LVARs in it but it's not working either and why I reached out to see if I was not doing that correctly.

I can try LINDA, but with all the previous things I've tried I'm not sure it will get may any further so wanted someone to check my syntax that I posted.

User avatar
Nick - A2A
A2A Captain
Posts: 13734
Joined: 06 Jun 2014, 13:06
Location: UK

Re: Need help with Magneto LVAR

Post by Nick - A2A »

Okay, thanks for the info Jon.
jclay13 wrote: 07 May 2021, 17:47 I've also tried FSUIPC and it recognizes all of the switch postions on the Honeycomb Alpha starter switch and used the default FSUIPC magneto commands but once again, the 182 switch is stuck in certain postions.
If FSUIPC recognises these switch positions, then just using its standard assignments for "magneto off", "magneto right", "magneto left", "magneto both" and "magneto start" should do the trick. I'm not sure if the "start" position on your yoke is spring loaded back to the "both" position, or whether you have to manually return to switch to this position, but in either case, it should work okay.

Having said that, I don't actually have access to an Alpha yoke for testing. However, I just verified this behaviour with FSUIPC6 and 5 buttons on my joystick, and all worked as expected.

[Buttons]
PollInterval=25
ButtonRepeat=20,10
1=P2,14,C66023,0 -{MAGNETO_OFF}-
2=P2,15,C66024,0 -{MAGNETO_RIGHT}-
3=P2,16,C66025,0 -{MAGNETO_LEFT}-
4=P2,17,C66026,0 -{MAGNETO_BOTH}-
5=P2,18,C66027,0 -{MAGNETO_START}-

Cheers,
Nick
A2A Simulations Inc.

jclay13
Senior Airman
Posts: 197
Joined: 02 Aug 2014, 23:05
Location: Iowa

Re: Need help with Magneto LVAR

Post by jclay13 »

Nick, I took your advice and as also suggested by Paul in the other thread in the Pilot's Lounge and used the default Magneto commands in FSUIPC. I also took it a step further to make sure it's not an issue with the Alpha yoke and setup 5 buttons on my Joystick like you did and used the default Magneto commands in FSUIPC. Here is the resulting config in the FSUIPC4.ini similar to yours:

[Buttons]
PollInterval=25
ButtonRepeat=20,10
1=P101,14,C66023,0 -{MAGNETO_OFF}-
2=P101,15,C66024,0 -{MAGNETO_RIGHT}-
3=P101,16,C66025,0 -{MAGNETO_LEFT}-
4=P101,17,C66026,0 -{MAGNETO_BOTH}-
5=P101,18,C66027,0 -{MAGNETO_START}-

The configuration is straightfoward as one would think. It works for the most part but exhibits the same weird behaviour that I get using the switch on the Alpha yoke. I've also tested this using a GOFLIGHT Push Button module and get the same behaviour now on three devices: Alpha yoke, Joystick, GoFlight module.

What I'm seeing is that if I press the buttons for OFF, RIGHT, LEFT, BOTH and never press the button configured for START, the key on the dash will turn to the correct position on the switch. No matter how many times I press OFF, RIGHT, LEFT, or BOTH, it always works, never fails. I can press them in sequence or randomly and the key will always end up in the correct position. All good, right!

I then press the button for START and the key on the dash works as expected and turns to the START position. The key can be in any position on the switch and I press the button for START and the key flips to the START position. All good still.

Once the key is engaged in the START position though, that's when it gets weird and seems to be where the issue starts.

I then press BOTH and the key does not move and stays stuck in the START position. I press LEFT and the key moves to BOTH. I press RIGHT and the keys moves to LEFT. I press OFF and the key moves to RIGHT. So the key is behind one position on the switch once I've pressed that START button.

If I press the START button, watch the key move to START and engage the starter, and use the mouse to flip the key back to BOTH, all of the buttons then work as they should.

So on your five button setup on your joystick, if you press the button for START and engage the starter, and then press the button for BOTH, does the key flip back to BOTH?

User avatar
Nick - A2A
A2A Captain
Posts: 13734
Joined: 06 Jun 2014, 13:06
Location: UK

Re: Need help with Magneto LVAR

Post by Nick - A2A »

Hello Jon,

I had another little experiment and I think I can see what you mean. Are you testing with the battery off? If so (if the engine starter doesn't fire) I think there's some conditional logic whereby the magneto key is 'held' in the start position to make the start process a bit easier when clicking controls in the virtual cockpit.

However, If assigning the mag key to hardware this creates a bit of a problem. In my rather brief test just now, it seems that the most reliable way round this is to get FSUIPC to send another control when the start button is released, namely "magneto set" with a parameter of 3. Note that I've also told FSUIPC to repeat the magneto start command for as long as the button is held, though I don't think this is strictly necessary.

Screenshot 2021-05-09 091559.png
Screenshot 2021-05-09 091559.png (27.68 KiB) Viewed 1389 times

In my FSUIPC6.ini, this looks like this:

[Buttons]
PollInterval=25
ButtonRepeat=20,10
1=P2,14,C66023,0 -{MAGNETO_OFF}-
2=P2,15,C66024,0 -{MAGNETO_RIGHT}-
3=P2,16,C66025,0 -{MAGNETO_LEFT}-
4=P2,17,C66026,0 -{MAGNETO_BOTH}-
5=R2,18,C66027,0 -{MAGNETO_START}-
6=U2,18,C66028,3 -{MAGNETO_SET}-

Anyway, might be worth giving this a try.

Cheers,
Nick
A2A Simulations Inc.

jclay13
Senior Airman
Posts: 197
Joined: 02 Aug 2014, 23:05
Location: Iowa

Re: Need help with Magneto LVAR

Post by jclay13 »

You da man Nick! Adding the Magento Set with Parameter 3 for the START switch on the release event got it to work. Nothing better than turning the starter switch on the Honeycomb Alpha Yoke and have it turn the key in the sim like it should. Thank you so much!

Jon

User avatar
Nick - A2A
A2A Captain
Posts: 13734
Joined: 06 Jun 2014, 13:06
Location: UK

Re: Need help with Magneto LVAR

Post by Nick - A2A »

Ah, you're welcome Jon - glad to hear that helped!

Cheers,
Nick
A2A Simulations Inc.

new reply

Return to “C182 Skylane Tech Support”

Who is online

Users browsing this forum: No registered users and 11 guests