Skip to content

Commit

Permalink
adding ignition tweaks to 1.x ecus
Browse files Browse the repository at this point in the history
  • Loading branch information
James Portman committed May 25, 2022
1 parent 9071541 commit befb6e6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ecu-1x-shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -42,6 +44,8 @@ var (
"stopTestPurgeValve": ecu1xStopTestPurgeValve,
"increaseIdleSpeed": ecu1xIncreaseIdleSpeed,
"decreaseIdleSpeed": ecu1xDecreaseIdleSpeed,
"increaseIgnitionAdvanceOffset": ecu1xIncreaseIgnitionAdvanceOffset,
"decreaseIgnitionAdvanceOffset": ecu1xDecreaseIgnitionAdvanceOffset,
}
)

Expand Down Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions web-static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@ <h2><i class="fas fa-tools"></i> Commands/tests (MEMS 1.x)</h2>
<a class="btn btn-warning" onclick="runUserAction('increaseIdleSpeed'); return false;">Increase idle speed</a>
<a class="btn btn-warning" onclick="runUserAction('decreaseIdleSpeed'); return false;">Decrease idle speed</a>
</div>
<div class="btn-group">
<a class="btn btn-warning" onclick="runUserAction('increaseIgnitionAdvanceOffset'); return false;">Increase ignition advance offset</a>
<a class="btn btn-warning" onclick="runUserAction('decreaseIgnitionAdvanceOffset'); return false;">Decrease ignition advance offset</a>
</div>
<br/>
<br/>
<hr/>
Expand Down

0 comments on commit befb6e6

Please sign in to comment.