Skip to content

Commit

Permalink
feat: DragRacing screen enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
tzebrowski authored Nov 6, 2024
1 parent 24cfb18 commit 7baf4ad
Show file tree
Hide file tree
Showing 38 changed files with 181 additions and 98 deletions.
3 changes: 2 additions & 1 deletion app/src/main/assets/alfa_2_0_gme.properties
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,5 @@ profile_3.pref.adapter.batch.size="3"
profile_3.pref.adapter.batch_01.size="3"

profile_3.pref.profile.2_0_GME_extension.enabled=true
profile_3.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_3.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_3.pref.aa.drag_race.debug.vehicle_speed_measurement=false
3 changes: 2 additions & 1 deletion app/src/main/assets/alfa_2_0_gme_stn_usb.properties
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,5 @@ profile_6.pref.adapter.batch.size="10"
profile_6.pref.adapter.batch_01.size="3"

profile_6.pref.profile.2_0_GME_extension.enabled=true
profile_6.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_6.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_6.pref.aa.drag_race.debug.vehicle_speed_measurement=false
3 changes: 2 additions & 1 deletion app/src/main/assets/alfa_2_0_gme_stn_wifi.properties
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,5 @@ profile_4.pref.adapter.batch_01.size="3"


profile_4.pref.profile.2_0_GME_extension.enabled=true
profile_4.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_4.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_4.pref.aa.drag_race.debug.vehicle_speed_measurement=false
3 changes: 2 additions & 1 deletion app/src/main/assets/default.properties
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,5 @@ profile_1.pref.giulia.pids.selected=[22, 12, 16, 5, 6, 18]
profile_1.pref.giulia.pids.selected.1=[22, 12, 16, 5, 6, 18]
profile_1.pref.giulia.pids.selected.2=[16, 5, 6, 18]

profile_1.pref.pids.registry.filter_pids_ecu_supported=true
profile_1.pref.pids.registry.filter_pids_ecu_supported=true
profile_1.pref.aa.drag_race.debug.vehicle_speed_measurement=false
3 changes: 2 additions & 1 deletion app/src/main/assets/default_usb.properties
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,5 @@ profile_7.pref.profile.about=This is default profile. It USB connection and CAN
profile_7.pref.giulia.pids.selected=[22, 12, 16, 5, 6, 18]
profile_7.pref.giulia.pids.selected.1=[22, 12, 16, 5, 6, 18]

profile_7.pref.pids.registry.filter_pids_ecu_supported=true
profile_7.pref.pids.registry.filter_pids_ecu_supported=true
profile_7.pref.aa.drag_race.debug.vehicle_speed_measurement=false
Binary file not shown.
2 changes: 1 addition & 1 deletion app/src/main/res/menu/left_nav_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<menu>
<item
android:id="@+id/navigation_drag_racing"
android:icon="@drawable/action_drag_race_screen"
android:icon="@drawable/action_drag_race"
android:checkable="true"
android:title="@string/navigation.title_drag_racing">
</item>
Expand Down
6 changes: 4 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,15 @@
<string name="pref.aa.performance_meter.category">Drag Racing</string>
<string name="pref.aa.performance_meter.metrics_read_freq">OBD2 Data reading frequency</string>
<string name="pref.aa.performance_meter.display_frequency">Display OBD2 Data read frequency</string>
<string name="pref.aa.performance_meter.display_vehicle_speed_measurement">Display vehicle speed at which measurement was done</string>
<string name="pref.aa.performance_meter.display_vehicle_speed_measurement">Display the speed at which the measurement was taken</string>
<string name="pref.aa.performance_meter.shift_lights_enabled">Enable gear shift lights</string>
<string name="pref.profile.2_0_GME_extension.enabled">Get additional context information </string>
<string name="pref.profile.2_0_GME_extension.enabled">Get additional context information.\nIts valid just for 2.0GME engine.</string>
<string name="pref.profile.2_0_GME_extension.enabled_summary">It pulls additional metrics during performance meter.</string>

<string name="pref.aa.performance_meter.shift_lights_enabled_summary">This is an EXPERIMENTAL feature.\nEnable gear shift lights</string>
<string name="pref.aa.performance_meter.display_context_metrics">Display context metrics</string>
<string name="pref.aa.performance_meter.display_context_metrics_summary">Display additional context information like vehicle speed</string>


<string name="ref.aa.performance_meter.shift_lights.rev">Shift lights revs threshold</string>

Expand Down
5 changes: 3 additions & 2 deletions app/src/main/res/xml/preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@
android:key="pref.profile.2_0_GME_extension.enabled"
android:summary="@string/pref.profile.2_0_GME_extension.enabled_summary"
android:title="@string/pref.profile.2_0_GME_extension.enabled"
app:experimental="true"
app:experimental="false"
app:singleLineTitle="false" />

<org.obd.graphs.preferences.aa.AASeekBar
Expand Down Expand Up @@ -1358,6 +1358,7 @@
<org.obd.graphs.preferences.aa.AACheckBoxPreference
android:defaultValue="true"
android:key="pref.aa.drag_race.vehicle_speed.enabled"
android:summary="@string/pref.aa.performance_meter.display_context_metrics_summary"
android:title="@string/pref.aa.performance_meter.display_context_metrics"
app:singleLineTitle="false" />

Expand All @@ -1368,7 +1369,7 @@
app:singleLineTitle="false" />

<org.obd.graphs.preferences.aa.AACheckBoxPreference
android:defaultValue="true"
android:defaultValue="false"
android:key="pref.aa.drag_race.debug.vehicle_speed_measurement"
android:title="@string/pref.aa.performance_meter.display_vehicle_speed_measurement"
app:singleLineTitle="false" />
Expand Down
3 changes: 2 additions & 1 deletion automotive/src/main/assets/alfa_2_0_gme_aa.properties
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,5 @@ profile_8.pref.aa.break_label.3=true
profile_8.pref.aa.break_label.4=true

profile_8.pref.graph.filter.source="AA"
profile_8.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_8.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_8.pref.aa.drag_race.debug.vehicle_speed_measurement=false
3 changes: 2 additions & 1 deletion automotive/src/main/assets/alfa_2_0_gme_aa_gg_stn.properties
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,5 @@ profile_10.pref.aa.break_label.3=true
profile_10.pref.aa.break_label.4=true

profile_10.pref.graph.filter.source="AA"
profile_10.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_10.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_10.pref.aa.drag_race.debug.vehicle_speed_measurement=false
3 changes: 2 additions & 1 deletion automotive/src/main/assets/alfa_2_0_gme_aa_stn.properties
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,5 @@ profile_9.pref.aa.break_label.3=true
profile_9.pref.aa.break_label.4=true

profile_9.pref.graph.filter.source="AA"
profile_9.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_9.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_9.pref.aa.drag_race.debug.vehicle_speed_measurement=false
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,5 @@ profile_13.pref.adapter.stn.enabled=true
profile_13.pref.profile.2_0_GME_extension.enabled=true

profile_13.pref.graph.filter.source="AA"
profile_13.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_13.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_13.pref.aa.drag_race.debug.vehicle_speed_measurement=false
2 changes: 1 addition & 1 deletion automotive/src/main/java/org/obd/graphs/aa/CarSettings.kt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class CarSettings(private val carContext: CarContext) : ScreenSettings {

override fun getDragRacingScreenSettings(): DragRacingScreenSettings = dragRacingScreenSettings.apply {
metricsFrequencyReadEnabled = Prefs.getBoolean("pref.aa.drag_race.debug.display_frequency", true)
vehicleSpeedDisplayDebugEnabled = Prefs.getBoolean("pref.aa.drag_race.debug.vehicle_speed_measurement", true)
vehicleSpeedDisplayDebugEnabled = Prefs.getBoolean("pref.aa.drag_race.debug.vehicle_speed_measurement", false)
displayMetricsEnabled = Prefs.getBoolean("pref.aa.drag_race.vehicle_speed.enabled", true)
shiftLightsEnabled = Prefs.getBoolean("pref.aa.drag_race.shift_lights.enabled", false)
shiftLightsRevThreshold = Prefs.getS("pref.aa.drag_race.shift_lights.rev_value", "5000").toInt()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ internal class SurfaceRendererScreen(

fun isSurfaceRendererScreen(identity: Identity) = identity is SurfaceRendererType
override fun getFeatureDescription(): List<FeatureDescription> = mutableListOf(
FeatureDescription(SurfaceRendererType.DRAG_RACING, R.drawable.action_drag_race_screen, carContext.getString(R.string.available_features_drag_race_screen_title)),
FeatureDescription(SurfaceRendererType.DRAG_RACING, R.drawable.action_drag_race, carContext.getString(R.string.available_features_drag_race_screen_title)),

FeatureDescription(SurfaceRendererType.GAUGE, R.drawable.action_giulia, carContext.getString(R.string.available_features_gauge_screen_title)),
FeatureDescription(SurfaceRendererType.GIULIA, R.drawable.action_giulia, carContext.getString(R.string.available_features_giulia_screen_title))).apply {
FeatureDescription(SurfaceRendererType.GAUGE, R.drawable.action_gauge, carContext.getString(R.string.available_features_gauge_screen_title)),
FeatureDescription(SurfaceRendererType.GIULIA, R.drawable.action_giulia_metics, carContext.getString(R.string.available_features_giulia_screen_title))).apply {
if (settings.getTripInfoScreenSettings().viewEnabled) {
add(FeatureDescription(SurfaceRendererType.TRIP_INFO, R.drawable.action_giulia, carContext.getString(R.string.available_features_trip_info_screen_title)))
}
Expand Down
Binary file modified automotive/src/main/res/drawable/action_disconnect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified automotive/src/main/res/drawable/action_exit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified automotive/src/main/res/drawable/action_features.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added automotive/src/main/res/drawable/action_gauge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified automotive/src/main/res/drawable/action_giulia.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified automotive/src/main/res/drawable/action_virtual_screen_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified automotive/src/main/res/drawable/action_virtual_screen_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified automotive/src/main/res/drawable/action_virtual_screen_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified automotive/src/main/res/drawable/action_virtual_screen_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified automotive/src/main/res/drawable/actions_connect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified automotive/src/main/res/drawable/config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions automotive/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<string name="available_features.page_title">Available screens</string>
<string name="available_features.routine_screen.title">Routines</string>
<string name="available_features.drag_race_screen.title">Drag Racing</string>
<string name="available_features.giulia_screen.title">Metrics - Giulia</string>
<string name="available_features.gauge_screen.title">Metrics - Gauge </string>
<string name="available_features.giulia_screen.title">Giulia - Metrics</string>
<string name="available_features.gauge_screen.title">Gauge - Metrics</string>
<string name="available_features.trip_info_screen.title">Trip Info</string>

</resources>
Binary file added common/src/main/res/drawable/action_drag_race.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 7baf4ad

Please sign in to comment.