From ce5f2046b2e89d0314cb2c4f9a0e365243f6eb75 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 20 Jan 2020 14:58:51 +0000 Subject: [PATCH] Fix PSI --- index.html | 2 +- main.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index e993956..72a5d8e 100644 --- a/index.html +++ b/index.html @@ -141,7 +141,7 @@ var d=e.data; this.currentSpeed=d.speed; this.currentRPM=d.rpm; - this.currentPSI=d.psi.toFixed(2); + this.currentPSI=parseFloat(d.psi)/2.036.toFixed(2); } } diff --git a/main.go b/main.go index d844b23..ac4ccc9 100644 --- a/main.go +++ b/main.go @@ -74,6 +74,7 @@ func subscribe(w http.ResponseWriter, r *http.Request) { return } time.Sleep(100 * time.Millisecond) + iterator++ } }