Skip to content

Commit 0a31c5e

Browse files
author
Ionut Dincu
committed
Changed Engine Coolant PID logic so that it works with the Hyundai AwesomeConnect Torque Pro plugin (available at play.google.com/store/apps/details?id=com.awesomeit.vehicleplus). Aditional logic changes required for this to also work with the Engine Oil PID as the current torqueService.getValueForPid method only returns the value for the first occurance of a PID. This is ok for the coolant value (as it is the first value returned for this PID), while the oil value is the 3rd value for this PID
1 parent c47ca0e commit 0a31c5e

File tree

4 files changed

+30
-7
lines changed

4 files changed

+30
-7
lines changed

app/src/main/java/com/mqbcoding/stats/DashboardFragment.java

+9-4
Original file line numberDiff line numberDiff line change
@@ -1444,7 +1444,9 @@ private void setupElement(String queryElement, TextView value, TextView label) {
14441444
label.setBackground(getContext().getDrawable(R.drawable.ic_heading));
14451445
break;
14461446
case "coolantTemperature":
1447-
case "torque-enginecoolanttemp_0x05":
1447+
//case "torque-enginecoolanttemp_0x05":
1448+
case "torque-enginecoolanttemp_0x-22DFAA":
1449+
14481450
label.setText("");
14491451
value.setText(FORMAT_TEMPERATURE0);
14501452
label.setBackground(getContext().getDrawable(R.drawable.ic_water));
@@ -1838,7 +1840,8 @@ private void setupClocks(String queryClock, Speedometer clock, TextView icon, Ra
18381840
setupClock(icon, "ic_oil", "", clock, true, "°", 0, 200, "float", "integer");
18391841
break;
18401842
case "exlap-coolantTemperature":
1841-
case "torque-enginecoolanttemp_0x05":
1843+
//case "torque-enginecoolanttemp_0x05":
1844+
case "torque-enginecoolanttemp_0x-22DFAA":
18421845
setupClock(icon, "ic_water", "", clock, true, "°", 0, 200, "float", "integer");
18431846
break;
18441847
case "exlap-outsideTemperature":
@@ -2249,7 +2252,8 @@ private void updateClock(String query, Speedometer clock, RaySpeedometer visray,
22492252
case "torque-oiltemperature_0x5c":
22502253
case "torque-catalysttemperature_0x3c":
22512254
case "torque-chargeaircoolertemperature_0x77":
2252-
case "torque-enginecoolanttemp_0x05":
2255+
//case "torque-enginecoolanttemp_0x05":
2256+
case "torque-enginecoolanttemp_0x-22DFAA":
22532257
case "torque-exhaustgastempbank1sensor1_0x78":
22542258
case "torque-exhaustgastempbank1sensor2_0xff1282":
22552259
case "torque-exhaustgastempbank1sensor3_0xff1283":
@@ -2616,7 +2620,8 @@ private void updateElement(String queryElement, TextView value, TextView label)
26162620
case "torque-catalysttemperature_0x3c":
26172621
case "torque-chargeaircoolertemperature_0x77":
26182622
case "torque-commandedequivalenceratiolambda_0x44":
2619-
case "torque-enginecoolanttemp_0x05":
2623+
//case "torque-enginecoolanttemp_0x05":
2624+
case "torque-enginecoolanttemp_0x-22DFAA":
26202625
case "torque-engineloadabsolute_0x43":
26212626
case "torque-fuellevel_0x2f":
26222627
case "torque-intakemanifoldpressure_0x0b":

app/src/main/res/values/arrays.xml

+4-2
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,8 @@
210210
<item>torque-commandedequivalenceratiolambda_0x44</item>
211211
<item>torque-o2sensor1equivalenceratio_0x34</item>
212212
<item>torque-chargeaircoolertemperature_0x77</item>
213-
<item>torque-enginecoolanttemp_0x05</item>
213+
<!-- <item>torque-enginecoolanttemp_0x05</item> -->
214+
<item>torque-enginecoolanttemp_0x-22DFAA</item>
214215
<item>torque-ambientairtemp_0x46</item>
215216
<item>torque-catalysttemperature_0x3c</item>
216217

@@ -485,7 +486,8 @@
485486
<item>torque-catalysttemperature_0x3c</item>
486487
<item>torque-chargeaircoolertemperature_0x77</item>
487488
<item>torque-commandedequivalenceratiolambda_0x44</item>
488-
<item>torque-enginecoolanttemp_0x05</item>
489+
<!-- <item>torque-enginecoolanttemp_0x05</item> -->
490+
<item>torque-enginecoolanttemp_0x-22DFAA</item>
489491
<item>torque-engineloadabsolute_0x43</item>
490492
<item>torque-fuellevel_0x2f</item>
491493
<item>torque-intakemanifoldpressure_0x0b</item>

app/src/main/res/values/ids.xml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<resources>
2+
<item type="id" name="icon"/>
3+
<item type="id" name="title"/>
4+
<item type="id" name="text"/>
5+
<item type="id" name="right_icon"/>
6+
<item type="id" name="icon_container"/>
7+
<item type="id" name="text_container"/>
8+
<item type="id" name="container"/>
9+
<item type="id" name="paged_scroll_view"/>
10+
<item type="id" name="max_width_layout"/>
11+
<item type="id" name="recycler_view"/>
12+
<item type="id" name="page_up"/>
13+
<item type="id" name="filler"/>
14+
<item type="id" name="scrollbar_thumb"/>
15+
<item type="id" name="page_down"/>
16+
</resources>

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77
google()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:3.1.4'
10+
classpath 'com.android.tools.build:gradle:3.2.1'
1111
classpath 'com.google.gms:google-services:4.2.0'
1212
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1313

0 commit comments

Comments
 (0)