Skip to content

Commit

Permalink
feat: Add UniAir electorvalve PID for 2.0 GME
Browse files Browse the repository at this point in the history
  • Loading branch information
tzebrowski committed Dec 3, 2023
1 parent c6c19ee commit f23e89c
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 1 deletion.
22 changes: 21 additions & 1 deletion src/main/resources/giulia_2.0_gme.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@
"upperThreshold": 110
}
},

{
"priority": 0,
"id": "7005",
Expand Down Expand Up @@ -860,6 +861,25 @@
"alert": {
"upperThreshold": 3000
}
}
},


{
"priority": 2,
"id": "7052",
"mode": "22",
"pid": "198F",
"length": 2,
"description": "UniAir Electrovalve\n Temp",
"min": "-40",
"max": "160",
"units": "C",
"type": "INT",
"formula": "(A*256 + B)/8",
"alert": {
"upperThreshold": 110
}
}

]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* Copyright 2019-2023, Tomasz Żebrowski
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
package org.obd.metrics.codec.giulia_2_0_gme;

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

public class UniAirElectovalveTempTest implements Giulia_2_0_GME_Test {

@ParameterizedTest
@CsvSource(value = {
"62198F0000=0",
"62198F00A0=20",
"62198F00D0=26",
"62198F00FF=31",
"62198F01FF=63",
"62198F02FF=95",
"62198F03FF=127"
}, delimiter = '=')
public void parameterizedTest(String input, Integer expected) {
assertEquals(input, expected);
}
}

0 comments on commit f23e89c

Please sign in to comment.