Commit 7ede1518 authored by reza's avatar reza

add input to data get fascin8

parent 46f56166
......@@ -111,6 +111,7 @@ namespace I8Devices
gain = 24;
}
}
public class Device
{
private static string device_name = "No Device Found";
......@@ -465,13 +466,21 @@ namespace I8Devices
double[] data_converted = new double[25];
data_converted[0] = sample_count;
int i = 1;
for (int k = i; k < 24 + i; k++)
data_converted[1] = last_data_recieve[24]; // key inputs
int i = 2;
for (int k = i; k < 8 + i; k++)
{
data_converted[k] = (65536 * last_data_recieve[3 * (k - i) + 0]) + (256 * last_data_recieve[3 * (k - i) + 1]) + last_data_recieve[3 * (k - i) + 2];
if (data_converted[k] > 8388607) data_converted[k] = data_converted[k] - 16777216;
data_converted[k] = data_converted[k] * 0.536;
}
i = 10;
for (int k = i; k < 16 + i; k++)
{
data_converted[k] = (65536 * last_data_recieve[3 * (k) - 4]) + (256 * last_data_recieve[3 * (k) - 3]) + last_data_recieve[3 * (k) - 2];
if (data_converted[k] > 8388607) data_converted[k] = data_converted[k] - 16777216;
data_converted[k] = data_converted[k] * 0.536;
}
receiveBuffer.Add(data_converted);
newData_count ++;
// if (debug_mode) Console.WriteLine("DLL: Sample number " + sample_count + " has been received :)");
......@@ -485,7 +494,7 @@ namespace I8Devices
sample_count++;
double[] data_converted = new double[10];
data_converted[0] = sample_count;
data_converted[1] = last_data_recieve[24];
data_converted[1] = last_data_recieve[24]; // key inputs
int i = 2;
for (int k = i; k < 8 + i; k++)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment