diff --git a/app/build.gradle b/app/build.gradle index c031f687..233a8ddd 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -81,7 +81,7 @@ 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 { @@ -89,7 +89,7 @@ android { 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 { @@ -97,7 +97,7 @@ android { resValue "string", "DEFAULT_PROFILE", "profile_3" resValue "string", "applicationId", "org.obd.graphs.my.giulia" applicationId "org.obd.graphs.my.giulia" - versionCode 75 + versionCode 76 } } diff --git a/app/src/main/assets/2_0_gme_trw_climate_control.properties b/app/src/main/assets/2_0_gme_trw_climate_control.properties new file mode 100644 index 00000000..24c31e45 --- /dev/null +++ b/app/src/main/assets/2_0_gme_trw_climate_control.properties @@ -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 diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 76bd424a..a9d9635e 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -319,6 +319,7 @@ Opóźnienie po komendzie resetowania (ATZ) Protokół + Sekwencja inicjalizacyjna Ustawienia ogólne Ustawienia zaawansowane Ustawienia trybu wsadowego diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ae7fa5b7..70a315f1 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -318,6 +318,8 @@ Delay after reset command (ATZ) Protocol + Init Sequence + General settings Advanced settings Batch settings @@ -759,8 +761,17 @@ AUTO CAN_11 CAN_29 + CAN_USER1 + + + + DEFAULT + MS_CAN + HS_CAN + CH_CAN + UDS Freeze Frame Data Google Issue diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index d72cf7af..c46838ee 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -243,6 +243,14 @@ android:title="@string/pref.adapter_init_protocol" app:useSimpleSummaryProvider="true" /> + + 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 = + 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( diff --git a/gradle.properties b/gradle.properties index dbaf23f9..2bb104dd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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