Skip to content

Commit

Permalink
Merge pull request #36 from carleeno/addPackets
Browse files Browse the repository at this point in the history
Add steering and pedal inputs to model3
  • Loading branch information
amund7 authored Oct 11, 2019
2 parents 2684b5e + 538b182 commit d13fb45
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion CANBUSAnalyzer/Model3Packets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,17 @@ public Model3Packets(MainWindow mainWindow) : base(mainWindow) {
ExtractSignalFromBytes(bytes, 12, 12, false, 0.08, -40, false));
//((bytes[2] + ((bytes[3] & 0xF) << 8)) - 500) / 20.0 * miles_to_km);


packets.Add(0x129, p = new Packet(0x129, this));
p.AddValue("Steering Angle", "Deg", "p", (bytes) =>
ExtractSignalFromBytes(bytes, 16, 14, false, 0.1, -819.2));
p.AddValue("Steering Speed", "D/S", "p", (bytes) =>
ExtractSignalFromBytes(bytes, 32, 14, false, 0.5, -4096));

packets.Add(0x118, p = new Packet(0x118, this));
p.AddValue("Accelerator Pedal", "%", "p", (bytes) =>
ExtractSignalFromBytes(bytes, 32, 8, false, 0.4, 0));
p.AddValue("Brake Pedal", "On/Off", "p", (bytes) =>
ExtractSignalFromBytes(bytes, 19, 2, false, 1, 0));

packets.Add(0x3F2, p = new Packet(0x3F2, this));
p.AddValue("DC Charge total", "kWH", "b", (bytes) => {
Expand Down

0 comments on commit d13fb45

Please sign in to comment.