@Sean Landerkin

I found a bug: the p1 pointer computation is wrong. Only the first and all 
odd chunks contain valid data. The even chunks contain garbage.

In order to get valid data you'll have to replace the line

p1 = cast(byref(p0, half), POINTER(c_ushort))

by

p1 = cast(byref(p0.contents, (half << 1)), POINTER(c_ushort))

(Computing simple pointers is pretty complicated in Python.)

Am Dienstag, 30. April 2019 03:20:45 UTC+2 schrieb Sean Landerkin:
>
> Okay, do you understand how the data is written in C, and how in C I could 
> convert the data to readable data? I think I understand how to transport 
> that from C to python but I don't understand the initial translation from 
> the written form to a human-readable form.
>

The code from Dennis works reading the data (needs python3). In order to 
scale to [mV] multiply the raw data (=samp[0]) by factor 1800/4095, or use 
1.8/4095 for [V].

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/c82b6512-88c0-4512-a5b0-d538f239704f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to