
AlMassimo
Members-
Posts
112 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Events
Gallery
Downloads
Everything posted by AlMassimo
-
Hi John, with the last release I need to press 3 times Alt-F in order to have the Fsuipc 7 window open. The first Alt-F makes the window to flash briefly on the screen then disappear, second time nothing happens, then third time the window opens up normally. I restarted PC, MSFS, FSuipc, everything but still the same. Can you check if it is a possible bug or if is only my PC that has some issue ? What should I check ? When the window opens, if I go under wasm, list Hvars, I get an empty panel. List Lvars populates as before with all available lvars. I'm currently using Asobo B747-8 and I am proceeding pretty well with the Opencockpits MCP and EFIS panel, almost all the main functions are active but it took me a lot of trial and error before finding the proper offset, lvars and events. I have stored in a folder all the files I created for FBW A320 (Fsuipc7.ini, myevents.txt, A32NX.evt, SIOC.txt, A32NX.mcro) and I am creating new config files for the B747. The idea is to create many folders each with the files for a specific plane, so to be able to use my home cockpit with many different planes, just copying the appropriate files in the main folder. The biggest issue is the lack of control over the MSFS internal vars, B, I, etc., but many things work with default offsets and custom events.
-
Today subject is APU controls. Since I have a B737 cockpit and overhead, I don't have push buttons but switches, and I also have the APU EGT gauge based on a stepper motor (in this case I used a X27-168 with the Easydriver (e.g. TECNOIOT A3967 EasyDriver Stepper Motor Driver V44) that is controlled directly by MobiFlight using the L:A32NX_APU_N instead of EGT, because it is more smooth and gives a better idea of the APU startup. So I assigned these offsets to the relevant LVARS: 19=A32NX_OVHD_APU_MASTER_SW_PB_IS_ON=UBA013 20=A32NX_OVHD_APU_START_PB_IS_AVAILABLE=UBA014 21=A32NX_OVHD_APU_START_PB_IS_ON=UBA015 22=A32NX_OVHD_ELEC_APU_GEN_PB_IS_ON=UBA016 And then I used SIOC (but the same could be done with LUA as well) to control the operations of the APU : // APU ================================== Var 0475, name APU_master_ON, Link FSUIPC_INOUT, Offset $A013, Length 1 // this is the master APU button Var 0476, name FS_APU_avail, Link FSUIPC_INOUT, Offset $A014, Length 1 // this is the flag from MSFS that the APU is available { IF &FS_APU_avail = 1 { IF &sw_APU_gen = 0 { &APU_gen_OFFB = 1 // turn on the led on the annunciator APU GEN OFF BUS (737 overhead...) } } ELSE { &APU_gen_OFFB = 0 } } Var 0477, name APU_start_ON, Link FSUIPC_INOUT, Offset $A015, Length 1 // this controls the startup of the APU Var 0481, name sw_APU_start, Link FSUIPC_INOUT, Offset $A109, Length 1 // this is the phisical swithc "APU START" { IF &sw_APU_start = 1 { &APU_master_ON = 1 // these 2 variables actually make the APU to start. Both must be set to 1 to start &APU_start_ON = 1 } } Var 0482, name sw_APU_off, Link FSUIPC_INOUT, Offset $A10A, Length 1 { IF &sw_APU_off = 1 { &APU_master_ON = 0 // this is not immediate. Sometimes it takes a lot for the APU to stop &APU_start_ON = 0 } } Var 0483, name FS_APU_gen, Link FSUIPC_INOUT, Offset $A016, Length 1 // APU generator status in MSFS Var 0484, name APU_gen_OFFB, Link FSUIPC_INOUT, Offset $A102, Length 1 // phisical annunciator "APU GEN OFF BUS" Var 0485, name sw_APU_gen, Link FSUIPC_INOUT, Offset $A103, Length 1 { IF &sw_APU_gen = 1 { IF &FS_APU_avail = 1 { IF &FS_APU_gen = 0 // since the command is a toggle, I want to send it only if the generator is not operating { &FS_PAR = 1 &FS_CONTROL = 66707 // APU_GENERATOR_SWITCH_SET &FS_CONTROL = DELAY 0 10 } &APU_gen_OFFB = 0 } } ELSE { IF &FS_APU_gen = 1 // same as above, if the generator is ON then TOGGLE it off { &FS_PAR = 0 &FS_CONTROL = 66707 // APU_GENERATOR_SWITCH_SET &FS_CONTROL = DELAY 0 10 } IF &FS_APU_avail = 1 { &APU_gen_OFFB = 1 } ELSE { &APU_gen_OFFB = 0 // when APU is not running, the annunciator APU GEN OFF BUS turns off } } } This simple code allow complete control over the APU start, stop and APU gen ON/OFF and status led I enclose the the schematic image of how to connect an X27-168 to Arduino, but if you are interested you can find an exhaustive guide here: https://www.mobiflight.com/en/tutorials/community-guides/easy-driver-tutorial.html
-
latest news I added "master warning" and "master caution" annunciator and reset button, always with 737 NG hardware but A320 logic and LVARS. Initially I tried to use directly Mobiflight, but setting 0(>L:32NX_MASTER_WARNING) or 0(>L:A32NX_MASTER_CAUTION) seemed not to work. So I used FSUIPC, adding the LVARS in FSUIPC7.ini 31=A32NX_MASTER_WARNING=UBA027 32=A32NX_MASTER_CAUTION=UBA028 And then I used some "bridge" offsets (UBA106, UBA107) to read the button from Mobiflight and write the status of the annunciator to Mobifligth. This is the code in SIOC (but I think the same can be done adding events in myevents.txt and then calling them appropriately) // --- MASTER CAUTION / MASTER WARNING Var 0525, name ann_mast_warn, Link FSUIPC_INOUT, Offset $A106, Length 1 Var 0526, name FS_m_caution, Link FSUIPC_INOUT, Offset $A028, Length 1 { C0 = &FS_m_warn = 0 C1 = &FS_m_caution = 0 IF C0 AND C1 { &ann_mast_warn = 0 } ELSE { &ann_mast_warn = 1 } } Var 0527, name FS_m_warn, Link FSUIPC_INOUT, Offset $A027, Length 1 { C0 = &FS_m_warn = 0 C1 = &FS_m_caution = 0 IF C0 AND C1 { &ann_mast_warn = 0 } ELSE { &ann_mast_warn = 1 } } Var 0528, name btn_mast_warn, Link FSUIPC_INOUT, Offset $A107, Length 1 { IF &btn_mast_warn = 1 { &FS_m_caution = 0 &FS_m_warn = 0 } } I had to put the two annunciators (Warning and Caution) together since I have only one button in my 737 cockpit, and the same for the annunciator, but all worked perfectly. The logic is : if both warning and caution are off then turn off the annunciator, if one of the two is ON then the annunciator is ON. If the button is pressed then both warnings are set to 0 and this quit the alarm and turn off the annunciators. Another little step but very useful!
-
All functions transferred to myevents.txt, no longer need for .lua program, all presets are now called from SIOC using offset 4194304 + number of preset, starting from 0 and easilly calculated by the row number in my editor (NotePad). Some controls (or events) are activated using the A32NX.evt file (FCU controls), other use lvars defined in FSUIPC7.ini All the functions controlled by Arduino boards are activated directly with MobiFlight Wasm commands. All seems reasonably clear now, but it took me some weeks to understand how the new functions and variables worked, and it would have been very hard without the patient and always stimulating help from John Dowson! I think FBW A320 is an extremely good project, I must only say that I am a bit confused by the many different variables and presets called A320_Neo, A32NX, A32NX_dev, A32NX_sdk... I use FBW A320 latest stable release (not dev) but many variables or presets are only available under "dev" group, but they work quietly with my stable version. Anyway, I recommend to follow John's advice to avoid using events.txt (i changed the extension) and copy and paste all the presets you need in myevents.txt, this way you only have the presets you need, the numbering is easy to find and you have total control over this file (it is not modified or overwritten during updates). The power of these new functions is extraordinary and give an almost complete control over all of the planes functions. I hope that these posts will help other simmers to experiment all this beautiful set of tools, it's really worth the effort.
-
Next days I'll do more experiment with removing events.txt and using only myevents.txt. In the file events.txt that probably installing the new release of FSUIPC7 has overwritten my current events.txt there is an error, the preset A32NX_ENG1_MASTER_SWITCH_OFF#2 (>K:FUELSYSTEM_VALVE_CLOSE) should be A32NX_ENG2_MASTER_SWITCH_OFF#2 (>K:FUELSYSTEM_VALVE_CLOSE) so the assignment I did to the fuel cutoff lever 2 was broken (automatically removed from that button) Now I have modified again manually the wrong name of the preset and reassigned it to fuel cutoff lever 2. By using myevents.txt this kind of problem would be avoided, so I'll try to transfer all my needed presets to myevents.txt and test everything again.
-
Hi John, the LUA code ipc.writeSTR(0x7C50, "P:A32NX_EFIS_L_CSTR_PUSH") works like a charm, and offers a HUGE improvement in home cockpit configuration. 😃
-
Hi John, the new version, with numbers corrected to 4194304 + line number of the preset required works absolutely well, and this is such a powerful thing! This opens huge persepectives in SIOC, since I no longer need to interact with LUA code to set hvar, send controls, modify lvars, and also create combinations of operations, conditional operations, math, conversion, all that can be done with calculator code. Great, great job, well done! The assessment of the line number was difficult though, because the editor give me the line number, but then all the comment lines have to be removed or subtracted to obtain the proper number. As you said, this could be avoided using only myevents.txt and inserting in it all the presets I need. So your suggestion is (very sorry to ask again...) 1) copy and paste all the events I need into myevents.txt 2) remove or rename events.txt (only the one in FSUIPC7 folder, not the one in MF Wasm module in community folder ?) 3) change all the preset numbers I used in SIOC according to the order in myevents.txt As an alternative I could 1) write LUA code to use the presets using 7C50 and preset names, activating them through a "bridge" custom offset sent by SIOC - this should not require the deletion of events.txt The code should be, eg ipc.writeSTR(0x7C50, “P:A32NX_EFIS_L_CSTR_PUSH”) I'll do some testing, in order to solve some of my doubts by myself, without you having to correct all my mistakes...! What I want to tell you is that these new functionalities are adding a lot of power to FSUIPC7 and make interacting with MSFS2020 an amazing and exciting experience!
-
Ok... I always miss something, sorry!
-
Hi John, I am activating and setting up the new version, and studying the new manual, seems very well done. In the manual the location of the FSUIPC_WASM.ini for MS-Store users, is indicated as AppData\Local\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalState\Packages\fsuipc-lvar- module\work but (at least in my case) it is LocalCache\Packages\Community\fsuipc-lvar-module\FSUIPC_WASM.ini I have no ini file in the LocalState\Packages\fsuipc-lvar-module\work folder
-
That sounds amazing! How can I send a string with the name of the presets via an offset ? In LUA code this looks feasible, in SIOC much less... I searched "FSUIPC7 and 0x7C50" but I found no match on the net. I hope this will be documented in the updated advanced user manual! I'll test the new FSUIPC7.exe, and try to find out how this works. Thanks!
-
These are 2 images of my home cockpit, I have left the VC visible so to give an idea of the alignment between the displays of the cockpit (MCP-FCU, PFD, MFD, etc) and the VC ones. I am also testing MobiFlight events (I had removed the MF wasm module from my community folder, but now I have restored it and I am currently using calculator code directly in MF assignments (custom events) and seems to work great. EG I wrote some calculator code to control beacon and strobe lights with only one switch, just looking the code in events.txt and pasting some lines in the calculator code, it is really powerful, but I must check if there are some conflicts in events numbers, or with presets numbers, but so far all seems to work fine.
-
There is (at least) one thing that I was not able to make to work, and is the myevents.txt HVAR setting via 262144 control. This is the content of myevents.txt file: A320_Neo_PFD_BTN_LS_1#(>H:A320_Neo_PFD_BTN_LS_1) A320_Neo_MFD_BTN_ARPT_1#(>H:A320_Neo_MFD_BTN_ARPT_1) but if I call the event 262144 or the 262145 with 3110 control set, eg Var 0229, name BTN_ARPT, Link FSUIPC_INOUT, Offset $A056, Length 1 { if &BTN_ARPT = 1 { &FS_PAR = 1 &FS_CONTROL = 262145 &FS_CONTROL = DELAY 0 10 } } I get the following error messages 205547 Exception 1 "ERROR", Ref 4769, Index param 2 on TransmitClientEvent, object=0, id=262144 (????), data=1 210813 Exception 1 "ERROR", Ref 4772, Index param 2 on TransmitClientEvent, object=0, id=262145 (????), data=1 It is not clear to me (even having read the advanced manual more than once) if the number of myevents is 262144 or if I have to add the lines number of the entire events.txt in FSUIPC7 folder. I tested also numbers that included those in events.txt but I god the same error...
-
To be more precise, the last rows on lua code SW_CUTOFF1 = ipc.readUB(0x6220) if SW_CUTOFF == 1 then -- ipc.control(67197, 1) end didn't work, and I commented them out and I'll remove them, since I used direct controls BUTTON assignment in FSUIPC7 panel 30=RA,2,C65602,0 -{THROTTLE_DECR}- 31=UA,2,C65604,0 -{THROTTLE_CUT}- 32=PA,7,C66064,0 -{SPOILERS_ON}- 33=UA,7,C66065,0 -{SPOILERS_OFF}- 35=PA,9,CPA32NX_ENG2_MASTER_SWITCH_OFF,0 -{Preset Control}- 37=PA,10,CPA32NX_ENG2_MASTER_SWITCH_ON,1 -{Preset Control}- 38=PA,0,CPA32NX_ENG1_MASTER_SWITCH_ON,0 -{Preset Control}- 39=PA,1,CPA32NX_ENG1_MASTER_SWITCH_OFF,1 -{Preset Control}-
-
And now, ladies and gentlemen, after some weeks of work (and with great support from John) I have reached a good level of control of the FBW A320 through my home cockpit, so I feel reasonably confident to be able to resume all I found in the promised WASM LVARS TO OFFSET BASIC GUIDE! First of all, I must specify that my hardware is based on : - Opencockpit 737 MCP and EFIS (+ NAV Radio, not yet programmed by now) - Main Control Panel, Throttle quadrant and Overhead are self made and based on 3 arduino Mega boards controlled via MobiFlight, and - essentially - by FSUIPC7 (registered version). So this "guide" (let me call it this way) tries to summarize what I achieved : - Opencockpit 737 MCP and EFIS converted almost completely the to work emulating pretty well an A320 FCU - Throttle quadrant (throttles, reverse levers, spoiler, flaps and flaps gauge indicator (stepper motor), engines fuel valves and ignition (start) switches is fully operational - Overhead : for the moment I have APU master and APU start (unified because on 737 there is only one APU start/stop momentary switch. APU bleed and APU generator all working, also BLEED, APU GEN OFF BUS, GEN1 and GEN2 SOURCE OFF and GEN1-2 OFF BUS annunciators working. Most of these controls are operated through these LVARS, either in SIOC or with MOBIFLIGHT. [LvarOffsets] 1=A320_Neo_MFD_NAV_MODE_1=UBA000 2=A320_Neo_MFD_Range_1=UBA001 3=A32NX_PARK_BRAKE_LEVER_POS=UBA003 4=A32NX_FLAPS_HANDLE_INDEX=UBA004 5=BTN_TERRONND_1_ACTIVE=UBA005 6=AIRLINER_LS_On=UBA006 7=A32NX_AUTOBRAKES_ARMED_MODE=UBA007 8=A32NX_SPOILERS_HANDLE_POSITION=UBA008 9=A32NX_FCU_SPD_MANAGED_DOT=UBA009 10=A32NX_FCU_HDG_MANAGED_DOT=UBA00A 11=A32NX_AUTOTHRUST_MODE=UBA00B 12=A32NX_AUTOPILOT_1_ACTIVE=UBA00C 13=A32NX_AUTOPILOT_2_ACTIVE=UBA00D 14=A32NX_FCU_ALT_MANAGED=UBA00E 15=A32NX_FCU_VS_MANAGED=UBA00F 16=A32NX_HOME_COCKPIT_ENABLED=UBA010 17=BTN_LS_1_FILTER_ACTIVE=UBA011 18=A32NX_FCU_APPR_MODE_ACTIVE=UBA012 19=A32NX_OVHD_APU_MASTER_SW_PB_IS_ON=UBA013 20=A32NX_OVHD_APU_START_PB_IS_AVAILABLE=UBA014 21=A32NX_OVHD_APU_START_PB_IS_ON=UBA015 22=A32NX_OVHD_ELEC_APU_GEN_PB_IS_ON=UBA016 23=A32NX_APU_BLEED_ON=UBA017 24=A32NX_AUTOPILOT_HEADING_SELECTED=UWA020 25=A32NX_AUTOPILOT_SPEED_SELECTED=UWA022 26=A32NX_AUTOPILOT_VS_SELECTED=SWA024 30=A32NX_APU_EGT=UWA026 31=A32NX_APU_N=UWA028 32=A32NX_APU_BLEED_AIR_VALVE_OPEN=UBA02A 33=A32NX_OVHD_PNEU_APU_BLEED_PB_IS_ON=UBA02B where SB – signed byte (1 byte) UB – unsigned byte (1 byte) SW – signed word (2 bytes), use for signed short UW – unsigned word (2 bytes), use for unsigned short SD – signed double-word (DWORD) (4 bytes), use for signed int UD – unsigned double-word (4 bytes), use for unsigned int F – floating point number (4 bytes), use for float Some functions are operated by controls offest sent from SIOC using Var 0001 name FS_CONTROL Link FSUIPC_OUT Offset $3110 Length 4 Var 0002 name FS_PAR Link FSUIPC_OUT Offset $3114 Length 4 65879 HEADING_BUG_INC 65880 HEADING_BUG_DEC 65896 AP_SPD_VAR_INC 65897 AP_SPD_VAR_DEC 66241 TOGGLE_MASTER_BATTERY 66701 AVIONICS_MASTER_SET Other controls, most of which related to FCU push/pull knobs, are sent by "custom" control numbers calculated according to the FSUIPC7 for Advanced Users.pdf pag. 37 - Add-on Custom Events This needs one (or more) files with .evt extension, that will be listed automatically in FSUIPC7.ini under "EventFiles" section like this (in my case) [EventFiles] 0=A320_NX 1=A32NX this is the content of my A32NX.evt file : [Events] 0 = A32NX.FCU_AP_1_PUSH 1 = A32NX.FCU_AP_2_PUSH 2 = A32NX.FCU_AP_DISCONNECT_PUSH 3 = A32NX.FCU_ATHR_PUSH 4 = A32NX.FCU_ATHR_DISCONNECT_PUSH 5 = A32NX.FCU_SPD_INC 6 = A32NX.FCU_SPD_DEC 7 = A32NX.FCU_SPD_SET 8 = A32NX.FCU_SPD_PUSH 9 = A32NX.FCU_SPD_PULL 10 = A32NX.FCU_SPD_MACH_TOGGLE_PUSH 11 = A32NX.FCU_HDG_INC 12 = A32NX.FCU_HDG_DEC 13 = A32NX.FCU_HDG_SET 14 = A32NX.FCU_HDG_PUSH 15 = A32NX.FCU_HDG_PULL 16 = A32NX.FCU_TRK_FPA_TOGGLE_PUSH 17 = A32NX.FCU_ALT_INC 18 = A32NX.FCU_ALT_DEC 19 = A32NX.FCU_ALT_SET 20 = A32NX.FCU_ALT_PUSH 21 = A32NX.FCU_ALT_PULL 22 = A32NX.FCU_ALT_INCREMENT_TOGGLE 23 = A32NX.FCU_ALT_INCREMENT_SET 24 = A32NX.FCU_VS_INC 25 = A32NX.FCU_VS_DEC 26 = A32NX.FCU_VS_SET 27 = A32NX.FCU_VS_PUSH 28 = A32NX.FCU_VS_PULL 29 = A32NX.FCU_LOC_PUSH 30 = A32NX.FCU_APPR_PUSH 31 = A32NX.FCU_EXPED_PUSH The number of each control is obtained by 32768 + number of the specific file containing the command selected * 256 + number of the control in the file. So, eg., since A32NX.evt is the second file in the [EventFiles] section of FSUIPC7.ini, the control for A32NX.FCU_AP_1_PUSH will be 32768 + 1 * 256 + 0 = 33024, while A32NX.FCU_AP_2_PUSH will be 32768 + 1 * 256 + 1 = 33025 and so on. Anyway, you can assign the control you need to a "test" button under FSUIPC panel and then in the console you can see the number of the event that has to be used, and this helps a lot. Some (fortunately very few, HVARS, can be controlled in various ways, but I simply used some very basic LUA code function update_switches() BTN_LS = ipc.readUB(0xA050) if (BTN_LS == 1) then ipc.activateHvar("H:A320_Neo_PFD_BTN_LS_1") end BTN_HDG_MODE = ipc.readUB(0xA053) if (BTN_HDG_MODE == 1) then if (ipc.readUB(0xA00A) == 0) then ipc.activateHvar("H:A320_Neo_FCU_HDG_PUSH") else ipc.activateHvar("H:A320_Neo_FCU_HDG_PULL") end end BTN_ARPT = ipc.readUB(0xA056) if (BTN_ARPT == 1) then ipc.activateHvar("H:A320_Neo_MFD_BTN_ARPT_1") end BTN_CSTR = ipc.readUB(0xA057) if (BTN_CSTR == 1) then ipc.activateHvar("H:A320_Neo_MFD_BTN_CSTR_1") end SW_CUTOFF1 = ipc.readUB(0x6220) if SW_CUTOFF == 1 then -- ipc.control(67197, 1) end end -- update_switches -- ================================================================================= event.timer(100,"update_switches") THAT'S ALL FOLKS!
-
Essential information!!! Right! So the numbers don't change!
-
Ok, sure, i will study all I can before writing again! But if I'm going to write some sort of tutorial or FAQ I must be sure to have understood what I read, and... ehm, I'm sure only when you confirm that I have understood! (even when something seems to work I'm not totally sure to have fully understood the process...) Thanks, your support is invaluable and I can't "monopolize" your time, you really helped me a lot. Massimo
-
Uhm... I must try to understand better these aspects (events, presets, HVARS, calculator code, controls, custom events...) this is the section Eventfiles in my FSUIPC7.ini [EventFiles] 0=A320_NX 1=A32NX there is no path and no extension, but the only file with name A32NX is an .evt file with this content (can't remember how it was created and when...) [Events] 0 = A32NX.FCU_AP_1_PUSH 1 = A32NX.FCU_AP_2_PUSH 2 = A32NX.FCU_AP_DISCONNECT_PUSH 3 = A32NX.FCU_ATHR_PUSH 4 = A32NX.FCU_ATHR_DISCONNECT_PUSH 5 = A32NX.FCU_SPD_INC 6 = A32NX.FCU_SPD_DEC 7 = A32NX.FCU_SPD_SET 8 = A32NX.FCU_SPD_PUSH 9 = A32NX.FCU_SPD_PULL 10 = A32NX.FCU_SPD_MACH_TOGGLE_PUSH 11 = A32NX.FCU_HDG_INC 12 = A32NX.FCU_HDG_DEC 13 = A32NX.FCU_HDG_SET 14 = A32NX.FCU_HDG_PUSH 15 = A32NX.FCU_HDG_PULL 16 = A32NX.FCU_TRK_FPA_TOGGLE_PUSH 17 = A32NX.FCU_ALT_INC 18 = A32NX.FCU_ALT_DEC 19 = A32NX.FCU_ALT_SET 20 = A32NX.FCU_ALT_PUSH 21 = A32NX.FCU_ALT_PULL 22 = A32NX.FCU_ALT_INCREMENT_TOGGLE 23 = A32NX.FCU_ALT_INCREMENT_SET 24 = A32NX.FCU_VS_INC 25 = A32NX.FCU_VS_DEC 26 = A32NX.FCU_VS_SET 27 = A32NX.FCU_VS_PUSH 28 = A32NX.FCU_VS_PULL 29 = A32NX.FCU_LOC_PUSH 30 = A32NX.FCU_APPR_PUSH 31 = A32NX.FCU_EXPED_PUSH Then I have a file with the name of the second file in the FSUIPC7.ini (A320_NX) which is a LUA file (A320_NX.lua) that I wrote with some hvars; Since A320_NX.lua is a name that I gave to that file, I don't think there are other files with this name (normally is A320_Neo or A32NX). The events.txt seems to contain sort of macros or calculator code with some instructions or conditions or whatever //Aerosoft/CRJ 550-700-1000/Air Condition / Pressurization ASCRJ_AIRC_AFT_CARGO_AIRCOND_SWITCH#(L:ASCRJ_AIRC_AFT_CARGO, Bool) ! (>L:ASCRJ_AIRC_AFT_CARGO) ASCRJ_AIRC_PACK_L_SWITCH# (L:ASCRJ_AIRC_PACK_L, Bool) ! (>L:ASCRJ_AIRC_PACK_L) ASCRJ_AIRC_PACK_R_SWITCH# (L:ASCRJ_AIRC_PACK_R, Bool) ! (>L:ASCRJ_AIRC_PACK_R) ASCRJ_AIRC_RECIC_FAN_SWCH_OFF#0 (>L:ASCRJ_AIRC_RECIRC_FAN) eg very interesting G58_MAGNETO1_BOTH#3 (>K:MAGNETO1_SET) (A:GENERAL ENG STARTER:1, Bool) if{ 0 (>K:SET_STARTER1_HELD) } contains both controls K: and A: vars! I definitively must study more deeply these instructions, I think is calculator code, must search on advanced manual! I can copy some of these rows in myevents.txt and use with offset $3110 and the numbers 262144, 262145 ? This could probably solve the issue with sending 2 different controls in sequence with different parameters ?
-
The files listed in FSUIPC.ini are .evt not .txt, or at least I remember so (I'm not in front of my PC now, I'll check this evening), and they have no path, just the filename, so they should be in the same dir, or in a default dir that requires no further path indications. Anyway, I'll try to do as you suggest, I'll create a myevents.txt file, and then call the events from 262144, 262145 and so on, in order to be sure that the number won't change unless I do so. What is the difference (if there is one) between .evt files and events.txt files ? There are also .hvar files but I haven't tested them yet. For the moment I have done only this : 1) insert LVARS and assign offsets to them in the appropriate section of FSUIPC.ini file, and then reading the offset in SIOC or in Mobiflight, eg to change the state of a led output or perform other actions based upon the value read (very seldom LVARS are also writable, most of them are read only) - each LVAR must be existing in the list visible under FSUIPC/WASM/LIST LVARS 2) calling events from SIOC or LUA code, after having found their number in console, temporarily assigning the control to a button, or watching the events generated by clicking on a control in the simulator. 3) activating HVARS in LUA code, eg --> ipc.activateHvar("H:A320_Neo_PFD_BTN_LS_1") after finding the HVAR under the list in FSUIPC/WASM/LIST HVARS menu
-
Ok thanks, probably it was clear but I didn't remember that, but on the other hand seems to be a good thing to me, in fact this means that the order of the events cannot change if the content of the files isn't modified (but I can ADD events at the bottom of each file adding new progressive numbers). I could also copy the rows in a "guide" file with the control numbers to be used for each event. The question is that I found only one .evt file in my FSUIPC folder, where could be the second one ? And what happens if an event is duplicated in both files ? Thanks for all your clarifications and hints, they save me a lot of troubles and smoking brain!
-
Yes, I would be happy to gather all the things I discovered and made to work, because before finding the right variables and the right procedures I had to face many errors, doubts, things not working, etc. So a FAQ summarizing all the steps that worked will be pretty useful for others. I am now trying to write the code for the pedestal (fuel valves and startup, eg starter knob) and the overhead, in order to be able to go from cold and dark to fully operative and configured plane without clicking on a single spot in the virtual cockpit, excluding the CDU that I don't have as hardware. Looking on the console, moving the valves send 2 controls, one to shut off the fuel, and one to switch off the starter. I tried to send 2 controls with SIOC but something goes wrong (probably a timing issue) and I get 2 times the same control instead of 2 different controls one after the other. I will try with LUA instead of SIOC but I can't remember if lua checks only the change in state of the vars (as SIOC does) or reads continuously the vars, in that case will send repeatedly the controls, and I'll have to set a flag to execute the controls only once (maybe the FS or L variable that read the status of the valve). I have only a concern about the events numer calculated upon the order of the event in the list. I have used many events now, and I'm worried that if FBW should add some new control all the numbers could be shifted and will be necessary to find them again an change the values in the code. Being able to call events by name (as happens with HVARS) would be a very interesting possibility, but I can imagine that is not at all easy to do...!
-
SOLVED! Hi John, after a lot of trial and errors, and checking the controls sent on the console, I understood that the number of the controls I needed wasn't the one in the file "A32NX.evt" but the one that appeared in the commands to be assigned to a button in FSUIPC interface, and this was confirmed because, assigning the controls A32NX.FCU_SPD_PUSH and A32NX.FCU_SPD_PULL in the console I saw 33032 and 33033. So this is the LUA code that solved and worked perfectly : BTN_SPD_MODE = ipc.readUB(0xA052) if (BTN_SPD_MODE == 1) then if (ipc.readUB(0xA009) == 0) then ipc.control(33032) else ipc.control(33033) end end while other functions of the FCU (like heading) are controlled by HVARS (and in theory there should be also for the speed but they don't work). BTN_HDG_MODE = ipc.readUB(0xA053) if (BTN_HDG_MODE == 1) then if (ipc.readUB(0xA00A) == 0) then ipc.activateHvar("H:A320_Neo_FCU_HDG_PUSH") else ipc.activateHvar("H:A320_Neo_FCU_HDG_PULL") end end BTN_ARPT = ipc.readUB(0xA056) if (BTN_ARPT == 1) then ipc.activateHvar("H:A320_Neo_MFD_BTN_ARPT_1") end All works very well now, I found some LVARS that gave me the information about the current state (MANAGED / SELECTED) that are 20=A32NX_AUTOPILOT_HEADING_SELECTED=UWA020 22=A32NX_AUTOPILOT_SPEED_SELECTED=UWA022 So checking the byte A020 and A022 I can switch from the current AP HDG and SPD value in managed mode (PUSH) to "---" displayed in selected mode (PULL) that looks very A320 style on a B737 MCP! Since I'm not having CTD for the moment, I love the FBW A320, it's a great plane. I'm currently using the last stable release (v0.7.4)
-
PS I mentioned HVARS (not controls) because under HVAR list I find 201: H:A320_Neo_FCU_HDG_PUSH 202: H:A320_Neo_FCU_HDG_PULL 203: H:A320_Neo_FCU_SPEED_INC 204: H:A320_Neo_FCU_SPEED_DEC 205: H:A320_Neo_FCU_VS_INC 206: H:A320_Neo_FCU_VS_DEC 207: H:A320_Neo_FCU_VS_PULL 208: H:A320_Neo_FCU_VS_PUSH 209: H:A320_Neo_FCU_ALT_PULL 210: H:A320_Neo_FCU_ALT_PUSH 211: H:A320_Neo_FCU_VS_INC_FPA 212: H:A320_Neo_FCU_VS_INC_VS 213: H:A320_Neo_FCU_VS_DEC_FPA 214: H:A320_Neo_FCU_VS_DEC_VS But there are not the HVARS H:A320_Neo_FCU_SPD_PULL and H:A320_Neo_FCU_SPD_PUSH that are supposed to exist (I found them somewhere under FBW documentation) but trying to activate them in LUA seems to have no effect (I used exactly the same code that worked with HDG_PUSH and HDG_PULL that works fine). BTW the only HVAR I found in the list was H:A320_Neo_FCU_MODE_MANAGED_SPEED, but strangely it turns on CSTR button in EFIS and has no effect with SPD controls.
-
Hi John, I need your help (yes, again...) The work with the implementation of FBW A320 functions on my cockpit is proceeding very well, I have a lot of controls already working fine, I solved some difficulties with encoders (that used to control directly a variable with ROTATE function in SIOC, now I have to use INC e DEC commands, but works), and other issues with lua code, mix between activation of HVARS and setting of LVARS, but after all nothing too difficult thanks to the advanced manual and your precious explanations and hints. Even the CTD issue is pretty kind with me at least in the last 3-4 days, and FBW A320 is a beautiful addon, great sounds and a lot of functions to enable! Now I am stuck with the A32NX.FCU_SPD_PUSH and A32NX.FCU_SPD_PULL functions. Under the HVAR list I couldn't find these two essential controls, it looks strange. But I found them under button assignment list, and they work, they work also under the calculator code, perfectly. I have an A32NX.evt file under FSUIPC7 dir, and this is the content : [Events] 0 = A32NX.FCU_AP_1_PUSH 1 = A32NX.FCU_AP_2_PUSH 2 = A32NX.FCU_AP_DISCONNECT_PUSH 3 = A32NX.FCU_ATHR_PUSH 4 = A32NX.FCU_ATHR_DISCONNECT_PUSH 5 = A32NX.FCU_SPD_INC 6 = A32NX.FCU_SPD_DEC 7 = A32NX.FCU_SPD_SET 8 = A32NX.FCU_SPD_PUSH 9 = A32NX.FCU_SPD_PULL 10 = A32NX.FCU_SPD_MACH_TOGGLE_PUSH ...... So A32NX.FCU_SPD_PUSH is the 8th position, It should be 32768 + 8 (I have only one evt file and there is only that group of events t.w.i.k.) and A32NX.FCU_SPD_PULL should be 32768 + 9 (that means 32776 and 32777) but issuing these 2 commands from SIOC doesn't work. Also in LUA I can only call controls by number and not by name, so I don't know how I'm missing to make them work... Can you help me ?
-
I have tested all I could figure out about the use of the vars I found under developer mode / behavior / A320_Neo_interior / Airliners but it's clear that MS/Asobo for the moment and despite all the requests I've seen on the net, seems not be going to release an update that allows cockpit builders, hardware and software producers to control the B: F: and maybe also O: variables. I think I reached the maximum level possible of interaction with default A320 available at the moment, and the cockpit is performing quite well after all. For the sake of study (and fun I hope) I will now switch to FBW A320, that seems to allow the use of all it's local and H: variables (besides giving a much wider functionality) BUT apparently it causes a lot of CTD to my PC configuration/cockpit addons - with FBW removed from community folder I'm having almost no CTD even using extensively FSUIPC, Mobiflight, SIOC, Spacedesk. The main aspect I hope to be able to manage is to create 2 profiles in order to switch from default A320 Neo to FBW A320 with only simple actions (ideally only selecting one or the other, but for sure I'll have to reload a SIOC and probably a MobiFlight configuration) I will also try to join the requests to ASOBO for the accessibility of B: and F: variables or "input events".
-
Yes, I read it and understood that it was not yet possible to handle these vars... Fortunately at least terrain display is Ok. Regarding the resolution of the image, I took it at 2560x1080 and didn't scale it down, if I click on it and use the "+" on magnifier glass it is shown at full resolution, unless it is compressed during transmission to the forum. Sorry.