Develop #10
@@ -21,6 +21,7 @@ namespace Server
|
|||||||
private string username = null;
|
private string username = null;
|
||||||
private DateTime sessionStart;
|
private DateTime sessionStart;
|
||||||
private string fileName;
|
private string fileName;
|
||||||
|
private int temp;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -150,6 +151,12 @@ namespace Server
|
|||||||
else if (payloadbytes.Length == 2)
|
else if (payloadbytes.Length == 2)
|
||||||
{
|
{
|
||||||
saveData?.WriteDataRAWBPM(payloadbytes);
|
saveData?.WriteDataRAWBPM(payloadbytes);
|
||||||
|
temp++;
|
||||||
|
if (temp > 50)
|
||||||
|
{
|
||||||
|
Console.WriteLine(BitConverter.ToString(this.saveData?.getBPMgraphData(100, 1)));
|
||||||
|
temp = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ namespace Server
|
|||||||
{
|
{
|
||||||
FileInfo fi = new FileInfo(this.path + rawBPMFilename);
|
FileInfo fi = new FileInfo(this.path + rawBPMFilename);
|
||||||
int length = (int)fi.Length;
|
int length = (int)fi.Length;
|
||||||
|
Console.WriteLine("length " + length);
|
||||||
|
|
||||||
byte[] output = new byte[outputSize];
|
byte[] output = new byte[outputSize];
|
||||||
|
|
||||||
@@ -95,13 +96,14 @@ namespace Server
|
|||||||
|
|
||||||
using (FileStream fileStream = new FileStream(this.path + rawBPMFilename, FileMode.Open, FileAccess.Read))
|
using (FileStream fileStream = new FileStream(this.path + rawBPMFilename, FileMode.Open, FileAccess.Read))
|
||||||
{
|
{
|
||||||
for (int i = 1; i >= outputSize; i++)
|
for (int i = 1; i <= outputSize; i++)
|
||||||
{
|
{
|
||||||
if (length - (i * readSize) < 0)
|
if (length - (i * readSize) < 0)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
fileStream.Read(readBuffer, length - (i * readSize), readSize);
|
Console.WriteLine("reading " + (length - (i * readSize) - 1) + " and size " + readSize);
|
||||||
|
fileStream.Read(readBuffer, length - (i * readSize) - 1, readSize);
|
||||||
|
|
||||||
//handling data
|
//handling data
|
||||||
int total = 0;
|
int total = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user