diff --git a/values.js b/values.js index 315548f..3d7372e 100644 --- a/values.js +++ b/values.js @@ -358,9 +358,11 @@ export const Values = GObject.registerClass({ key: sessionKey, }); - // calculate speed for this interface - let speed = (value - previousValue[1]) / dwell; + // calculate speed for this interface - there is nothing to compare + // against the very first time an interface is seen + let speed = (previousValue)?(value - previousValue[1]) / dwell:0; let speedFormatted = this._legible(speed, 'speed', type, key); + output.push({ label, value: speedFormatted.text,