From fab9cefc8499e693864e83d9ef4f3c11633879db Mon Sep 17 00:00:00 2001 From: flxkrmr Date: Tue, 4 Apr 2023 20:23:39 +0200 Subject: [PATCH] Improve output --- index.html | 1 - renderer.js | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index c4f4a08..c7b73e8 100644 --- a/index.html +++ b/index.html @@ -16,7 +16,6 @@ - Download
diff --git a/renderer.js b/renderer.js index d386ca4..42af213 100644 --- a/renderer.js +++ b/renderer.js @@ -287,10 +287,10 @@ async function serialConnect() { updateGuiValue(liveData.egrDutyCycle, (egr) => liveDataEgrDutyCycle.innerHTML = egr + " A/D count"); updateGuiValue(liveData.fuelPulsewidth, (fuelPulsewidth) => liveDataFuelPulsewidth.innerHTML = fuelPulsewidth + " clock ticks"); updateGuiValue(liveData.totalSparkAdvance, (totalSparkAdvance) => liveDataIgnitionTiming.innerHTML = totalSparkAdvance + "°"); - updateGuiValue(liveData.speed, (speed) => liveDataSpeed.innerHTML = speed + " km/h"); - updateGuiValue(liveData.speedUnfiltered, (speed) => liveDataSpeedUnfiltered.innerHTML = speed + " km/h"); - updateGuiValue(liveData.airCharge, (airCharge) => liveDataAirCharge.innerHTML = airCharge + " %"); - updateGuiValue(liveData.lambda1, (lambda) => liveDataLambda.innerHTML = lambda); + updateGuiValue(liveData.speed, (speed) => liveDataSpeed.innerHTML = speed.toFixed(1) + " km/h"); + updateGuiValue(liveData.speedUnfiltered, (speed) => liveDataSpeedUnfiltered.innerHTML = speed.toFixed(1) + " km/h"); + updateGuiValue(liveData.airCharge, (airCharge) => liveDataAirCharge.innerHTML = airCharge.toFixed(2) + " %"); + updateGuiValue(liveData.lambda1, (lambda) => liveDataLambda.innerHTML = lambda.toFixed(4)); updateGuiValue(liveData.ego1, (ego) => liveDataEgo.innerHTML = ego + " A/D count"); updateGuiValue(liveData.barometricPressure, (bp) => liveDataBarometricPressure.innerHTML = bp + " inHg"); updateGuiValue(liveData.manifoldAbsolutePressure, (map) => liveDataManifoldAbsolutePressure.innerHTML = map + " inHg"); @@ -298,7 +298,7 @@ async function serialConnect() { updateGuiValue(liveData.transmissionOilTemperature, (temp) => liveDataTransmissionOilTemperature.innerHTML = temp + " A/D count"); updateGuiValue(liveData.scap, (scap) => liveDataScap.innerHTML = scap + " A/D count"); updateGuiValue(liveData.idleSpeedDutyCycle, (dutyCycle) => liveDataIdleSpeed.innerHTML = dutyCycle + " A/D count"); - updateGuiValue(liveData.adaptiveFuelCorrection, (correction) => liveDataAdaptiveFuelCorrection.innerHTML = correction + " A/F"); + updateGuiValue(liveData.adaptiveFuelCorrection, (correction) => liveDataAdaptiveFuelCorrection.innerHTML = correction.toFixed(4) + " A/F"); updateGuiValue(liveData.desiredRpm, (rpm) => liveDataDesiredRpm.innerHTML = rpm); updateGuiValue(liveData.ratch, (ratch) => liveDataRatch.innerHTML = ratch); updateGuiValue(liveData.timeSinceStartup, (time) => liveDataTimeSinceStartup.innerHTML = time + " s");