Jump to content
The simFlight Network Forums

John Dowson

Members
  • Posts

    12,287
  • Joined

  • Last visited

  • Days Won

    252

Everything posted by John Dowson

  1. Seems to be working fine as far as I can tell. I tested with the following lua script: When it is running and I press my joystick#1 button 6, I see 822891 LUA.6: Hot button changed: 3 I suggest you check how you are using this offset. John
  2. You are not upsetting me....don't worry about that. I am just not understanding you... You can, but only virtual button presses, via offset 0x3340. You cannot use a key assignment to trigger a button press from your yoke. But, there should be no need to. Just assign to the button press. Are the keypresses sent by your hardware seen by FSUIPC? This may be the issue. I know this is a problem in FSUIPC7, as this is an external program, and key presses sent by non-keyboard devices are not seen by FSUIPC7. So, the first thing to clear-up is if the keypresses sent by your hardware are seen and can be assigned in FSUIPC. Can they? And again, I'm not upset! If your device is a hid type device, you could try using lua to control it. There is a lua script available, called 'HidDemo.lua'. This will convert non-joystick hid device type button presses to virtual joystick button presses to which you can then assign. The lua should be available in the zip file Example LUA plugins.zip. If you don't have it (don't know if that was available in FSUIPC3) let me know and I can attach it. John
  3. One more thing - on your timer... You could assign your key press or button (the one that controls what actions the other keys/buttons perform) to toggle/set a virtual flag, and also start a lua script (in separate assignments, of course). The lua script can start a timer, and in the timer handling function, clear/toggle the virtual flag. This should be straight forward to implement. Alternatively, and maybe better to get a fixed timer period, you could just have your key/button set the virtual flag, and have an already tunning lua (i.e. auto-started) also waiting for the same keypress, and starting the timer when received, and again in the timer function you can reset/clear the virtual flag (or set/clear any others). John
  4. That is because you have IPC read logging activated. Your log files show nothing useful. For any future logs you attach, [lease just activate logging for buttons & keys and events - turn other logging off. And show the full log - you can zip it if its large. And I am still at a loss as to what you are actually trying to achieve. You say it works 100% for joystick buttons, by then also that your hardware is not a joystick and can only be programmed using key mapping. Before I look into this further, could you please try to explain what you are actually trying to achieve. Your previous descriptions don't make much sense to me I'm afraid. And you keep talking about a timer - as I said, this is not possible without resorting to lua, so please forget that for the time being. Can you please explain what you want to achieve with your key assignments, and in a way that does not refer to buttons or virtual buttons. We can see what virtual buttons/flags you need when I see the requirements for your assignments. It seems to me that you are making things overly complicated It seems you just want to change the assignments to certain keypresses based upon whether another key (or joystick button) has been pressed, no? A key or button press cannot call any procedure- it can only perform what has been assigned. And do not confuse button flags with buttons. If you set or change a button flag, this does not mean that the button is triggered and the assignment on that button is fired. And there is also no need to do this - the action should be triggered by the key press itself. You have multiple assignments on the key press to achieve this, one to set/clear/toggle a flag (or multiple assignments if you want to do this for more than one flag), and then additional assignments, with your compound statements, to send the actual control which would be dependent on what flags are set. In summary, key presses can set/clear/toggle button flags, they cannot trigger button presses (and there is no need!). Your key assignments can check the state of the button flags to determine what action to perform. Note also offset 0x3340 can be used to trigger virtual button presses, if needed. However, it does say 'externally signalled' - not sure why, but this may/probably means that they can't be used for 'internal' assignments, although I'm not sure why... John Later: I'm sure that offset can be used, just not sure why the documentation says 'externally'....
  5. So the issue is with Chase Plane, or with P3D, or the interaction between the two, and nothing to do with FSUIPC. As I said, it doesn't work for me, either with or without FSUIPC running. As this seems not related to FSUIPC at all, I don't think I can help you with this. I think I remember there was some sort of issue previously when using chase plane + fsuipc, but i thought that this was no longer applicable. Maybe it has returned, I don't know, but I believe this issue was solved by changing the order that these programs are started, so you could try that. John
  6. You can zip your log before attaching. The log you attached shows nothing except that your assignment #82 on button 157 (57) is working. Are you saying that nothing at all is logged when you activate button 164 (for example), even though you can see the assignment (to AP_SPD_VAR_INC) to this button in the button assignment panel? If this is the case, I cannot see how it can be recognised when the assignment panel is open but not when closed.... Please zip and attach a full log.
  7. Ok. I will check this when I get a chance and report back. John
  8. There is no such thing as the 'module' folder in FSUIPC7. There is only the FSUIPC7 installation folder (although you may still label that as 'Modules', but not necessary. It is greyed out as the lvars/hvars are not available yet. You need to have an aircraft loaded and ready-to-fly. There is no access to the WASM facilities when in the MSFS main menu. Sis you have an aircraft ready-to-fly? John
  9. It is the size if the simvar as held in the offset table, the second number, that you need to change, i.e. // offsets, size, simvar, type, units [, w] 0x66C0, 2, EXTERNAL POWER AVAILABLE, I32, Bool 0x66C2, 1, EXTERNAL POWER ON, I32, Bool I32 is the type of the simvar as received from simconnect and maps to the simconnect datatype SIMCONNECT_DATATYPE_INT32, so is actually 4 bytes. It is up to you to determine what values the simvar holds, and size the offset accordingly. John
  10. Yes, should be simpler. I'm not going to write it for you, but if you try I will help. The control number for the STEERING SET control is 66818 - use that control number. You just need one event.offset call, e.g. event.offset(tillerAxisOffset, "SD", "tillerAxisChange") and your handling function (defined before the event.offset):: function tillerAxisChange(offset, value) // calibrate your value here tillerValueCalibrated = ... ipc.control(66818 , tillerValueCalibrated ) end But, before you try that, you could try just reducing the axis range by adding null sections to the left and right. Doing this, the axis would send the full range in the centre section (between the null zones), and so a shorter axis section sends the full range, and thus the axis is more sensitive (and the extremes of your axis, the null zines, would have no affect). To do this, use the calibration page and the 'Set' buttons on the tiller axis with your axis control in the left and right positions where you want to set the max/min movement. If you combine this with a slope, you may achieve a sensitivity that works for you without lua. John
  11. Hi Andrew, I have just released a beta version of FSUIPC7 that allows you to add any simvar to an FSUIPC offset for reading and writing (if the simvar is writeable). I will release this officially sometime next week, but if you would like to try this, please see the following post: John
  12. That is outstanding sir! Look forward to it. This is now implemented in the attached beta version if you would like to try. No documentation yet - I'll add that and release officially sometime next week. To add a simvar to a free offset, create a file called myOffsets.txt in your FSUIPC7 installation folder. The format of each entry is: offset, size, simvar, type, units [, w] (where w signifies it is also writeable and is optional). For the units, check the MSFS documentation (use what the documentation states for that simvar, or any compatible unit if you want it converted). The type should be one of the following: I32 - 32-bit integer I64 - 64-bit integer F32 - 32-bit floating point number F64 - 64-bit floating point number S8,S32,S64,S128,S256,S260 - strings with the number indicating length LLA - 3* 32-bit floats (Latitude/Longitude/Altitude) XYZ - 3 * 64-bit doubles (values representing x,y,z positions) (NB. I could extend these if needed). The size should match the type/units, and will be the size used by the offsets. This can be smaller than the type, e.g. an I32/Bool ot I32/Enum can fit in 1 byte - you don't need 4 bytes (32 bits). Note also that the offset needs to be bound to the size. This means that if the size is 8, the last offset digit needs to be 0 or 8, if the size is 4, the last offset digit needs to be 0, 4, 8 or C, etc (but not for string types). Lines starting '//' are ignored. Here is an example myOffsets.txt file: Check your FSUIPC7.log file when using this, it should report any errors. John FSUIPC7.exe
  13. Hi @Djeez / Emile, I have now added the functionality to allow the user to add any simvar to a free user offset. I will release this at the weekend, but I have attached a beta below if you would like to test. To use this, create a file called myOffsets.txt and add the following content: This will add the simvar ELECTRICAL MASTER BATTERY:2 to offset 0x66C0 as 1 byte, for both reading and writing. Please change the offset to a free user offset if already using that one. Cheers, John FSUIPC7.exe
  14. You would write the axis value to an FSUIPC offset (send to FSUIPC offset) and use event.offset to get the axis value each time it changed, apply whatever calibration you require to that value, and then send it to the sim. I recently provided a similar lua script to handle the throttle for a specific use case which you could look at and adapt if you want to go down this route. See . John
  15. Btw, what aircraft are you using? It could be that the aircraft is not using the standard controls. To work out what to use, activate the required function in the aircraft IO and see what is logged. Many aircraft in MSFS, especially more complex aircraft, use lvars, hvars or complex calculator code. You could try searching for a MobiFlight preset that activates the required function in the MobiFlight HubHop preset list. If one is available, you can try assigning to that (MF presets were added in v7.2.16, the latest version). John
  16. Not sure why you would want to do this, but what do you see in the log when you press the 'o' key? I always need to see your log (or a log extract) - just saying nothing happens or it doesn't work is not enough. Show me the assignments (your FSUIPC3.ini) and the log produced when you press the button. You mean for a key or button to trigger a virtual button> It should be possible. I really need to see your FSUIPC3.ini to see what is happening rather than you keep pasting these individual lines. Give me a concrete example and I will take a look. However, I am extremely busy at the moment, so I won't have time to look at this until Sunday or Monday at the earliest. John
  17. This is normal. and is for historic reasons. FSUIPC only used to recognise up to 32 buttons (0-31) and a POV switch (buttons 32-39). Buttons 40 onwards are offset by 100, so button 50 would be 140, etc. What is CW/CCW? If by 1 you mean a press and 0 a release, then that is usual for rotary buttons. Could you show me your FSUIPC7.ini file, and an FSUIPC7.log file showing your issue (i.e. with button and event logging enabled, first turn the encoder that works in both directions, then one that doesn't). Show me the full log - do not start a new log file. You can zip it if its too large to attach as-is. John
  18. For more sensitivity (around the centre) you need a negative slope, not a positive one. Or do yo mean that you would like it to be less sensitive, i.e. the same axis movement to move the tiller less? Only the slope functionality is available to adjust the sensitivity of an axis. If you require more extreme calibration, you would have to write a lua script to control your axis where you can calibrate as you wish. John
  19. Strange...have the documentation been installed? I ask as this can occur if the unstaller cannot determine the location of your Documents folder from the registry. John
  20. I also experience a lot of crashes when the FBW and even when it isn't being used - just being installed in the Community folder can cause issues. I do use the dev version though (and don't update that often), maybe the stable is better. This is the MobiFlight request that you should vote for: https://forums.flightsimulator.com/t/enhanced-api-to-access-all-aircraft-state-and-trigger-all-cockpit-functions/454608 John
  21. it is untested but should be working. If you want to use it, go ahead. Report back if you have any issues and I will look into it. In fact, report back if it works as well and I will update the documentation to state it us working. Most, if not all, of the offsets marked as untested should work ok. John
  22. If course - if the program is an FSUIPC client program. Thats the purpose of WideFS/WideClient. John
  23. I wouldn't do it that way - see my example. Toggle the flag in a separate assignment, before the assignments that check the flag. And the button flag for the button you are pressing is automatically toggled - no need to explicitly toggle (or set) the flag again. No - they need to be known by FSUIPC (and be available via SimConnect). Og FSUIPC doesn't know about them, they are either not available via SimConnect or were missed/not known at the time. John
  24. No point in doing that really - I can't read anything in that image due to the resolution. Then it sounds like its one of the new B type variables. Did you read the link I posted about these (https://devsupport.flightsimulator.com/questions/1859/b-input-events-and-the-simconnect-and-gauge-apis-f.html)? You can try to see if that works as calculator code, i.e. (>B:AIRLINER_LS_Toggle) but I don't think it will work. That is what the post I referenced was talking about - no access to these new B-type variables at the moment either using SimConnect or WASM. I will have to wait for further functionality (and, hopefully, some documentation) from Asobo before these can be used. John
  25. I'm not sure why it says that, but then again I have never used FSUIPC3 - or even seen the documentation. That is why FSUIPC3 is not supported. My advice relates to FSUIPC4,5,6,7, and may apply to FSUIPC3, but I cannot be certain, sorry. Was thinking a bit more about your issue with the button flags. It should work - I tested something similar in FSUIPC6. Maybe its an issue in FSUIPC3, but I cannot test or do anything about this. However, why don't you just use an unused joystick button flag? For example, instead of: Change this to use, for example, the flag on joystick 15 button 2 (update to any joystick/button not in use), use: 100=P11,11,C1005,3842 101=CP(F+15,2)11,11,C1 102=CP(F-15,2)11,11,C2 The first assignment says execute Control 1005 whenever your button is pressed. Control 1005 is "Button Flag Toggle". The parameter '3842' identifies the Flag: 256 x joystick 15 + button 2. So, this flag will now alternate between being set and clear each time you press the button. John
×
×
  • 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.