Develop #10
@@ -155,19 +155,19 @@ namespace Server
|
||||
|
||||
}
|
||||
else if (DataParser.isRawDataBikeServer(message))
|
||||
{
|
||||
Bikedata = true;
|
||||
{
|
||||
//Bikedata = true;
|
||||
saveData?.WriteDataRAWBike(payloadbytes);
|
||||
Array.Copy(this.BikeDataBuffer, 0, this.BikeDataBuffer, 8, 8);
|
||||
Array.Copy(payloadbytes, 0, this.BikeDataBuffer, 0, 8);
|
||||
this.communication.Doctor?.sendMessage(DataParser.GetRawBikeDataDoctor(payloadbytes, this.username));
|
||||
//this.communication.Doctor?.sendMessage(DataParser.GetRawBikeDataDoctor(payloadbytes, this.username));
|
||||
}
|
||||
else if (DataParser.isRawDataBPMServer(message))
|
||||
{
|
||||
BPMdata = true;
|
||||
//BPMdata = true;
|
||||
saveData?.WriteDataRAWBPM(payloadbytes);
|
||||
Array.Copy(payloadbytes, 0, this.BikeDataBuffer, 0, 2);
|
||||
this.communication.Doctor?.sendMessage(DataParser.GetRawBPMDataDoctor(payloadbytes, this.username));
|
||||
Array.Copy(payloadbytes, 0, this.BPMDataBuffer, 0, 2);
|
||||
//this.communication.Doctor?.sendMessage(DataParser.GetRawBPMDataDoctor(payloadbytes, this.username));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -270,20 +270,10 @@ namespace Server
|
||||
|
||||
private void SendDataToDoctor(object sender, ElapsedEventArgs e)
|
||||
{
|
||||
/*if (Bikedata)
|
||||
{
|
||||
this.communication.Doctor?.sendMessage(DataParser.GetRawBikeDataDoctor(this.BikeDataBuffer.Take(8).ToArray(), this.username));
|
||||
this.communication.Doctor?.sendMessage(DataParser.GetRawBikeDataDoctor(this.BikeDataBuffer.Skip(8).ToArray(), this.username));
|
||||
Bikedata = false;
|
||||
|
||||
}
|
||||
if (BPMdata)
|
||||
{
|
||||
this.communication.Doctor?.sendMessage(DataParser.GetRawBPMDataDoctor(this.BPMDataBuffer, this.username));
|
||||
BPMdata = false;
|
||||
this.communication.Doctor?.sendMessage(DataParser.GetRawBikeDataDoctor(this.BikeDataBuffer.Take(8).ToArray(), this.username));
|
||||
this.communication.Doctor?.sendMessage(DataParser.GetRawBikeDataDoctor(this.BikeDataBuffer.Skip(8).ToArray(), this.username));
|
||||
this.communication.Doctor?.sendMessage(DataParser.GetRawBPMDataDoctor(this.BPMDataBuffer, this.username));
|
||||
|
||||
}*/
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user