Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -81,23 +81,23 @@ android {
resValue "string", "DEFAULT_PROFILE", "profile_8"
resValue "string", "applicationId", "org.obd.graphs.my.giulia.aa"
applicationId "org.obd.graphs.my.giulia.aa"
versionCode 222
versionCode 223
}

giuliaPerformanceMonitor {
dimension "version"
resValue "string", "DEFAULT_PROFILE", "profile_8"
resValue "string", "applicationId", "org.obd.graphs.my.giulia.performance_monitor"
applicationId "org.obd.graphs.my.giulia.performance_monitor"
versionCode 103
versionCode 104
}

giulia {
dimension "version"
resValue "string", "DEFAULT_PROFILE", "profile_3"
resValue "string", "applicationId", "org.obd.graphs.my.giulia"
applicationId "org.obd.graphs.my.giulia"
versionCode 75
versionCode 76
}
}

Expand Down
128 changes: 128 additions & 0 deletions app/src/main/assets/2_0_gme_trw_climate_control.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
profile_20.pref.adapter.connection.type=bluetooth
profile_20.pref.adapter.power.switch_network_on_off=false
profile_20.pref.gauge_display_scale=false
profile_20.pref.gauge_display_command_rate=true
profile_20.pref.gauge_background_color=-14926478
profile_20.pref.gauge.fps="4"
profile_20.pref.adapter.power.start_data_logging.after="10"
profile_20.pref.adapter.id=
profile_20.pref.graph.view.enabled=true
profile_20.pref.adapter.init.delay_after_reset="500"
profile_20.pref.adapter.init.delay="500"
profile_20.pref.trips.recordings.save.short.trip=false
profile_20.pref.graph.x-axis.start-moving-after.time="20000"
profile_20.pref.toolbar.hide.connected=false
profile_20.pref.dash.background_color_1=-14926478
profile_20.pref.giulia.view.enabled=true
profile_20.pref.toolbar.hide.doubleclick=true
profile_20.pref.graph.trips.selected=
profile_20.pref.dash.swipe.to.delete=false
profile_20.pref.dash.top.values.red.color=false
profile_20.pref.pids.generic.high=[22, 7002, 13, 15, 7003, 7006, 6, 7005, 7018, 7029, 7007]
profile_20.pref.pids.generic.low=[7002, 7013, 7015, 15, 7003, 7014, 7017, 7016, 7027, 7020, 6, 7019, 7025]
profile_20.pref.gauge.pids.selected=[17079, 7002, 7013, 7004, 7003, 7025, 7016, 7009]
profile_20.pref.gauge.pids.selected.1=[88008, 88007, 88006, 88005, 88004, 88003, 88002, 88001, 88000]
profile_20.pref.gauge.pids.selected.2=[]
profile_20.pref.gauge.pids.selected.3=[]
profile_20.pref.gauge.pids.selected.4=[]
profile_20.pref.gauge.pids.selected.5=[]
profile_20.pref.gauge.pids.selected.6=[]
profile_20.pref.gauge.pids.selected.7=[]
profile_20.pref.gauge.pids.selected.8=[]
profile_20.pref.gauge.virtual.selected="1"
profile_20.pref.dash.view.enabled=false
profile_20.pref.adapter.cache.result.enabled=false
profile_20.pref.adapter.connection.tcp.host=192.168.0.10
profile_20.pref.adapter.connection.tcp.port="35000"
profile_20.pref.adapter.adaptive.enabled=false
profile_20.pref.dash.gauge.view.visible=false
profile_20.pref.graph.x-axis.minimum-shift.time="20"
profile_20.pref.profile.id=profile_20
profile_20.pref.adapter.power.screen_off=false
profile_20.pref.graph.cache.enabled=true
profile_20.pref.adapter.batch.enabled=true
profile_20.pref.adapter.init.protocol=CAN_USER1
profile_20.pref.adapter.init.sequence=MS_CAN
profile_20.pref.adapter.command.freq="4"
profile_20.pref.adapter.power.connect_adapter=false
profile_20.pref.debug.generator.enabled=false
profile_20.pref.trips.recordings.display_info=false
profile_20.pref.dash.top.values.blink=false
profile_20.pref.graph.pids.selected=[88008, 88007, 88006, 88005, 88004, 88003, 88002, 88001, 88000]
profile_20.pref.graph.pids.selected.1=[88008, 88007, 88006, 88005, 88004, 88003, 88002, 88001, 88000]
profile_20.pref.gauge.view.enabled=true
profile_20.pref.toolbar.hide.landscape=false
profile_20.pref.dash.background_color_2=-14926478
pref.profile.names.profile_20=Climate Control (2.0 GME, vLinker MS)
profile_20.pref.adapter.init.mode.selected=mode_1
profile_20.pref.adapter.init.mode.header_value.mode_2=DA10F1
profile_20.pref.adapter.init.mode.id_value.mode_2="22"
profile_20.pref.adapter.init.mode.header_value.mode_1=DB33F1
profile_20.pref.adapter.init.mode.id_value.mode_1="01"
profile_20.pref.adapter.init.mode.id="01"
profile_20.pref.adapter.init.mode.header=DB33F1
profile_20.pref.adapter.init.mode.header_value.mode_4=DA18F1
profile_20.pref.adapter.init.mode.id_value.mode_4="555"

profile_20.pref.adapter.init.mode.header_value.mode_5=DA60F1
profile_20.pref.adapter.init.mode.id_value.mode_5="444"

profile_20.pref.adapter.init.mode.header_value.mode_6=DAC7F1
profile_20.pref.adapter.init.mode.id_value.mode_6="666"

profile_20.pref.adapter.init.mode.header_value.mode_7=DA60F1
profile_20.pref.adapter.init.mode.id_value.mode_7="INSTRUMENT_PANEL"

profile_20.pref.adapter.init.mode.header_value.mode_8=DA28F1
profile_20.pref.adapter.init.mode.id_value.mode_8="ABS"

profile_20.pref.adapter.init.mode.header_value.mode_9=DA1AF1
profile_20.pref.adapter.init.mode.id_value.mode_9="DTCM"

profile_20.pref.adapter.init.mode.header_value.mode_10=DA10F1
profile_20.pref.adapter.init.mode.id_value.mode_10="GME20"

profile_20.pref.adapter.init.mode.header_value.mode_11=DA98F1
profile_20.pref.adapter.init.mode.id_value.mode_11="TRW_CLIMATE_CONTROL"

profile_20.pref.adapter.init.fetchDeviceProperties=true
profile_20.pref.adapter.init.fetchSupportedPids=true
profile_20.pref.pids.registry.list=[trw_climate_control.json]
profile_20.pref.datalogger.supported.pids=[]
profile_20.pref.adapter.graceful_stop.enabled=false
profile_20.pref.pids.registry.filter_pids_ecu_supported=false
profile_20.pref.pids.registry.filter_pids_stable=false

## Android Auto settings
profile_20.pref.aa.pids.selected=[7002, 7003, 7014, 7025, 6, 7005, 7016, 7019, 7018, 7029]
profile_20.pref.aa.pids.profile_1=[7002, 7003, 7014, 7025, 6, 7005, 7016, 7019, 7018, 7029]
profile_20.pref.aa.pids.profile_2=[7002, 7003, 7025, 6]
profile_20.pref.aa.pids.profile_20=[7015, 7014, 7019, 7020]
profile_20.pref.aa.pids.profile_4=[7002, 7005, 7007]
profile_20.pref.aa.surface.fps="10"

#reconnect settings
profile_20.pref.adapter.reconnect=false
profile_20.pref.adapter.reconnect.max_retry="3"
profile_20.pref.profile.about=This profile contains Alfa Romeo 2.0 GME ECU specific settings. It fits cars like Alfa Romeo Giulia and Stelvio.


profile_20.pref.giulia.pids.selected=[88008, 88007, 88006, 88005, 88004, 88003, 88002, 88001, 88000]
profile_20.pref.giulia.pids.selected.1=[88008, 88007, 88006, 88005, 88004, 88003, 88002, 88001, 88000]
profile_20.pref.adapter.batch.size="3"
profile_20.pref.adapter.batch_01.size="3"

profile_20.pref.profile.2_0_GME_extension.enabled=true
profile_20.pref.aa.trip_info.pids.selected=[7021, 7076, 7035, 7002, 7037, 7014, 7047, 7025, 7003, 7036, 7028, 7016, 17078, 7005, 7020, 7019, 7018, 7009]
profile_20.pref.aa.drag_race.debug.vehicle_speed_measurement=false

profile_20.pref.query.performance.break_boosting.gas_pid=7007
profile_20.pref.query.performance.break_boosting.arbitrary_pid=7028
profile_20.pref.query.performance.break_boosting.vehicle_speed_pid=7046

profile_20.pref.aa.performance.pids.selected=[7021, 7047, 7025, 7003, 7009, 7016, 7002, 7028, 7005, 7036, 7007]
profile_20.pref.query.performance.top=[7021, 7047, 7025, 7003, 7009, 7016, 7002, 7036, 17079, 7017, 7029, 7026, 7008, 7041, 17107, 17108]
profile_20.pref.query.performance.bottom=[7028, 7005, 7007, 7046, 17111]
profile_20.pref.query.performance.hidden=[7036]

profile_20.pref.adapter.query.individual.enabled=true
1 change: 1 addition & 0 deletions app/src/main/res/values-pl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@
<string name="pref.adapter_delay_reset">Opóźnienie po komendzie resetowania (ATZ)</string>

<string name="pref.adapter_init_protocol">Protokół</string>
<string name="pref.adapter_init_sequence">Sekwencja inicjalizacyjna</string>
<string name="pref.general_settings">Ustawienia ogólne</string>
<string name="pref.adapter.general_settings">Ustawienia zaawansowane</string>
<string name="pref.adapter.batch_settings">Ustawienia trybu wsadowego</string>
Expand Down
11 changes: 11 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,8 @@
<string name="pref.adapter_delay_reset">Delay after reset command (ATZ)</string>

<string name="pref.adapter_init_protocol">Protocol</string>
<string name="pref.adapter_init_sequence">Init Sequence</string>

<string name="pref.general_settings">General settings</string>
<string name="pref.adapter.general_settings">Advanced settings</string>
<string name="pref.adapter.batch_settings">Batch settings</string>
Expand Down Expand Up @@ -759,8 +761,17 @@
<item name="AUTO">AUTO</item>
<item name="CAN_11" tools:ignore="Typos">CAN_11</item>
<item name="CAN_29">CAN_29</item>
<item name="CAN_USER1" tools:ignore="Typos">CAN_USER1</item>
</string-array>

<string-array name="pref.init_sequence">
<item name="DEFAULT">DEFAULT</item>
<item name="MS_CAN" >MS_CAN</item>
<item name="HS_CAN">HS_CAN</item>
<item name="CH_CAN" tools:ignore="Typos">CH_CAN</item>
</string-array>


<!-- Extracted from layouts -->
<string name="dtc.freeze_frame_data">UDS Freeze Frame Data</string>
<string name="dtc.action_google_issue">Google Issue</string>
Expand Down
8 changes: 8 additions & 0 deletions app/src/main/res/xml/preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,14 @@
android:title="@string/pref.adapter_init_protocol"
app:useSimpleSummaryProvider="true" />

<ListPreference
android:defaultValue="DEFAULT"
android:entries="@array/pref.init_sequence"
android:entryValues="@array/pref.init_sequence"
android:key="pref.adapter.init.sequence"
android:title="@string/pref.adapter_init_sequence"
app:useSimpleSummaryProvider="true" />

<PreferenceCategory android:title="@string/pref.adapter.diagnostic_request_id.mapping.category">
<org.obd.graphs.preferences.dri.DiagnosticRequestIDListPreferences
android:key="pref.adapter.init.mode.selected"
Expand Down
1 change: 1 addition & 0 deletions datalogger/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ dependencies {
implementation 'io.dropwizard.metrics:metrics-core:4.1.17'
implementation 'com.dynatrace.dynahist:dynahist:1.1'
implementation("io.github.tzebrowski:obd-metrics:$obdMetricVersion") { changing = true }
implementation("io.github.tzebrowski:obd-metrics-giulia_qv:0.0.2-SNAPSHOT") { changing = true }
implementation 'com.github.mik3y:usb-serial-for-android:3.5.1'
implementation 'pub.devrel:easypermissions:3.0.0'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ data class Adapter(
@XmlPreference("pref.adapter.init.protocol", "AUTO", String::class)
var initProtocol: String = "AUTO",

@XmlPreference("pref.adapter.init.sequence", "DEFAULT", String::class)
var initSequence: String = "DEFAULT",

@XmlPreference("pref.adapter.reconnect.max_retry", "0", Int::class)
var maxReconnectNum: Int = 0,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ import org.obd.metrics.api.Workflow
import org.obd.metrics.api.WorkflowExecutionStatus
import org.obd.metrics.api.model.*
import org.obd.metrics.codec.formula.FormulaEvaluatorConfig
import org.obd.metrics.command.Command
import org.obd.metrics.command.dtc.DiagnosticTroubleCodeClearStatus
import org.obd.metrics.command.group.CommandGroup
import org.obd.metrics.command.group.DefaultCommandGroup
import org.obd.metrics.command.routine.RoutineCommand
import org.obd.metrics.command.routine.RoutineExecutionStatus
Expand Down Expand Up @@ -304,15 +306,33 @@ internal class WorkflowOrchestrator internal constructor() {

fun isDTCEnabled(): Boolean = workflow.pidRegistry.findBy(PIDsGroup.DTC_READ).isNotEmpty()

private fun init(preferences: DataLoggerSettings = dataLoggerSettings.instance()) =
Init.builder()
private fun init(preferences: DataLoggerSettings = dataLoggerSettings.instance()) : Init {
val init = Init.builder()
.delayAfterInit(preferences.adapter.initDelay)
.delayAfterReset(preferences.adapter.delayAfterReset)
.headers(diagnosticRequestIDMapper.getMapping().map { entry ->
Init.Header.builder().mode(entry.key).header(entry.value).build()
}.toMutableList())
.protocol(Init.Protocol.valueOf(preferences.adapter.initProtocol))
.sequence(DefaultCommandGroup.INIT).build()
.sequence(sequence(preferences.adapter.initSequence)).build()

return init
}

private fun sequence(seqName : String): CommandGroup<out Command?> =
if (seqName == "DEFAULT") {
DefaultCommandGroup.INIT
} else {
try {
Log.i(LOG_TAG, "Loading init-sequence for: $seqName")
val className = "org.obd.metrics.init.VgateVlinkerMsSequence"
val field = Class.forName(className).getField(seqName)
field.get(null) as? CommandGroup<*> ?: DefaultCommandGroup.INIT
} catch (e: Exception) {
Log.e(LOG_TAG, "Failed loading init-sequence for: $seqName", e)
DefaultCommandGroup.INIT
}
}

private fun workflow() = Workflow.instance()
.formulaEvaluatorConfig(
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ android.useAndroidX=true
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
obdMetricVersion=11.18.1-SNAPSHOT
obdMetricVersion=11.19.0-SNAPSHOT
Loading