Skip to content

Commit

Permalink
Add all the live data
Browse files Browse the repository at this point in the history
  • Loading branch information
flxkrmr committed Mar 31, 2023
1 parent 9726416 commit 016172a
Show file tree
Hide file tree
Showing 3 changed files with 246 additions and 38 deletions.
130 changes: 127 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,26 @@ <h3>
<td class="data-type">Coolant Temperature</td>
<td id="data-coolant-temp">-</td>
</tr>
<tr>
<td class="data-type">Coolant Temperature Sensor</td>
<td id="data-coolant-temp-sensor">-</td>
</tr>
<tr>
<td class="data-type">Air Temperature</td>
<td id="data-air-temp">-</td>
</tr>
<tr>
<td class="data-type">Air Temperature Sensor</td>
<td id="data-air-temp-sensor">-</td>
</tr>
<tr>
<td class="data-type">EGR Differential Pressure</td>
<td id="data-egr">-</td>
</tr>
<tr>
<td class="data-type">EGR Duty Cycle</td>
<td id="data-egr-duty-cycle">-</td>
</tr>
<tr>
<td class="data-type">Lambda</td>
<td id="data-lambda">-</td>
Expand All @@ -150,8 +162,8 @@ <h3>
<td id="data-ego">-</td>
</tr>
<tr>
<td class="data-type">Injection Pulse</td>
<td id="data-injection-pulse">-</td>
<td class="data-type">Injection Pulse (Fuel Pulsewidth)</td>
<td id="data-fuel-pulsewidth">-</td>
</tr>
<tr>
<td class="data-type">Ignition Timing</td>
Expand All @@ -161,6 +173,14 @@ <h3>
<td class="data-type">Speed</td>
<td id="data-speed">-</td>
</tr>
<tr>
<td class="data-type">Normalized air charge value</td>
<td id="data-air-charge">-</td>
</tr>
<tr>
<td class="data-type">Speed Unfiltered</td>
<td id="data-speed-unfiltered">-</td>
</tr>
<tr>
<td class="data-type">Barometric Pressure</td>
<td id="data-bp">-</td>
Expand All @@ -173,6 +193,110 @@ <h3>
<td class="data-type">Transmission Oil Temperature</td>
<td id="data-transmission-oil">-</td>
</tr>
<tr>
<td class="data-type">Idle Speed Control Duty Cycle</td>
<td id="data-idle-speed">-</td>
</tr>
<tr>
<td class="data-type">SCAP Sensor Frequency</td>
<td id="data-scap">-</td>
</tr>
<tr>
<td class="data-type">Adaptive fuel correction</td>
<td id="data-adaptive-fuel-correction">-</td>
</tr>
<tr>
<td class="data-type">Desired RPM</td>
<td id="data-desired-rpm">-</td>
</tr>
<tr>
<td class="data-type">Lowest filtered throttle position</td>
<td id="data-ratch">-</td>
</tr>
<tr>
<td class="data-type">Time since Startup</td>
<td id="data-time-since-startup">-</td>
</tr>
<tr>
<td class="data-type">OCC Input Level</td>
<td id="data-occ">-</td>
</tr>
<tr>
<td class="data-type">Neutral / Drive Input</td>
<td id="data-neutral-drive-input">-</td>
</tr>
<tr>
<td class="data-type">Converter Clutch</td>
<td id="data-converter-clutch">-</td>
</tr>
<tr>
<td class="data-type">Command Gear</td>
<td id="data-command-gear">-</td>
</tr>
<tr>
<td class="data-type">ETV Monitor Voltage</td>
<td id="data-etv-monitor-voltage">-</td>
</tr>
<tr>
<td class="data-type">EPC Pressure</td>
<td id="data-epc-pressure">-</td>
</tr>
<tr>
<td class="data-type">Transmission Oil Temperature</td>
<td id="data-transmission-oil-temperature">-</td>
</tr>
<tr>
<td class="data-type">PRNDL Position</td>
<td id="data-prndl-position">-</td>
</tr>
<tr>
<td class="data-type">Unknown (0x0A)</td>
<td id="data-not-used-0A">-</td>
</tr>
<tr>
<td class="data-type">Unknown (0x14)</td>
<td id="data-not-used-14">-</td>
</tr>
<tr>
<td class="data-type">Unknown (0x16)</td>
<td id="data-not-used-16">-</td>
</tr>
<tr>
<td class="data-type">Unknown (0x19)</td>
<td id="data-not-used-19">-</td>
</tr>
<tr>
<td class="data-type">Unknown (0x1C)</td>
<td id="data-not-used-1C">-</td>
</tr>
<tr>
<td class="data-type">Unknown (0x1D)</td>
<td id="data-not-used-1D">-</td>
</tr>
<tr>
<td class="data-type">Unknown (0x26)</td>
<td id="data-not-used-26">-</td>
</tr>
<tr>
<td class="data-type">Unknown (0x29)</td>
<td id="data-not-used-29">-</td>
</tr>
<tr>
<td class="data-type">Unknown (0x2C)</td>
<td id="data-not-used-2C">-</td>
</tr>
<tr>
<td class="data-type">Unknown (0x31)</td>
<td id="data-not-used-31">-</td>
</tr>
<tr>
<td class="data-type">Unknown (0x33)</td>
<td id="data-not-used-33">-</td>
</tr>
<tr>
<td class="data-type">Unknown (0x34)</td>
<td id="data-not-used-34">-</td>
</tr>
</tbody>
</table>
</div>
Expand All @@ -196,4 +320,4 @@ <h3>
<script src="./lib/serial.js"></script>
<script src="./lib/alert.js"></script>
<script src="./renderer.js"></script>
</html>
</html>
57 changes: 39 additions & 18 deletions lib/eec-iv.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,27 @@ class EecIvDecoder {
return ((word[1] & 0xF) << 8) | word[0]
}

toByte(word) {
if (!this.validWord(word) || !this.validChecksum(word)) {
return null;
}
return word[0];
}

toRpm(word) {
if (!this.validWord(word) || !this.validChecksum(word)) {
return null;
}
return this.toDec(word)*4
}

toDesiredRpm(word) {
if (!this.validWord(word) || !this.validChecksum(word)) {
return null;
}
return this.toDec(word)*16
}

toLambda(word) {
if (!this.validWord(word) || !this.validChecksum(word)) {
return null;
Expand Down Expand Up @@ -359,11 +373,18 @@ class EecIvDecoder {
return word[0] / 4;
}

toSpeedDec(word) {
toSpeedUnfilteredMph(word) {
if (!this.validWord(word) || !this.validChecksum(word)) {
return null;
}
return this.toDec(word);
return this.toDec(word) * 0.03125;
}

toSpeedUnfilteredKmh(word) {
if (!this.validWord(word) || !this.validChecksum(word)) {
return null;
}
return this.toSpeedUnfilteredMph(word) * 1.60934;
}

toSpeedMph(word) {
Expand Down Expand Up @@ -486,7 +507,7 @@ class EecIvDecoder {
liveData.calibrationInputVoltage = this.toDec(word);
break
case 0x0C:
liveData.fuelPulsewith = this.toInjectionPulseClk(word);
liveData.fuelPulsewidth = this.toInjectionPulseClk(word);
break

case 0x0D:
Expand Down Expand Up @@ -519,13 +540,13 @@ class EecIvDecoder {
liveData.idleSpeedDutyCycle = this.toDec(word);
break
case 0x16:
liveData.airflowMeter = this.toDec(word);
liveData.notUsed16 = this.toDec(word);
break
case 0x17:
liveData.speed = this.toSpeedKmh(word);
break
case 0x18:
liveData.speedUnfiltered = this.toHexString(word);
liveData.speedUnfiltered = this.toSpeedUnfilteredKmh(word);
break

case 0x19:
Expand All @@ -541,24 +562,24 @@ class EecIvDecoder {
liveData.notUsed1C = this.toHexString(word);
break

case 0x1C:
liveData.notUsed1C = this.toHexString(word);
case 0x1D:
liveData.notUsed1D = this.toHexString(word);
break
case 0x26:
liveData.notUsed26 = this.toHexString(word);
break
case 0x27:
liveData.airCharge = this.toHexString(word);
liveData.airCharge = this.toDec(word) * 0.0488;
break
case 0x28:
liveData.adaptiveFuelCorrection = this.toHexString(word);
liveData.adaptiveFuelCorrection = this.toDec(word) * 0.0625;
break

case 0x29:
liveData.notUsed29 = this.toHexString(word);
break
case 0x2A:
liveData.desiredRpm = this.toHexString(word);
liveData.desiredRpm = this.toDesiredRpm(word);
break
case 0x2B:
liveData.ratch = this.toRatch(word);
Expand All @@ -568,23 +589,23 @@ class EecIvDecoder {
break

case 0x2D:
liveData.timeSinceStartup = this.toHexString(word);
liveData.timeSinceStartup = this.toDec(word);
break
case 0x2E:
liveData.occ = this.toHexString(word);
liveData.occ = this.toDec(word);
break
case 0x2F:
liveData.neutralDriveInput = this.toHexString(word);
liveData.neutralDriveInput = this.toDec(word);
break
case 0x30:
liveData.converterClutch = this.toHexString(word);
liveData.converterClutch = this.toDec(word) * 0.0488;
break

case 0x31:
liveData.notUsed31 = this.toHexString(word);
break
case 0x32:
liveData.commandGear = this.toHexString(word);
liveData.commandGear = this.toByte(word);
break
case 0x33:
liveData.notUsed33 = this.toHexString(word);
Expand All @@ -597,17 +618,17 @@ class EecIvDecoder {
liveData.etvMonitorVoltage = this.toDec(word) / 4;
break
case 0x36:
liveData.epcPressure = this.toHexString(word);
liveData.epcPressure = this.toByte(word) / 2;
break
case 0x37:
liveData.transmissionOilTemperature = this.toDec(word);
break
case 0x38:
liveData.prndlPosition = this.toHexString(word);
liveData.prndlPosition = this.toByte(word);
break
}
}

return liveData;
}
}
}
Loading

0 comments on commit 016172a

Please sign in to comment.