Skip to content

Commit

Permalink
feat: Add camshaft angle PIDs for 1.75tbi
Browse files Browse the repository at this point in the history
  • Loading branch information
tzebrowski committed Jul 30, 2023
1 parent c8628d8 commit 07e924a
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 1 deletion.
27 changes: 26 additions & 1 deletion src/main/resources/alfa.json
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,32 @@
"units": "%",
"formula": "parseFloat(((((A*256)+B)*(1000/65535))/10).toFixed(2))",
"stable": false
},
{
"priority": 0,
"id": "6034",
"mode": "22",
"pid": "196C",
"length": 2,
"description": "Camshaft desired angle",
"min": "0",
"max": "360",
"units": "degrees",
"formula": "parseFloat(((A*256+B)/128).toFixed(1))",
"stable": false
},
{
"priority": 0,
"id": "6035",
"mode": "22",
"pid": "196D",
"length": 2,
"description": "Camshaft actual angle",
"min": "0",
"max": "360",
"units": "degrees",
"formula": "parseFloat(((A*256+B)/128).toFixed(1))",
"stable": false
}

]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.obd.metrics.codec.giulietta_qv_med17_3_1;

import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;

public class CamshaftActualAngleTest implements Giulietta_QV_Med_17_3_1_Test {

@ParameterizedTest
@CsvSource(value = {
"62196D0000=00",
"62196D0A00=20",
"62196D09D0=19.60"
}, delimiter = '=')
public void parameterizedTest(String input, String expected) {
assertEquals(input, Double.parseDouble(expected));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.obd.metrics.codec.giulietta_qv_med17_3_1;

import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;

public class CamshaftDesiredAngleTest implements Giulietta_QV_Med_17_3_1_Test {

@ParameterizedTest
@CsvSource(value = {
"62196C0000=00",
"62196C0A00=20",
"62196C09D0=19.60"
}, delimiter = '=')
public void parameterizedTest(String input, String expected) {
assertEquals(input, Double.parseDouble(expected));
}
}

0 comments on commit 07e924a

Please sign in to comment.