Merged
This commit is contained in:
@@ -21,6 +21,8 @@ namespace Hardware.Simulators
|
|||||||
private int cadence = 0;
|
private int cadence = 0;
|
||||||
private double resistance = 0;
|
private double resistance = 0;
|
||||||
|
|
||||||
|
byte[] array;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public BikeSimulator(IDataConverter dataConverter)
|
public BikeSimulator(IDataConverter dataConverter)
|
||||||
@@ -73,7 +75,7 @@ namespace Hardware.Simulators
|
|||||||
private void CalculateVariables(float perlin)
|
private void CalculateVariables(float perlin)
|
||||||
{
|
{
|
||||||
this.speed = perlin * 5 / 0.001 ;
|
this.speed = perlin * 5 / 0.001 ;
|
||||||
|
array = BitConverter.GetBytes(speed);
|
||||||
|
|
||||||
Console.WriteLine(speed);
|
Console.WriteLine(speed);
|
||||||
this.distanceTraveled = (distanceTraveled+speed) % 256;
|
this.distanceTraveled = (distanceTraveled+speed) % 256;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Hardware;
|
using Hardware;
|
||||||
|
using Hardware.Simulators;
|
||||||
|
|
||||||
|
|
||||||
namespace ProftaakRH
|
namespace ProftaakRH
|
||||||
@@ -14,8 +15,6 @@ namespace ProftaakRH
|
|||||||
BikeSimulator bikeSimulator = new BikeSimulator(dataConverter);
|
BikeSimulator bikeSimulator = new BikeSimulator(dataConverter);
|
||||||
bikeSimulator.StartSimulation();
|
bikeSimulator.StartSimulation();
|
||||||
|
|
||||||
bLEReceiver.Connect();
|
|
||||||
|
|
||||||
Console.ReadLine();
|
Console.ReadLine();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user