Nenad Bogojevic
-
Posts
10 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Gallery
Downloads
Posts posted by Nenad Bogojevic
-
-
Hi John,
I discovered an issue with ipc.execCalcCode. As long as parameter sent is exactly the same, subsequent calls are not re-evaluated. As soon as there is a different expression, between those calls it works. The easiest way to spot it is toggle buttons - if there is expression behind only the first toggle works.
In following example only the first toggle is executed. There can be any amount of time between two calls - it can be on different events for example - it always toggles just once.
-- This toggles marker muteipc.execCalcCode("(A:MARKER BEACON TEST MUTE, Bool) ! (>K:MARKER_BEACON_TEST_MUTE)")-- Some time later-- This should toggle marker mute to original state, but it doesn'tipc.execCalcCode("(A:MARKER BEACON TEST MUTE, Bool) ! (>K:MARKER_BEACON_TEST_MUTE)")This code, however, toggles correctly:
-- This toggles marker muteipc.execCalcCode("(A:MARKER BEACON TEST MUTE, Bool) ! (>K:MARKER_BEACON_TEST_MUTE)")-- Some time later-- Dummy expression, always evaluates to 1 without side effectsipc.execCalcCode("1")-- This now toggle marker mute to original stateipc.execCalcCode("(A:MARKER BEACON TEST MUTE, Bool) ! (>K:MARKER_BEACON_TEST_MUTE)")If there is execution of any other different gauge expression between calls with same parameter, those work are executed.
Cheers,
Nenad.
- 1
-
8 hours ago, John Dowson said:
Here's one I tested - max characters allowed is 255 (or 256 with terminating \0)
No crash anymore and so far no problems with new exe file - error shown in the log when expression too long 👍
Quote17187 [ERROR]: Error setting Client Data Calculator Code: code contains 256 characters, max allowed is 255 -
2 hours ago, John Dowson said:
Have you actually tested with a calc code string > 64 characters? The limit I have currently set for this is 256 characters (and this can be increased relatively easily, but would require an update of the WASM module to handle), so maybe I was mistaken with the lua limit.
Just tested and it works with more than 64 char expressions - up to 255. Over that FSUIPC crashes.
-
Hello John,
Thanks a lot for this update. I have tested it, and lvars from the profile ini file were well mapped to offsets for read and write (and conditions 👍)
Meanwhile I have hit the 64 char limit for the ipc.execCalcCode, would it be possible to extend it to 128 or maybe even 256?Cheers,
Nenad
P.S. Here's list of hvars for DA40 TDI (different fron DA40-NG).
-
Hello John,
Just to share my experience: I had the same problem, FSUIPC didn't want to install WASM with the same message in the log file. I repeated the installation several times and at third time I think it succeeded - everything went through and was correctly installed. The main difference is that first time I was installing over the beta version, second time I first uninstalled 7.1.0 and then run installation again, and third time I installed over 7.1.0 and that is the one that work. It's just a data point - I don't think it is the real reason why it reports sometimes that the file cannot be opened.
Two other data point is that location C:\Users\<USERNAME>\AppData\Local\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalCache is a junction in my case - it is not directly present on this path but on something like D:\WpSystem\S-1-5-21-3016514674-886718977-4221065685-1001\AppData\Local\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalCache - that is the location where AppStore installs games on my machine. In my case that other directory is on different drive. Normally I don't see why this should make any issue as for Windows both should be the same.
Nenad
-
Hi John,
Just to thank you for new version. I've tested ipc.execCalcCode and it worked as expected.
As you mentioned here is a list of hvars for G1000 that I use for DA40-NG, but it works with other G1000 planes.
Cheers,
Nenad
-
Thanks a lot John 👍
For me, 64 chars are enough at the moment - would mean still having 20 char spare compared to longest expression I have.
Cheers,
Nenad
-
Hi John,
Is it or will it be possible to call execute calculator code from lua scripts?
Regards,
Nenad
-
For info, I was able to load FSUIPC7_WASM module using hack described in the post:
But 😭 I was not able to connect to it from the outside (neither WASMClient nor FSUIPC beta find it). Here are the log from WASM:
Thu Apr 15 21:59:49 2021 [ALWAYS]: <=============================== START OF PROGRAM ===============================>Thu Apr 15 21:59:49 2021 [INFO]: Ini file loaded from add-on packageThu Apr 15 21:59:49 2021 [INFO]: Ini file loaded from persistant storageThu Apr 15 21:59:49 2021 [DEBUG]: SimConnect connection opened okThu Apr 15 21:59:49 2021 [ALWAYS]: Maximum number of lvars/hvars per Client Data Area is 146Thu Apr 15 21:59:49 2021 [INFO]: Config Client Data Area mapped to ID 1Thu Apr 15 21:59:49 2021 [INFO]: Data Definition 1 added for Config Client Data Area definitionThu Apr 15 21:59:49 2021 [INFO]: Config Client Data Area created.Thu Apr 15 21:59:49 2021 [INFO]: Lvar Value Client Data Area mapped to ID 2Thu Apr 15 21:59:49 2021 [INFO]: Data Definition 2 added for Lvar Set Request Client Data Area definitionThu Apr 15 21:59:49 2021 [INFO]: Lvar Value Client Data Area created.Thu Apr 15 21:59:49 2021 [INFO]: Calculator Code Client Data Area mapped to ID 3Thu Apr 15 21:59:49 2021 [INFO]: Data Definition 3 added for Lvar Set Request Client Data Area definitionThu Apr 15 21:59:49 2021 [INFO]: Exec Calculator Code Client Data Area created.Thu Apr 15 21:59:49 2021 [INFO]: Lvar values CDA with id=4 mapped to name FSUIPC_lvalues0 [requestId=18]Thu Apr 15 21:59:49 2021 [INFO]: Lvar values Client data definition 4 added [requestID=19]Thu Apr 15 21:59:49 2021 [INFO]: Lvar values CDA created with id=4, (size=8192 for 1024 values), mapped to name FSUIPC_lvalues0 [requestId=20]Thu Apr 15 21:59:49 2021 [INFO]: Lvar values CDA with id=5 mapped to name FSUIPC_lvalues1 [requestId=21]Thu Apr 15 21:59:49 2021 [INFO]: Lvar values Client data definition 5 added [requestID=22]Thu Apr 15 21:59:49 2021 [INFO]: Lvar values CDA created with id=5, (size=8192 for 1024 values), mapped to name FSUIPC_lvalues1 [requestId=23]And here from FSUIPC7
610 *** FSUIPC WASM module not detected - not adding WASM menu
And WASM Client
Fri Apr 16 2021 00:09:50.346 [DEBUG]: SIMCONNECT_RECV_ID_CLIENT_DATA received: EVENT_CONFIG_RECEIVEDFri Apr 16 2021 00:09:50.346 [TRACE]: Empty config data received - requesting againFri Apr 16 2021 00:09:50.842 [TRACE]: Config data requested...
FSUIPC v7.2.0 beta support: Adding Lvars to Offsets
in FSUIPC7 MSFS
Posted
Just checked new exe and it worked fine 👍
Thanks a lot @John Dowson
Nenad