-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible to send multiple vars in one request? #106
Comments
If you send them within the same render cycle there should be no jitter? |
Hi, Not sure if I am having the same issue, but here it goes. Lets say I want to read two SimVars, one after the other, during the same deltaTime (or render cycle as @fyyyyy suggests):
Somehow, if I do this, these two variables are read at different cycles (I can tell since I can relate one to the other due to configuration files). I have tested these with SimVar Watcher in MSFS2020, and as expected they are read at the same cycle; but not with SimConnect through Python. Any ideas how to solve this issue? @fyyyyy, how do you suggest to send them during the same render cycle? Thank you. PS: @vamshichittaluri did you solve it? |
This is probably a limitation of SimConnect, not related to python or this library in particular. |
Not really, we can do that on C# and C++ by controlling reading and writing SimVars at every deltaTime (every frame); SimVar Watcher, for example, works as expected. There is probably a way to do in Python-Simconnect, I'm just not sure and did not find any examples. Thank you in any case @fyyyyy |
Have you thought about running Python SimConnect multi-threaded? It could potentially solve your issue. I'm using this trick to make the Mobile Companion App run more smoothly. |
Not sure that would help, honestly. I am testing with very small python scripts and just a couple of simvars, so threading should not be the issue or solution in this case. There has to be a way to read a number of SimVars at a given frame cycle, like SimVar Watcher does. |
probalby configured here, try changing these enum def Python-SimConnect/SimConnect/Enum.py Line 152 in 13ff77f
use: Python-SimConnect/SimConnect/Attributes.py Line 216 in 7fe6be8
class SIMCONNECT_PERIOD(CtypesEnum): #
SIMCONNECT_PERIOD_NEVER = 0
SIMCONNECT_PERIOD_ONCE = 1
SIMCONNECT_PERIOD_VISUAL_FRAME = 2
SIMCONNECT_PERIOD_SIM_FRAME = 3
SIMCONNECT_PERIOD_SECOND = 4 |
Good idea. Will look at it ASAP!! Thank you!! |
Hey,
when we set data on the aircraft, instead of individually setting variables is it possible to send them at once? i've been seeing some jittering when i send more than one var immediately. Please suggest. I understand that in the simulation variables there are no structs to send them in as a structure, but I need help figuring out how to solve the jitter issue, when we set multiple vars via simconnect.
Kind Regards
Vamshi
The text was updated successfully, but these errors were encountered: