frosch03
-
Posts
3 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Gallery
Downloads
Posts posted by frosch03
-
-
What are you writing for 120.0? It should be just the 16-bit value 0x2000
I'm writing two bytes, so exactly the 16-bit value, bcd-encoded. I can repeat this behaviour by writing exactly, what i get from the read.
>>> pyuipc.read(dat)
['\x00 ']
>>> pyuipc.write(dat, pyuipc.read(dat))
>>> pyuipc.read(dat)
['\x00\x00']
-
Hi There,
while trying to write into the COM1 standby frequency (Offset 0x311A) i'm running into a problem.
If i switch to frequency 120.000 inside the simulator, the reading is ok. But if i write back that same value and read again, i'm getting a different result.
>>> pyuipc.open(pyuipc.SIM_FSX)
>>> dat = pyuipc.prepare_data([(0x311A, 2)])
>>> pyuipc.read(dat)
['\x00 ']
>>> pyuipc.write(dat, ['\x00 '])
>>> pyuipc.read(dat)
['\x00\x00']
Is this behaviour know? Also, is it possible, that the '\x00' terminates the string?
I'm using the python sdk: UIPC_SDK_Python
thanks for your time,
Matthias
Is it possible to write the 120.000 and 130.000
in FSUIPC Support Pete Dowson Modules
Posted
My code should only illustrate, that i'm writing exactly what i'm reading.
I did not know about the logging feature, but this is brilliant :)
This should be the relevant part from the log:
To me this shows, that FSUIPC recieves the 0x0, which isn't the value i'm sending from the python code.
Also this point's out, that the problem isn't on the FSUIPC side. So sorry for bothering.
Just for information:
I debugged into the wrapper code, that provides the python interface to FSUIPC. Inside that code, c-strings
are used, to store the bytes that will later be handed over to the write function. My assumption is, that
somewere along the lines, the null-termination of the c-strings strikes, and only the 0x0 is handed over.
I've contacted the developer and will report back, if there is something new.
so long, thanks for your help,
Matthias