This commit is contained in:
fabjuuuh
2020-09-11 11:09:59 +02:00
parent 24ab1a01c1
commit 03a0c6febb
2 changed files with 4 additions and 3 deletions

View File

@@ -21,6 +21,8 @@ namespace Hardware.Simulators
private int cadence = 0;
private double resistance = 0;
byte[] array;
public BikeSimulator(IDataConverter dataConverter)
@@ -73,7 +75,7 @@ namespace Hardware.Simulators
private void CalculateVariables(float perlin)
{
this.speed = perlin * 5 / 0.001 ;
array = BitConverter.GetBytes(speed);
Console.WriteLine(speed);
this.distanceTraveled = (distanceTraveled+speed) % 256;

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Text;
using Hardware;
using Hardware.Simulators;
namespace ProftaakRH
@@ -14,8 +15,6 @@ namespace ProftaakRH
BikeSimulator bikeSimulator = new BikeSimulator(dataConverter);
bikeSimulator.StartSimulation();
bLEReceiver.Connect();
Console.ReadLine();
}
}