-
Notifications
You must be signed in to change notification settings - Fork 9
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
set_simdatum Warning log message #12
Comments
Interesting, i definitely haven't explored a lot of the non-float simvars. But it looks like that message comes from here pysimconnect/simconnect/scvars.py Line 78 in fc6b73e
So the easiest fix would be to add pysimconnect/simconnect/scvars.py Line 65 in fc6b73e
It's possible that a hack of passing one of the recognized int32 types like units='mask' to set_simdatum() would work too but i'm not sure. |
Thanks for the reply. What's interesting is that even though the simvar(s) are defined as "position", which according to the documentation should be a value 0-16K... in practice, the sim very much wants to receive a float value between -1 and 1. Trying to send a value of '100' for example, just results in full deflection of the stick/yoke. This is true if I set via my script or another simconnect capable tool like SPAD.neXt. With that being said, using one of the int32 types does suppress the warning log if you pass a integer value, but since the sim seems to want a float, it does not work. |
yes, the documentation does not seem entirely reliable in a lot of respects. but that explains why it was working with the default float value. so then I guess the right fix would be to add another case in scvars that checks `... elif u['name_std'] in ('position', ...) and return the float64 result before falling thru to the generic warning. |
as a short-term fix you could also build off the suggestion in the README and use |
Thanks. As I am just importing the simconnect library, I can't easily modify the type_for_unit function and the logging level is dependent on my own logger setup. For now, I have just added a filter to my logger to suppress this specific warning message. I thought about using a local copy of the package, but the log filter seemed easier :) |
Working on a script to send joystick x/y position via simconnect. Works just fine, however, no matter what unit type I specify, I get a warning logged
unrecognized Miscellaneous Unit in typefor(POSITION); using float64 as fallback
The relevant code is quite simple:
I have tried without specifying units (as in above example), I have tried
units=None
andunits="Position"
(as well as others like `DATATYPE_FLOAT64 which result in errors.)How can I call the simdatum method without generating these warnings? Like I said, it works fine, but it sure muddies up my log.
The text was updated successfully, but these errors were encountered: