Develop #10
@@ -150,11 +150,13 @@ namespace ClientApp.Utils
|
|||||||
Console.WriteLine("Set resistance identifier");
|
Console.WriteLine("Set resistance identifier");
|
||||||
if (this.handler == null)
|
if (this.handler == null)
|
||||||
{
|
{
|
||||||
|
// send that the operation was not successful if the handler is null
|
||||||
Console.WriteLine("handler is null");
|
Console.WriteLine("handler is null");
|
||||||
sendMessage(DataParser.getSetResistanceResponseJson(false));
|
sendMessage(DataParser.getSetResistanceResponseJson(false));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// set the resistance in the vr scene and send that it was successful
|
||||||
float resistance = DataParser.getResistanceFromJson(payloadbytes);
|
float resistance = DataParser.getResistanceFromJson(payloadbytes);
|
||||||
this.handler.setResistance(resistance);
|
this.handler.setResistance(resistance);
|
||||||
engineConnection.BikeResistance = resistance;
|
engineConnection.BikeResistance = resistance;
|
||||||
|
|||||||
Reference in New Issue
Block a user