wip
This commit is contained in:
@@ -21,6 +21,7 @@ namespace Server
|
||||
private string username = null;
|
||||
private DateTime sessionStart;
|
||||
private string fileName;
|
||||
private int temp;
|
||||
|
||||
|
||||
|
||||
@@ -150,6 +151,12 @@ namespace Server
|
||||
else if (payloadbytes.Length == 2)
|
||||
{
|
||||
saveData?.WriteDataRAWBPM(payloadbytes);
|
||||
temp++;
|
||||
if (temp > 50)
|
||||
{
|
||||
Console.WriteLine(BitConverter.ToString(this.saveData?.getBPMgraphData(100, 1)));
|
||||
temp = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -86,6 +86,7 @@ namespace Server
|
||||
{
|
||||
FileInfo fi = new FileInfo(this.path + rawBPMFilename);
|
||||
int length = (int)fi.Length;
|
||||
Console.WriteLine("length " + length);
|
||||
|
||||
byte[] output = new byte[outputSize];
|
||||
|
||||
@@ -95,13 +96,14 @@ namespace Server
|
||||
|
||||
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)
|
||||
{
|
||||
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
|
||||
int total = 0;
|
||||
|
||||
Reference in New Issue
Block a user