**** BEGIN LOGGING AT Tue Mar 20 03:00:07 2018 Mar 20 03:06:52 how does the Shmem class work? In particular _fields_ = [ ("buf", c_uint32 * 8 * NUM_SAMPLES), ("head", c_uint32), Mar 20 03:07:27 buff has length NUM_SAMPLES, not 8*c_uint32*NUM_SAMPLES as I would expect Mar 20 03:07:29 ctypes.Structure is how you make structs... it's a bit awkward Mar 20 03:07:47 length of size? Mar 20 03:07:59 I've declared buf as uint32_t[8][NUM_SAMPLES] there Mar 20 03:08:14 Got is, so the asterick isn't multipication here? Mar 20 03:08:34 *asterisk Mar 20 03:08:34 it's the notation ctypes uses for arrays: type * count Mar 20 03:08:45 ok, cool Mar 20 03:13:28 One of the 4 bytes of ADC output data is a header (the first 8 bits) Mar 20 03:13:50 How easy would it be in python to remove this header (I would be fine with just setting it to 0). Mar 20 03:13:59 In c I would use a bitmask Mar 20 03:14:06 ditto in python Mar 20 03:14:22 Is the syntax pretty similar? Mar 20 03:14:26 identical Mar 20 03:14:48 oh I just realized I used / somewhere in my example, that should be // instead Mar 20 03:14:55 = floating point division, // = integer division Mar 20 03:15:11 Ok, I think it worked anyway. Mar 20 03:15:12 / = floating point division... sorry, irc client gobbled up the / :P Mar 20 03:15:41 maybe it works, but using floats there is bad and wrong Mar 20 03:15:50 Ok Mar 20 03:16:29 to be honest I think using a float to index into an array would have justified a TypeError Mar 20 03:16:34 To zero the header, for each frame that is read out sholuld I loop through each of the 8 samples and apply a bitmask? Mar 20 03:16:48 This seems kind of slow, but might be ok. Mar 20 03:17:25 using python probably *is* kind of slow :P Mar 20 03:18:13 Yeah, I want to plot like 1 second of data (or less) with a signal generator on the ADC input Mar 20 03:18:54 well if the buffer is big enough to hold 1 second of data you don't need to worry about processing performance :) Mar 20 03:19:08 just run pru for a second, halt it, and then process the buffer Mar 20 03:19:10 Lol, true. Mar 20 03:19:41 What's your estimate for the largest buffer I can make. There is 512mb of ram right? Mar 20 03:20:00 Not all of which will be available Mar 20 03:20:20 like I said, the size of the pru ddr memory can be configured via a module parameter Mar 20 03:20:27 I don't know how large it can be made without problems Mar 20 03:20:45 Do you think 8k samples will be a problem? Mar 20 03:21:51 the default is 256 KB Mar 20 03:23:09 you can bump it by creating a .conf file in /etc/modprobe.d/ containing: options uio_pruss extram_pool_sz=SIZE where SIZE is in bytes Mar 20 03:23:59 Cool! Mar 20 03:49:53 Getting close: https://pastebin.com/uF45DxTd Mar 20 03:50:23 I convert the buffer to an numpy array, then make it a signed int32, the left shift 8 bits then right shift 8 bits. Mar 20 03:51:27 Not quite right: https://pasteboard.co/HcIudSN.png Mar 20 03:51:37 I'm inputting a 10Hz sine wave Mar 20 04:39:08 hunter235711: half of that looks like you're interpreting signed values as if they're unsigned Mar 20 04:39:27 so probably the buffer should be an array of c_int32 rather than c_uint32 Mar 20 04:39:40 Hey Mar 20 04:39:59 who should I talk to about sponsorship for an event Mar 20 04:40:19 hunter235711: although there seems to be more odd stuff going on Mar 20 04:40:48 hunter235711: if I remember correctly from glancing at the datasheet, that header you're masking off contains the channel number right? maybe double-check for that sanity? Mar 20 04:43:23 hunter235711: also, you're trying to slurp the entire buffer while pru is still actively writing data, so that's going to cause a discontinuity at the very least Mar 20 04:44:21 halt the core, then check the head, and concatenate the [head:] and [:head] slices Mar 20 04:46:20 hunter235711: also your masking function looks like a nop to me Mar 20 04:46:53 maybe, not sure how numpy behaves if you do this Mar 20 04:54:18 I think you just want np.asarray(shmem.buf, dtype=np.int32) << 8 >> 8 Mar 20 04:54:38 assuming the data is actually signed Mar 20 04:56:03 ok it's signed Mar 20 14:18:17 Any tips on how to start weston.service on Stretch LXQT image... Can someone point me how to set up the weston.service file Mar 20 15:46:29 Hi Mar 20 15:47:09 I just went through the organisation information for software development using IoT in gsoc and I am interested Mar 20 15:47:52 where could i find the declaration of conformity for the beagle bone black? Mar 20 15:55:51 I purchased a beagleboard x15, what is the export control number Mar 20 21:11:04 Hello Mar 20 21:12:55 tomek242: tip: if you have a question, just ask it (and have patience for a reply). "hello" often doesn't get a response here Mar 21 02:42:33 Hi everyone, may I know how to flash a new image from sd card for the beagleboard x15. I can only find the info about BBB **** ENDING LOGGING AT Wed Mar 21 03:00:02 2018