From 5b9a8b81a6066a0c8a6b5f566633d294428731f9 Mon Sep 17 00:00:00 2001 From: Martin Schatz Date: Wed, 7 Dec 2022 12:32:26 +0100 Subject: [PATCH] Fix parsing of AirFlowRate --- lib/obdInfo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/obdInfo.js b/lib/obdInfo.js index a5a72d7..aa774a2 100644 --- a/lib/obdInfo.js +++ b/lib/obdInfo.js @@ -100,7 +100,7 @@ function convertSparkAdvance(byte) { return (parseInt(byte, 16) / 2) - 64; } function convertAirFlowRate(byteA, byteB) { - return (parseInt(byteA, 16) * 256.0) + (parseInt(byteB, 16) / 100); + return (parseInt(byteA, 16) * 256 + parseInt(byteB, 16)) / 100; } function convertThrottlePos(byte) { return parseInt(byte, 16) * (100 / 255);