Skip to content

Commit

Permalink
feat: Change formula for air flow rate for 2.0 GME. Add more units
Browse files Browse the repository at this point in the history
  • Loading branch information
tzebrowski committed Dec 3, 2023
1 parent f23e89c commit abaaefc
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 16 deletions.
8 changes: 4 additions & 4 deletions src/main/resources/giulia_2.0_gme.json
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@
"description": "Measured Air Flow\n Rate",
"min": "0",
"max": "1000",
"units": "g/s",
"formula": "(256 * A + B) * 0.01"
"units": "kg/h",
"formula": "parseFloat(((256 * A + B)/8).toFixed(2))"
},

{
Expand Down Expand Up @@ -842,8 +842,8 @@
"description": "Target Air Flow\n Rate",
"min": "0",
"max": "1000",
"units": "g/s",
"formula": "(256 * A + B) * 0.01"
"units": "kg/h",
"formula": "parseFloat(((256 * A + B)/8).toFixed(2))"
},

{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ public class MeasuredAirFlowRateTest implements Giulia_2_0_GME_Test {
@ParameterizedTest
@CsvSource(value = {
"62182F0000=0.0",
"62182F0055=0.85",
"62182F0055=10.63",
"62182F0A55=330.63",
"62182F0D55=426.63",
"62182F0F11=482.13",
"62182F1A11=834.13"
}, delimiter = '=')
public void parameterizedTest(String input, Double expected) {
assertEquals(input, expected);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@
public class MeasuredBoostPressureTest implements Giulia_2_0_GME_Test {

@ParameterizedTest
@CsvSource(value = {
"62195A03EC=1004",
@CsvSource(value = {
"62195A03E9=1001",
"62195A05EC=1516",
"62195A07AA=1962",
"62195A09AA=2474",
"62195A0ABC=2748",
"62195A0C11=3089",
}, delimiter = '=')
public void parameterizedTest(String input, Integer expected) {
assertEquals(input, expected);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,17 @@ public class MeasuredIntakeManifoldPressure implements Giulia_2_0_GME_Test {

@ParameterizedTest
@CsvSource(value = {
"621937011C=284.0",
"62193703E2=994.0"
"621937011C=284",
"62193703E2=994",
"62193703EB=1003",
"62193703E9=1001",
"62193705EC=1516",
"62193707AA=1962",
"62193709AA=2474",
"6219370ABC=2748",
"6219370C11=3089",
}, delimiter = '=')
public void parameterizedTest(String input, Double expected) {
public void parameterizedTest(String input, Integer expected) {
assertEquals(input, expected);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ public class SparkAdvanceTest implements Giulia_2_0_GME_Test {
@CsvSource(value = {
"6218120000=0.0",
"621812004B=4.69",
"621812001C=1.75"
"621812001C=1.75",
"621812011C=17.75",
"621812021C=33.75",
"621812031F=49.94"


}, delimiter = '=')
public void parameterizedTest(String input, Double expected) {
assertEquals(input, expected);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ public class TargetAirFlowRateTest implements Giulia_2_0_GME_Test {
@ParameterizedTest
@CsvSource(value = {
"6218300000=0.0",
"6218300055=0.85",
"6218300055=10.63",
"6218300A55=330.63",
"6218300D55=426.63",
"6218300F11=482.13",
"6218301A11=834.13"
}, delimiter = '=')
public void parameterizedTest(String input, Double expected) {
assertEquals(input, expected);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@ public class TargetBoostPressureTest implements Giulia_2_0_GME_Test {

@ParameterizedTest
@CsvSource(value = {
"62195903EC=1004",
"62195903E9=1001",
"62195905EC=1516",
"62195907AA=1962",
"62195909AA=2474",
"6219590ABC=2748",
"6219590C11=3089"
}, delimiter = '=')
public void parameterizedTest(String input, Integer expected) {
assertEquals(input, expected);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,16 @@ public class TargetIntakeManifoldPressure implements Giulia_2_0_GME_Test {

@ParameterizedTest
@CsvSource(value = {
"62181F0119=281.0",
"62181F03EB=1003.0",
"62181F0119=281",
"62181F03EB=1003",
"62181F03E9=1001",
"62181F05EC=1516",
"62181F07AA=1962",
"62181F09AA=2474",
"62181F0ABC=2748",
"62181F0C11=3089",
}, delimiter = '=')
public void parameterizedTest(String input, Double expected) {
public void parameterizedTest(String input, Integer expected) {
assertEquals(input, expected);
}
}

0 comments on commit abaaefc

Please sign in to comment.