
John Dowson
Members-
Posts
13,304 -
Joined
-
Last visited
-
Days Won
271
Content Type
Profiles
Forums
Events
Gallery
Downloads
Everything posted by John Dowson
-
LUA file and button / keypress assignments
John Dowson replied to rustam's topic in FSUIPC Support Pete Dowson Modules
You could always put it in a separate file and 'require' it. Also, the parameter is just a 4byte (int) parameter. If your functions names are 4 characters or less, you can encode the function name as a hex sting and then use that. I've attached a simple example, in which you can assign to LuaValue with the parameters x464E31 for FN1 (46=F, 4E=N, 31=1) and x464e32 for FN2: function FN1() ipc.log("Function FN1() called!") end function FN2() ipc.log("Function FN2() called!") end local function bin2hex(s) s=string.gsub(s,"(.)",function (x) return string.format("%02X ",string.byte(x)) end) return s end -- Populate the conversion array - needs to be only done once local hex_to_char = {} for idx = 0, 255 do hex_to_char[("%02X"):format(idx)] = string.char(idx) hex_to_char[("%02x"):format(idx)] = string.char(idx) end function valueFunction(param) ipc.log("valueFunction: parameter="..param) -- Convert parameter to hex string hexString = string.format("%x",param) ipc.log("valueFunction: parameter as hex string ="..hexString) -- Convert hex string to ascII chars ascString = hexString:gsub("(..)", hex_to_char) ipc.log("valueFunction: parameter as ascII string ="..ascString) -- Call function from ascII string name _G[ascString]() end event.param("valueFunction") -
Why do you keep sending me useless logs? NEVER post me a continuation log. They are useless to me when investigating issues. I ALWAYS need to see a full log. And always with you latest FSUIPC7.ini file, as I have told you many times now. Also, when generating log files to investigate an issue, it is a good idea to try and remove all events that are continuously being logged (i.e. noise). To do this, use the DontLogThese ini parameter, in either your [General] or [Profile.<name>] sections. i.e. add this: DontLogThese=66065,67042
-
I'm not sure what could be causing this. Is FSUIPC seeing the first button press when this occurs? If you don;t know, try activating logging for Buttons & Keys as well as Events, open the log console and see what is logged when this occurs. You can paste the extract here if anything is logged and I will look into it. If nothing is logged, FSUIPC won't be seeing the initial keypress.
-
First, you posted in the FAQ sub-section, where it states NOT for support requests. I have moved your post to the main support forum. Please take care to post in the correct place in future. Not directly. However, you should be able to do this using lua, maybe using the lua socket library. To use this with FSUIPC, see Alternatively, there is also a WebSocket server for FSUIPC, which allows you to read/write data using WebSocket connections. See http://fsuipcwebsockets.paulhenty.com/. John
-
I'm not sure how this could be related to the AutoSave function. You could try logging events to see what events are being sent when this occurs. I'd be interested to know if other have seen this issue - I don't have the FSLabs A321. Not sure I understand this - you want to prevent (i.e. stop) autosave, but you still want to use the auro0save flights to load after a CTD? Anyway, to prevent autosave, you can disable in the usual way. There is also an FSUIPC added control that toggles the auto-save feature on//off, but only works if AutoSave is active (in your FSUIPC config/ini file). There is also a new control (latest FSUIPC6/7 betas only) that "manually" triggers and auto-save,
-
Reading other then UB or SB with LVARS.section
John Dowson replied to MarkStallen's topic in FSUIPC7 MSFS
That lvar is defined as for Output in the MF spreadsheet, which I think means that it is for reading only and cannot be written to. Are you saying that the offset doesn't hold the correct value? Does it not show the same value as when you list the lvars? if not, what is the value when listing and what is the value in the offset? -
FSUIPC v7.2.0 beta support: Adding Lvars to Offsets
John Dowson replied to John Dowson's topic in FSUIPC7 MSFS
@Nenad Bogojevic I'm not sure but I think it may be a timing issue. Can you try with an ipc.sleep call in between the two execCalcCode calls (try with 1000 initially and if that works, reduce). If that doesn't work, I will look into it. Thanks. -
It is not possible to tell what is happening for screen shots. Please attach your FSUIPC7.log and FSUIPC7.init files. We ALWAYS need to see these to lookl at such issues, not screen shots - they nearly always turn out to be useless.
-
Thanks! Ok, thats good. For overly sensitive controls, some folks have also found that extending the range of the axis, so that you get less movement in the sim, works for them. You can do this by editing the ini. So, for example, this is my Rudder calibration entry (in the [JoystickCalibration] section, and also any [JoystickCalibration.<profile>] sections: Rudder=-16384,-650,768,16255 If I extend the max/min entries thus: Rudder=-20384,-650,768,20255 you then get less travel in the sim for that axis. The downside, of course, is that you loose the full range of the axis. Some people find this useful, but it depends on the controls and aircraft. Just FYI, something else to try if curves on their own don't give you what you need.
-
Reading other then UB or SB with LVARS.section
John Dowson replied to MarkStallen's topic in FSUIPC7 MSFS
Are you sure that lvar exists? Just took a look at the lvars in the FBW A320, and it doesn't exist in the stable mod at least. Can you see it if you list the lvars (Add-ons->WASM->List Lvars)? These are the only A32NX_AUTOPILOT_* lvars I can see: A32NX_AUTOPILOT_APPR_MODE = 0.000000 A32NX_AUTOPILOT_FPA_SELECTED = 0.000000 A32NX_AUTOPILOT_LOC_MODE = 0.000000 A32NX_AUTOPILOT_TRACK_SELECTED:1 = 90.653481 -
You can zip it. That log file you posted doesn't contain anything useful. But, as I said, if assigning in MobiFlight, you need MobiFlight support, not FSUIPC support. And if assigning in FSUIPC, I need to see your FSUIPC7.ini file as well as the log. So no point in posting the log file really at the moment. As Pete has said, it just looks like you are using the heading as a signed value when it should be unsigned. That shouldn't be too difficult to trace.... And I still don't know why you said Alt+F isn't working, and there is no FSUIPC icon in your system tray.... that log file you did post shows the Alt+F hot key is registered:
-
Please try the attached version, v7.2.0b: FSUIPC7.exe I have only added the Light Potentiometer Set control. I will add the specific number ones (1-30) if/when requested. John
-
But what have you actually tried? What do you mean by 'Offset procedure'? Do you mean the new facility to add lvars to offsets? If so, that is only available in the latest 7.2.0a beta release - have you tried that? It is difficult for me to help you when you are not explaining what you have tried. Just saying 'nothing...' and 'I can't customize' doesn't help me. I need to know what you have tried, and what you see, and also see your logs and ini files (attached preferably, not selected contents pasted). And as I said, if using lvars/hvars, test them first using the facilities provided. Did you do that?
-
You posted your log file, but it was a continuation log file, i.e. you started a new log. I need to see the full log file, not a continuation log file. But, if you are assigning using MobiFlight, not FSUIPC, then you need MobiFlight support. If you are assigning in FSUIPC, I need also to see your FSUIPC7.ini file.
-
What is this? ....ok, you are using MobiFlight to access the offsets? Then you need to probably need MobiFlight support. If you are assigning in FSUIPC, we need to see your FSUIPC7.ini. The log you posted is also useless as it is a continuation log. Pease supply the full log file, and do not start a new/continuation log file. Then maybe you should ask the person who posted that video. I have no idea what 'codes' you are talking about, sorry.
-
The LIGHT_POTENTIOMETER_SET control/event are currently not flagged as axes controls. I can add/flag this as an axis control so that it is available in the axes assignments drop-down. Presumably this also applies to the LIGHT_POTENTIOMETER_*_SET (where * is 1,2,3..30), which I can also add. I'll post a version for you to try with this added later today.... John
-
Integers are either signed or unsigned. How are you reading and setting this value? You need to show us your FSUIPC ini and log files... As Pete says, we don't know where that log you posted came from or why you posted it - it is NOT from FSUIPC. Are you sure FSUIPC is running? If there is no FSUIPC icon in your system tray then it is not running. Why do you assume - why not just look for it and show it to us. If you don't know where this is, you can use the File -> Open Installation Folder... menu entry. Of course, FSUIPC needs to be running to do this....
-
LUA file and button / keypress assignments
John Dowson replied to rustam's topic in FSUIPC Support Pete Dowson Modules
I don't see an issue with using a function look-up-table, where you get the function to be used based on the integer parameter. You could monitor the offset that the axis changes (using event.offset), and call your function based on the value received. However, I think using the integer parameter and a look-up-table would be preferable. -
The logitech yoke and pedals are probably the most common yoke/pedals out there. Thats also what I used until recently, and it shouldn't be a problem setting them up on FSUIPC5. The assignments in FSUIPC6 are the same as in FSUIPC5. You should consult the User Guide, section The Easy Step-by-Step Way to Calibrate Your Controls. You should be able to calibrate to use the full range of your yoke. Calibration "slopes" are lso provided, so that you can make it more or less sensitive at different stages of travel. This is also available in FSUIPC5. Yes, brake calibration facilities are also provided. However, we don't allow you to sync left/right brakes - they are differential brakes after all. But you should be able to calibrate so that they useable. Really, its is best to just try. You could try setting your yoke/brakes up with P3Dv5/FSUIPC5 first. Otherwise, I could supply you with a trial/time-limit license to try FSUIPC6 if you prefer.
-
Yes, that is correct. Many aircraft continually emit certain events, with the events being different depending on the aircraft. You can such events using the DontLogThese ini parameter. Best to use in a profile. See the Advanced User Guide for details. No. But you have only assigned to the ALTITUDE_SLOT_INDEX_SET control. That should just switch to 'Managed' mode (as parameter=2). Doesn't it do that? Have you tried changing the altitude using the AUTOPILOT ALTITUDE LOCK VAR (offset 0x07D4)? And what does AUTOPILOT ALTITUDE LOCK VAR:3 hold (offset 0x0818)? Maybe try logging those offsets (using Log->Offsets... facility) and also try setting the lock VAR (LOCK VAR:3 is read-only). You can maybe also try using hvars to pull/push the VS knob - best to initially try using the WASM->Execute Calculator Code functionality. You can try with the following: to pull: (>H:A320_Neo_FCU_VS_PULL) to push: (>A320_Neo_FCU_VS_PUSH) They are the hvars in the current A320.hvar file. However, not sure if thats up to date - if they don't work, you can try the following: (>H:A320_Neo_FCU_VS_HOLD) (>H:A320_Neo_FCU_VS_PUSH)
-
And what happens if you try to increment with a different value using the Set Lvar... menu option? If you can set there, it should be the same via assignments and you are doing something wrong. Again, logging would help. And are you using the FBW mod or the stock A320? If the stick one, you should try the FBW mod instead. What does this mean? If you want to change the value based on the existing value, you would need to read the value first, apply whatever multiplier (ot function) you require, and then write the value back. If you want to do this, you would have to use a lua script.
-
Ok, but strange, Maybe you just needed to restart FSUIPC, or reload yout assignments if manually changing your files while FSUIPC is running.