s1 = series (1, pos);
s2 = series (4, pos);
s3 = series (5, pos);
s4 = series (6, pos);
pid = 4.0 * s1 - 2.0 * s2 - s3 - s4;
(*(f)) = pid;
(*(d)) = (int) pid;
When this code prints them out
e_read(&dev, row, col, 0x2000, &d, sizeof(int));
e_read(&dev, row, col, 0x3000, &f, sizeof(float));
printf ("%.8s - %d - %f\n", c, d, f);
fflush(stdout);
I get 00000000 - -1 - -0.737241
Hopefully not just a stupid byte alignement thing I am missing, but I don't think so.
If I add 2.0 to pid before returning the float and the int, I get the expected results
00000000 - 1 - 1.262759Statistics: Posted by capnrob97 — Fri Jul 24, 2015 11:29 pm
]]>