diff --git a/generateGraph.ts b/generateGraph.ts index 76c7200..98bccca 100644 --- a/generateGraph.ts +++ b/generateGraph.ts @@ -564,8 +564,8 @@ namespace microcode { if (this.drawSensorStates[this.sensors[sensor].getName()]) { const diff = Math.abs(this.processedCoordinates[sensor][i+1] - this.processedCoordinates[sensor][i+3]) - // const smoothing_rate = diff >= 15 ? 8 : 4 - const smoothing_rate = 1; + const smoothing_rate = diff >= 15 ? 8 : 4 + // const smoothing_rate = 1; // if (Math.abs(this.processedCoordinates[sensor][i+1] - this.processedCoordinates[sensor][i+3]) >= 0.) diff --git a/package.json b/package.json index 4001acf..678d033 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { "dependencies": { - "pxt-microbit": "^7.1.2" + "pxt-microbit": "^7.1.13" } } diff --git a/sensors.ts b/sensors.ts index 1477155..8cbb847 100644 --- a/sensors.ts +++ b/sensors.ts @@ -222,6 +222,7 @@ namespace microcode { // The number of measurements this sensor has left is displayed on the microbit 5x5 led grid; when the Arcade Shield is not connected. this.sensorWithMostTimeLeft = sensors[0] let mostTimeLeft = this.sensorWithMostTimeLeft.totalMeasurements * this.sensorWithMostTimeLeft.getPeriod() + this.sensors.forEach(sensor => { if ((sensor.totalMeasurements * sensor.getPeriod()) > mostTimeLeft) { mostTimeLeft = sensor.totalMeasurements * sensor.getPeriod()