patchoq Posted April 16, 2021 Report Posted April 16, 2021 Hi there, I'm new with FSUIPC and try to make a reset light/button for the master warning/caution I can't find the offset for any of them Is there a way? Thanks
John Dowson Posted April 16, 2021 Report Posted April 16, 2021 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.
patchoq Posted April 19, 2021 Author Report Posted April 19, 2021 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
John Dowson Posted April 19, 2021 Report Posted April 19, 2021 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)?
patchoq Posted April 19, 2021 Author Report Posted April 19, 2021 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
John Dowson Posted April 19, 2021 Report Posted April 19, 2021 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).
John Dowson Posted April 19, 2021 Report Posted April 19, 2021 The latest beta, v7.1.0f, including installer + updated documentation, is now available here: Install_FSUIPC7f.zip: 1
patchoq Posted April 19, 2021 Author Report Posted April 19, 2021 Perfect I'll do that later today and will install the latest beta Thanks a million
patchoq Posted April 20, 2021 Author Report Posted April 20, 2021 Got it to work... thanks, problem was that I needed the paid version DUH! Once purchased, it works perfectly
guit33 Posted April 27, 2021 Report Posted April 27, 2021 "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 ?
John Dowson Posted April 27, 2021 Report Posted April 27, 2021 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
John Dowson Posted April 27, 2021 Report Posted April 27, 2021 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.
John Dowson Posted April 27, 2021 Report Posted April 27, 2021 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.
guit33 Posted April 27, 2021 Report Posted April 27, 2021 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.
John Dowson Posted April 28, 2021 Report Posted April 28, 2021 13 hours ago, guit33 said: I will try. 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...
guit33 Posted April 28, 2021 Report Posted April 28, 2021 thank for answer I did not succeed to erase the picture after my post🙂
guit33 Posted April 28, 2021 Report Posted April 28, 2021 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
John Dowson Posted April 28, 2021 Report Posted April 28, 2021 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).
guit33 Posted April 28, 2021 Report Posted April 28, 2021 If I do in Fsuipc Add On/Wasm/list Hvars nothing appears..(for the TBM930) But it exist in mobifight but I am not sure it is a HVAR
John Dowson Posted April 28, 2021 Report Posted April 28, 2021 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.
guit33 Posted April 28, 2021 Report Posted April 28, 2021 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)..
John Dowson Posted April 29, 2021 Report Posted April 29, 2021 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.
guit33 Posted April 29, 2021 Report Posted April 29, 2021 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..
John Dowson Posted April 29, 2021 Report Posted April 29, 2021 2 hours ago, guit33 said: So we have to wait for ASOBO for one day maybe having this key binding.. Yes, or to link them maybe...however it works in the actual aircraft...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now