From 03a0c6febb3c6e5b5e76a5b500f63cc7a8fb45ed Mon Sep 17 00:00:00 2001 From: fabjuuuh Date: Fri, 11 Sep 2020 11:09:59 +0200 Subject: [PATCH] Merged --- ProftaakRH/BikeSimulator.cs | 4 +++- ProftaakRH/Main.cs | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ProftaakRH/BikeSimulator.cs b/ProftaakRH/BikeSimulator.cs index 48f82b0..ed5903c 100644 --- a/ProftaakRH/BikeSimulator.cs +++ b/ProftaakRH/BikeSimulator.cs @@ -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; diff --git a/ProftaakRH/Main.cs b/ProftaakRH/Main.cs index 8420ab0..447e1ca 100644 --- a/ProftaakRH/Main.cs +++ b/ProftaakRH/Main.cs @@ -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(); } }