Jump to content
The simFlight Network Forums

Master Warning/caution light for MSFS2020


patchoq
 Share

Recommended Posts

6 hours ago, patchoq said:

I can't find the offset for any of them

Not everything is held in offsets...
Which aircraft/mod are you using?
Can you control this from the UI? If so, activate event logging and see if any events are logged when resetting in the UI, and try assigning to that event.

For the state of the light, you need to check if any lvars are available for that aircraft. Unfortunately no access to lvars for the time being, since the last update.
If they are available, you can use them to populate a user offset via lua.

 

Link to comment
Share on other sites

Hi,

I understand that they're not listed per say and I'm actually trying to write a LUA ( I'm new to this)

Here's the LUA I did so far

 

Filename crj-custom.lua

function Master_Caut_light(offset, value)
    if (value == 1) then ipc.writeLvar("ASCRJ_MASTER_WARN", 1) 
    else ipc.writeLvar("ASCRJ_MASTER_WARN", 0) 
    end
end

function Master_Warn_light(offset, value)
    if (value == 1) then ipc.writeLvar("ASCRJ_MASTER_CAUT", 1) 
    else ipc.writeLvar("ASCRJ_MASTER_CAUT", 0) 
    end
end

event.offset("66C0","UB","Master_Caut_Light")
event.offset("66C2","UB","Master_Warn_Light")

 

Added this in the .ini

[Auto.CRJ700]
1=Lua crj-custom
 

Thanks for the help

Link to comment
Share on other sites

7 hours ago, patchoq said:

Here's the LUA I did so far

 

Filename crj-custom.lua

function Master_Caut_light(offset, value)
    if (value == 1) then ipc.writeLvar("ASCRJ_MASTER_WARN", 1) 
    else ipc.writeLvar("ASCRJ_MASTER_WARN", 0) 
    end
end

function Master_Warn_light(offset, value)
    if (value == 1) then ipc.writeLvar("ASCRJ_MASTER_CAUT", 1) 
    else ipc.writeLvar("ASCRJ_MASTER_CAUT", 0) 
    end
end

event.offset("66C0","UB","Master_Caut_Light")
event.offset("66C2","UB","Master_Warn_Light")

What are you trying to achieve with this? This script will set the lvars when the values in user offsets 0x66C0 and 0x66C2 are updated, bur what is writing to these offsets?

If you want to write the values of the lvars to the offsets, then you need to use the event.lvar function. Your processing function will then be called when the lvar changes, and then you can write the lvar value to the user offset using one of the ipc.writeXXX functions.

But it is not clear to me if you are just trying to read these lvars, set them, or both.
Also, did you check that the lvars are actually writeable (either using the FSUIPC7 test facilities or the WASM test client)?

 

Link to comment
Share on other sites

Good Day John, thanks for the reply

I know I might be completely off the chart here, but I'm new with FSUIPC, LUA and Mobiflight

 

The goal, here, is trying to get the LED light from the "Master Caution and Master Warning" buttons to light my physical led light.

I got my push button to turn the Caution off directly from Mobiflight by declaring the constant in the modules.

For the output, I understand that I need to assign the value of the constant to an offset. The ASCRJ_MASTER_CAUT and WARN are Booleans

I know I certainly am missing something.

 

PS : Is there a way (I can't find it so far) to display the value of a constant outside the sim so we can know if we are getting it?

 

Thank you

Link to comment
Share on other sites

1 minute ago, patchoq said:

PS : Is there a way (I can't find it so far) to display the value of a constant outside the sim so we can know if we are getting it?

 

If you mean the value of an lvar, then you can list them in several ways:
    - using the Add-ons->WASM-<List Lvars menu option
    - using the list local panel variables control
    - using the log lvars.lua script
    - use the WASMClient

4 minutes ago, patchoq said:

The goal, here, is trying to get the LED light from the "Master Caution and Master Warning" buttons to light my physical led light.

Ok, then you need to connect your leds to the FSUIPC7 user offsets, and write the values of your lvars to the user offsets.

To do this, you need to use the event.lvar function, which will trigger when the lvar value changes, then you can write the value to user offsets as a byte, using ipc.writeUB in the handling function (or functions).

Link to comment
Share on other sites

 

"I got my push button to turn the Caution off directly from Mobiflight by declaring the constant in the modules."

Hello I would like to map a physical button for the master caution warning and alert in the TBM930 .

For the moment I use FSUICP7 with the mobiflightmodule WASM and the event file. But there is nothing for these buttons

Can you explain how you  did this ?

 

 

Link to comment
Share on other sites

1 hour ago, guit33 said:

Hello I would like to map a physical button for the master caution warning and alert in the TBM930 .

Have you tried the following lvars:
    Generic_Master_Caution_Active 
     Generic_Master_Warning_Active 

?
Here's the full list of lvars that FSUIPC7 finds for the TBM 930:

Quote

AS3000_Brightness = 0.000000
AS3000_Brightness_Manual = 0.000000
Generic_Master_Caution_Active = 0.000000
Generic_Master_Warning_Active = 0.000000
Glasscockpits_FPLHaveDestination = 0.000000
Glasscockpits_FPLHaveOrigin = 0.000000
LEVER_MAN_OVRD = 0.000000
XMLVAR_APTrim = 0.000000
XMLVAR_AirSpeedIsInMach = 0.000000
XMLVAR_Autopilot_1_Status = 0.000000
XMLVAR_BoostFuelPump = 0.000000
XMLVAR_CrashLeverPos = 0.000000
XMLVAR_ELT_ACTIVATION_TIME = 0.000000
XMLVAR_ELT_STATE = 0.000000
XMLVAR_ELT_TEST_TIME = 0.000000
XMLVAR_ElecGen = 0.000000
XMLVAR_ElecSource = 0.000000
XMLVAR_FORCE_PULSE_ON = 0.000000
XMLVAR_FuelSelectorAuto = 0.000000
XMLVAR_Gear_Check_Down = 0.000000
XMLVAR_Gear_Check_Down_IsDown = 0.000000
XMLVAR_Gear_Check_Down_MinReleaseTime = 0.000000
XMLVAR_Gear_Light_Test = 0.000000
XMLVAR_Gear_Light_Test_IsDown = 0.000000
XMLVAR_Gear_Light_Test_MinReleaseTime = 0.000000
XMLVAR_Ignition = 0.000000
XMLVAR_InertSep1_Active = 0.000000
XMLVAR_InertSep1_Deployment = 0.000000
XMLVAR_InertSep1_Switch = 0.000000
XMLVAR_IsDeiceAirFrame = 0.000000
XMLVAR_IsDeiceAirFrame2 = 0.000000
XMLVAR_LANDING_TAXI_OFF_Switch_Position = 0.000000
XMLVAR_LTS_Test = 0.000000
XMLVAR_LandingGearLightBlink = 0.000000
XMLVAR_LandingGearLightTesting = 0.000000
XMLVAR_LeverFlapsHidden = 0.000000
XMLVAR_LightDimmer = 0.000000
XMLVAR_Pitot_1 = 0.000000
XMLVAR_Pitot_2 = 0.000000
XMLVAR_Press_DUMP_cover = 0.000000
XMLVAR_PushXFR = 0.000000
XMLVAR_Starter = 0.000000
XMLVAR_Starter_EndTimeDown = 0.000000
XMLVAR_Starter_IsHeld = 0.000000
XMLVAR_ThrottlePos_XAxis = 0.000000
XMLVAR_ThrottlePos_YAxis = 0.000000
XMLVAR_VNAVButtonValue = 0.000000
XMLVAR_YokeHidden1 = 0.000000
XMLVAR_YokeHidden2 = 0.000000
_FuelTankShiftPressed = 0.000000

 

Link to comment
Share on other sites

4 minutes ago, John Dowson said:

Have you tried the following lvars:
    Generic_Master_Caution_Active 
     Generic_Master_Warning_Active 

Just tried these and they seem to work, setting 1 to activate and 0 to clear. However, when reading the values back, I am only getting 0 for each lvar. Not sure why at the moment - I will look into it.

Link to comment
Share on other sites

4 minutes ago, John Dowson said:

However, when reading the values back, I am only getting 0 for each lvar. Not sure why at the moment - I will look into it.

This was an error in my config - I had updates turned off in both the WASM and the Client (LvarUpdateFrequency ini parameter). Working fine now.

Link to comment
Share on other sites

14 hours ago, John Dowson said:

Have you tried the following lvars:
    Generic_Master_Caution_Active 
     Generic_Master_Warning_Active 

?
Here's the full list of lvars that FSUIPC7 finds for the TBM 930:

 

 

I will try.Capture.PNG.afc914cc112d91d0626d59593d38c73a.PNG

Link to comment
Share on other sites

13 hours ago, guit33 said:

I will try.Capture.PNG.afc914cc112d91d0626d59593d38c73a.PNG

To use the lvars you have to use lua or a macro file. You can then assign to the macro (or lua, if not auto-running).
As for the AS 1000 MFD RANGE INC control, maybe it takes a parameter (other than 0)? But it puzzles me why you are shoeing this as you were asking about master caution/warning...

Link to comment
Share on other sites

I succedd to make it work

Thanks for help

I have use  two macro, one for warning and one for caution: 1=L:Generic_Master_Caution_Active=Set

I would like to do the same with AS3000_MFD_SOFTKEYS_1 (I use this with mobiflight WASm module), I suppose this is not a LVAR but a HVAR ?

I trie also a macro but for the moment it does not work (with and without value)

1=H:AS3000_MFD_SOFTKEYS_1 =Set

Link to comment
Share on other sites

9 minutes ago, guit33 said:

I trie also a macro but for the moment it does not work (with and without value)

1=H:AS3000_MFD_SOFTKEYS_1 =Set

Does that hvar exist in the TBM 930? Have you added it by adding a hvar file for the TBM 930? What does FSUIPC7 show when you list hvars (from the WASM-> Lisy Hvars menu entry)? 

Not that, up to now, FSUIPC7 only installs a hvar file for the A320, although there is also one available for the DA40-NG (although I haven't tried this).
If you have an hvar file available for the TBM 930, maybe you could share it?

Oh - and there are no values associated with hvars (as far as I know). You just activate or trigger them (which is what the Set command does).

Link to comment
Share on other sites

53 minutes ago, guit33 said:

If I do in Fsuipc Add On/Wasm/list Hvars nothing appears..(for the TBM930)

That doesn't surprise me. Hvars are only know to FSUIPC7 if you provide a *.hvar file, placed in the WASM's modules folder. This is explained in the Announcement. I have only included a hvar file for the A320, so no other aircraft will have any hvars available unless you add a file for them to the WASM.

I also can't see that event listed in the MobiFlight WASM events document: 
    https://docs.google.com/spreadsheets/d/1jTXlcHaJWx0B7TB63Pmma7bKwpxsxXJO6EJ3ECt7zpc/edit#gid=172455454

...but it is in the events.txt: AS3000_MFD_SOFTKEYS_1#(>H:AS3000_MFD_SOFTKEYS_1)

Maybe that hvar is not available in theTBM930, I don't know. You could try activating it using the Add-ons->WASM->Execute Calculator Code function to see if it works, and if so, then add to an hvar file for it to be recognised as a hvar by FSUIPC7.

Link to comment
Share on other sites

Unfortunatly Generic_Master_Caution_Active and      Generic_Master_Warning_Active  don't really work

It will shut off the light of the master caution and warning switch but will do nothing on the CAS (the light stay flashing)..

Link to comment
Share on other sites

15 hours ago, guit33 said:

It will shut off the light of the master caution and warning switch but will do nothing on the CAS (the light stay flashing)..

Sorry, I'm not familiar with the TBM 930. I thought CAS was Calibrated Air Speed, but I see that in the TBM this is the Crew Alerting System, no?  If so, I've no idea on how to control this, sorry.

Link to comment
Share on other sites

Yes that it the Crew Alerting System (the window where alerts appears)

In fact the LVAR Generic_Master_Caution_Active  only light on and off the switch but do nothing with all the rest (no CAS reseting and the alert sound doesn't stop)

So we have to wait for ASOBO for one day maybe having this key binding..

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • 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.