From befb6e6ef5332deb96885ef32b7fb80f1b24baef Mon Sep 17 00:00:00 2001 From: James Portman Date: Wed, 25 May 2022 13:45:42 +0100 Subject: [PATCH] adding ignition tweaks to 1.x ecus --- ecu-1x-shared.go | 5 +++++ web-static/index.html | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ecu-1x-shared.go b/ecu-1x-shared.go index 792eb8f..690ebb3 100644 --- a/ecu-1x-shared.go +++ b/ecu-1x-shared.go @@ -26,6 +26,8 @@ var ( ecu1xStopTestPurgeValve = byte(0x08) ecu1xIncreaseIdleSpeed = byte(0x91) ecu1xDecreaseIdleSpeed = byte(0x92) + ecu1xIncreaseIgnitionAdvanceOffset = byte(0x93) + ecu1xDecreaseIgnitionAdvanceOffset = byte(0x94) ecu1xUserCommands = map[string] byte{ "clearfaults": ecu1xRequestClearFaults, @@ -42,6 +44,8 @@ var ( "stopTestPurgeValve": ecu1xStopTestPurgeValve, "increaseIdleSpeed": ecu1xIncreaseIdleSpeed, "decreaseIdleSpeed": ecu1xDecreaseIdleSpeed, + "increaseIgnitionAdvanceOffset": ecu1xIncreaseIgnitionAdvanceOffset, + "decreaseIgnitionAdvanceOffset": ecu1xDecreaseIgnitionAdvanceOffset, } ) @@ -338,6 +342,7 @@ func ecu1xParseData80(data []byte) { // // advance /= 2; // // advance -= 24; globalDataOutput["ignition_advance_raw"] = float32(data[0x16]) + globalDataOutput["ignition_advance"] = float32(data[0x16] / 2) } // // // TODO: 23-24 (x17-18) - coil time 0.002ms per lsb (16 bit) diff --git a/web-static/index.html b/web-static/index.html index a9cf16c..2593775 100644 --- a/web-static/index.html +++ b/web-static/index.html @@ -222,6 +222,10 @@

Commands/tests (MEMS 1.x)

Increase idle speed Decrease idle speed +
+ Increase ignition advance offset + Decrease ignition advance offset +