Triscus Posted December 16, 2023 Report Posted December 16, 2023 I'm trying to set an offset for the simvar A32NX_PARK_BRAKE_LEVER_POS to read it with a lua script later on. (using the FBW A32NX Mod) When I list the lvars with Add-ons -> WASM -> List Lvars , the variable seems to be there: A32NX_PARK_BRAKE_LEVER_POS = 1.000000 I added this to the myOffsets.txt (to try out different names) // offset, size, simvar, type, units [, w] 0xA001, 1, A32NX.PARK_BRAKE_LEVER_POS, I32, Bool, w 0xA002, 1, A32NX_PARK_BRAKE_LEVER_POS, I32, Bool, w 0xA003, 1, A32NX PARK BRAKE LEVER POS, I32, Bool, w but the Log keeps saying: 8265 Initialising SimConnect data requests now 8265 Adding simvar 'A32NX.PARK_BRAKE_LEVER_POS' to offset A001 (size 1, type 'I32') for read/write access 8265 Adding simvar 'A32NX_PARK_BRAKE_LEVER_POS' to offset A002 (size 1, type 'I32') for read/write access 8265 Adding simvar 'A32NX PARK BRAKE LEVER POS' to offset A003 (size 1, type 'I32') for read/write access 8265 Mapping custom control numbers 69632 - 84232 8281 Maximum number of custom events available is 1024 (defined by ini parameter MaxNumberOfCustomEvents) 8281 C:\Users\Username\AppData\Local\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalState\MISSIONS\Custom\CustomFlight\CustomFlight.FLT 8281 SimObjects\Airplanes\FlyByWire_A320_NEO\aircraft.CFG 8281 Exception 7 "NAME_UNRECOGNIZED", Ref 1192, Index param 2 on read AddData for "A32NX.PARK_BRAKE_LEVER_POS" 8281 Exception 7 "NAME_UNRECOGNIZED", Ref 1193, Index param 2 on read AddData for "A32NX_PARK_BRAKE_LEVER_POS" 8281 Exception 7 "NAME_UNRECOGNIZED", Ref 1194, Index param 2 on read AddData for "A32NX PARK BRAKE LEVER POS" 8422 User Aircraft ID 1 supplied, now being used 8625 Aircraft loaded: running normally now ... 9219 Maximum number of custom events available is 1024 (defined by ini parameter MaxNumberOfCustomEvents) 9219 Aircraft="Airbus A320neo DHL (A32NX Converted)" 9234 System time = 16/12/2023 15:04:34, Simulator time = 13:24:25 (12:24Z) 15234 -------------------- Starting everything now ---------------------- 15250 Starting WAPI... 15297 Lvars received: 1959 L:vars & 220 H:vars now available 15297 Lvars/Hvars received - checking aircraft autos.... 15437 Requesting Input Events... 15437 Subscribed to InputEvents (5 found) 15437 Reloading assignments for Input Events.... 15437 Aircraft="Airbus A320neo DHL (A32NX Converted)" 15469 LUA.1: Init LED state! 15531 LUA.2: Init LED state! Any support on this matter would be highly appreciated. Cheers Triscus
John Dowson Posted December 16, 2023 Report Posted December 16, 2023 11 minutes ago, Triscus said: Any support on this matter would be highly appreciated. A32NX_PARK_BRAKE_LEVER_POS is an lvar, not a simvar. You need need to use the Adding Lvars to Offsets facility, described on page 46 of the Advanced User guide, not the myOffsets.txt file which is for simvars (or A-type variables) only. John
Triscus Posted December 16, 2023 Author Report Posted December 16, 2023 Hi John, thanks for the fast reply, now it works. Im using the lua script to control some LEDs on my controllers. Pretty neat I can now simplify the scripting part by using profiles: [LvarOffsets] 1=L:BRAKE PARKING POSITION=UW0xA000 [LvarOffsets.A320NX] 1=L:A32NX_PARK_BRAKE_LEVER_POS=UW0xA000 Cheers Triscus
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