App 2.16.2: show the car's screen size; display figures documented
The MG4's display is given as 1920x720 (this project), 1280x480 (EVProfile's README) and a 1778x720 app window (upstream). 1280x480 is exactly 1920x720 px at 240 dpi expressed in dp, so the figures may describe one panel at different densities, which this platform lets be changed per app. The Logs tab's new SCREEN line shows the panel's pixels and density and the app window in px and dp, to settle it from the car. FIRMWARE.md lists the three figures and what the emulator shows at 240 dpi; mise.toml, README and SPECS.md no longer state 160 dpi as fact for the car. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QLJfZQZeAKAwSqViTmLzki
This commit is contained in:
+17
-2
@@ -11,9 +11,24 @@ development. It must not be treated as a vendor specification.
|
|||||||
| Android | 9 (Pie) — **API 28** |
|
| Android | 9 (Pie) — **API 28** |
|
||||||
| Chipset | MediaTek **MT2712** |
|
| Chipset | MediaTek **MT2712** |
|
||||||
| Device | `mt2712_saic_eh32` (eh32 = MG4) |
|
| Device | `mt2712_saic_eh32` (eh32 = MG4) |
|
||||||
| Display | **1920×720 @ 160 dpi** (the car's sidebar takes part of the width; an app window has been reported at 1778×720) |
|
| Display | Sources disagree, see below. The Logs tab's **SCREEN** line shows what the car reports. |
|
||||||
| Emulator display profile | **1920×720 @ 160 dpi** |
|
| Emulator display profile | **1920×720 @ 160 dpi** |
|
||||||
|
|
||||||
|
**Display, unconfirmed.** Three figures are in circulation:
|
||||||
|
|
||||||
|
- **1920×720 px**, the figure this project has used (emulator profile, layouts).
|
||||||
|
- **1280×480**, from [EVProfile's README](https://github.com/malys/EVProfile) ("forced
|
||||||
|
landscape"). That is exactly 1920×720 px at 240 dpi expressed in dp, the unit layouts use —
|
||||||
|
so it may be the same panel at a higher density. EVProfile also notes that this platform lets
|
||||||
|
the density be changed per app.
|
||||||
|
- An app window of **1778×720**, reported upstream: the car's own sidebar taking part of the
|
||||||
|
width.
|
||||||
|
|
||||||
|
The app has worked on the car with layouts designed at 1920×720 dp, which fits 160 dpi better
|
||||||
|
than 240 (checked on the emulator: at 240 dpi the sidebar needs scrolling and the Overview's
|
||||||
|
cards no longer fit). Since 2.16.2 the Logs tab shows the panel's pixels and density and the
|
||||||
|
app window in px and dp; a photo of that line settles it.
|
||||||
|
|
||||||
## Signing caveat
|
## Signing caveat
|
||||||
|
|
||||||
Certificate equality alone does not prove an APK came from this project. The nightly OTA
|
Certificate equality alone does not prove an APK came from this project. The nightly OTA
|
||||||
@@ -43,5 +58,5 @@ follow the same path. See `AGENTS.md` for the full per-signal split.
|
|||||||
## Emulator fidelity
|
## Emulator fidelity
|
||||||
|
|
||||||
The `mise` emulator tasks use an API 33 automotive AVD for the car service and an API 28
|
The `mise` emulator tasks use an API 33 automotive AVD for the car service and an API 28
|
||||||
AVD at **1920×720 @ 160 dpi** for the screen. Neither exposes the SAIC vendor properties,
|
AVD at **1920×720 @ 160 dpi** for the screen (see "Display, unconfirmed" above). Neither exposes the SAIC vendor properties,
|
||||||
so vehicle-specific behaviour still requires on-vehicle validation.
|
so vehicle-specific behaviour still requires on-vehicle validation.
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ APIs.
|
|||||||
|
|
||||||
## Screenshot
|
## Screenshot
|
||||||
|
|
||||||
Version 2.8.2 on the head unit's 1920x720 screen, in full screen (Android 9 emulator; no
|
Version 2.8.2 at the head unit's 1920x720 pixels and 160 dpi, in full screen (Android 9 emulator; no
|
||||||
vehicle there, so every value shows as a dash).
|
vehicle there, so every value shows as a dash).
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ Current: app 2.14.2, server 2.5.0 (pinned by digest in `k8s/server.yaml`).
|
|||||||
dashboard queries return data).
|
dashboard queries return data).
|
||||||
- [x] Manifests validated offline (kubeconform, with Traefik CRDs). **Applied by Nils only.**
|
- [x] Manifests validated offline (kubeconform, with Traefik CRDs). **Applied by Nils only.**
|
||||||
- [ ] Check Grafana's host in `k8s/ingress.yaml` (placeholder `car-grafana.k8s.stinnesbeck.com`).
|
- [ ] Check Grafana's host in `k8s/ingress.yaml` (placeholder `car-grafana.k8s.stinnesbeck.com`).
|
||||||
|
- [ ] Screen size and density on the car: Logs → SCREEN (2.16.2), see FIRMWARE.md.
|
||||||
- [ ] Not yet tried on the car: live data straight to ABRP (2.11), Enter on phone (2.12), accent
|
- [ ] Not yet tried on the car: live data straight to ABRP (2.11), Enter on phone (2.12), accent
|
||||||
colours and the car-colour probe on the Logs tab (2.14; a photo of its list decides whether
|
colours and the car-colour probe on the Logs tab (2.14; a photo of its list decides whether
|
||||||
the accent can follow the paint automatically), right-aligned values (2.14.1).
|
the accent can follow the paint automatically), right-aligned values (2.14.1).
|
||||||
@@ -109,6 +110,10 @@ tyre pressures, GPS (lat, lon, elevation, heading) and the is_* flags. It does *
|
|||||||
INGEST_TOKEN) into git and pushed it. Commit amended and force-pushed; both values regenerated in
|
INGEST_TOKEN) into git and pushed it. Commit amended and force-pushed; both values regenerated in
|
||||||
the now gitignored `k8s/secrets.yaml` (since moved to `k8s/secrets/secrets.yaml`, outside
|
the now gitignored `k8s/secrets.yaml` (since moved to `k8s/secrets/secrets.yaml`, outside
|
||||||
`kubectl apply -f k8s/`). Filled-in secrets live only there from now on.
|
`kubectl apply -f k8s/`). Filled-in secrets live only there from now on.
|
||||||
|
- 2026-10-18 — App 2.16.2: Logs → SCREEN shows the panel's pixels and density and the app
|
||||||
|
window in px and dp. The MG4's display figures disagree (1920×720 px used here; EVProfile lists
|
||||||
|
1280×480, which is 1920×720 at 240 dpi in dp; upstream reported a 1778×720 window); FIRMWARE.md
|
||||||
|
lists all three until a photo of that line settles it.
|
||||||
- 2026-10-18 — EVProfile's licence checked: MIT, forked from SliDeeN/MG4Control and last merged
|
- 2026-10-18 — EVProfile's licence checked: MIT, forked from SliDeeN/MG4Control and last merged
|
||||||
from it on 2026-08-02, inside MG4Control's MIT period (MIT up to 2.6.5 of 2026-08-05, GPL v3
|
from it on 2026-08-02, inside MG4Control's MIT period (MIT up to 2.6.5 of 2026-08-05, GPL v3
|
||||||
from 2.6.6 of 2026-09-02). Recorded in `LICENSE.md`. History scanned for secrets before the
|
from 2.6.6 of 2026-09-02). Recorded in `LICENSE.md`. History scanned for secrets before the
|
||||||
|
|||||||
+2
-2
@@ -34,8 +34,8 @@ android {
|
|||||||
applicationId "com.stinnesbeck.nilsmg4"
|
applicationId "com.stinnesbeck.nilsmg4"
|
||||||
minSdk 27
|
minSdk 27
|
||||||
targetSdk 36
|
targetSdk 36
|
||||||
versionCode 85
|
versionCode 86
|
||||||
versionName "2.16.1"
|
versionName "2.16.2"
|
||||||
|
|
||||||
// Nothing about the server ships in the APK: its URL and ingest token are entered in
|
// Nothing about the server ships in the APK: its URL and ingest token are entered in
|
||||||
// the app's Server tab (ServerConfig), and the database is only reachable by the server.
|
// the app's Server tab (ServerConfig), and the database is only reachable by the server.
|
||||||
|
|||||||
@@ -263,6 +263,7 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
callLogText = logPane.findViewById(R.id.call_log_text);
|
callLogText = logPane.findViewById(R.id.call_log_text);
|
||||||
steeringKeysText = logPane.findViewById(R.id.steering_keys_text);
|
steeringKeysText = logPane.findViewById(R.id.steering_keys_text);
|
||||||
TextView carColorText = logPane.findViewById(R.id.car_color_text);
|
TextView carColorText = logPane.findViewById(R.id.car_color_text);
|
||||||
|
showScreenInfo(logPane.findViewById(R.id.screen_text));
|
||||||
logPane.findViewById(R.id.car_color_button).setOnClickListener(v -> new Thread(() -> {
|
logPane.findViewById(R.id.car_color_button).setOnClickListener(v -> new Thread(() -> {
|
||||||
java.util.List<String> found = CarColorProbe.run(60);
|
java.util.List<String> found = CarColorProbe.run(60);
|
||||||
String shown = found.isEmpty() ? getString(R.string.car_color_none)
|
String shown = found.isEmpty() ? getString(R.string.car_color_none)
|
||||||
@@ -289,6 +290,21 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
startForegroundService(new Intent(this, AbrpUploadService.class));
|
startForegroundService(new Intent(this, AbrpUploadService.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* What the head unit reports about its screen, for the Logs tab: the panel in pixels and its
|
||||||
|
* density, and this app's window in pixels and in dp, which is what layouts are chosen by.
|
||||||
|
* Sources disagree on the MG4's numbers (1920×720, 1280×480, a 1778×720 window).
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("deprecation") // getRealMetrics: the WindowMetrics API starts at 30; this is 28
|
||||||
|
private void showScreenInfo(TextView view) {
|
||||||
|
android.util.DisplayMetrics panel = new android.util.DisplayMetrics();
|
||||||
|
getWindowManager().getDefaultDisplay().getRealMetrics(panel);
|
||||||
|
android.util.DisplayMetrics window = getResources().getDisplayMetrics();
|
||||||
|
android.content.res.Configuration config = getResources().getConfiguration();
|
||||||
|
view.setText(getString(R.string.screen_info, panel.widthPixels, panel.heightPixels, panel.densityDpi,
|
||||||
|
window.widthPixels, window.heightPixels, config.screenWidthDp, config.screenHeightDp));
|
||||||
|
}
|
||||||
|
|
||||||
private static final String STATE_PAGE = "page";
|
private static final String STATE_PAGE = "page";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -11,5 +11,7 @@
|
|||||||
<TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:text="@string/hint_car_color" android:textAppearance="@style/Text.EV.Secondary" />
|
<TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:text="@string/hint_car_color" android:textAppearance="@style/Text.EV.Secondary" />
|
||||||
<com.google.android.material.button.MaterialButton android:id="@+id/car_color_button" style="@style/Widget.EV.Button.Outlined" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="12dp" android:text="@string/btn_car_color" />
|
<com.google.android.material.button.MaterialButton android:id="@+id/car_color_button" style="@style/Widget.EV.Button.Outlined" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="12dp" android:text="@string/btn_car_color" />
|
||||||
<TextView android:id="@+id/car_color_text" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="12dp" android:textAppearance="@style/Text.EV.Body" android:fontFamily="monospace" android:textSize="14sp" android:lineSpacingExtra="4dp" android:textIsSelectable="true" />
|
<TextView android:id="@+id/car_color_text" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="12dp" android:textAppearance="@style/Text.EV.Body" android:fontFamily="monospace" android:textSize="14sp" android:lineSpacingExtra="4dp" android:textIsSelectable="true" />
|
||||||
|
<TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="32dp" android:text="@string/label_screen" android:textAppearance="@style/Text.EV.Eyebrow" />
|
||||||
|
<TextView android:id="@+id/screen_text" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:text="@string/no_value" android:textAppearance="@style/Text.EV.Body" android:fontFamily="monospace" android:textSize="14sp" android:textIsSelectable="true" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</com.evsuite.abrp.StableScrollView>
|
</com.evsuite.abrp.StableScrollView>
|
||||||
|
|||||||
@@ -40,6 +40,8 @@
|
|||||||
<string name="power_waiting">needs a minute of data</string>
|
<string name="power_waiting">needs a minute of data</string>
|
||||||
<string name="label_tire_unit">Tyre pressure unit</string>
|
<string name="label_tire_unit">Tyre pressure unit</string>
|
||||||
<string name="label_accent">Accent colour</string>
|
<string name="label_accent">Accent colour</string>
|
||||||
|
<string name="label_screen">SCREEN</string>
|
||||||
|
<string name="screen_info">Panel %1$d × %2$d px at %3$d dpi\nApp window %4$d × %5$d px = %6$d × %7$d dp</string>
|
||||||
<string name="label_car_color">CAR COLOUR</string>
|
<string name="label_car_color">CAR COLOUR</string>
|
||||||
<string name="hint_car_color">Lists the head unit\'s settings that mention a colour, paint or car model, to find out whether the car\'s colour can be read. A photo of this list helps.</string>
|
<string name="hint_car_color">Lists the head unit\'s settings that mention a colour, paint or car model, to find out whether the car\'s colour can be read. A photo of this list helps.</string>
|
||||||
<string name="btn_car_color">Look for the car colour</string>
|
<string name="btn_car_color">Look for the car colour</string>
|
||||||
|
|||||||
@@ -56,7 +56,8 @@ BUILD_TOOLS = "36.0.0"
|
|||||||
# car build installs there as the system user.)
|
# car build installs there as the system user.)
|
||||||
#
|
#
|
||||||
# None of this replaces a test on the car.
|
# None of this replaces a test on the car.
|
||||||
# Target density: 160 dpi. Screen 12.8" 1920x720. Reference firmware: SWI68-29958-1300R69.
|
# Target density: 160 dpi. Screen 1920x720 px; the density on the car is not confirmed
|
||||||
|
# (FIRMWARE.md, "Display, unconfirmed"). Reference firmware: SWI68-29958-1300R69.
|
||||||
|
|
||||||
EMU_CAR_AVD = "evabrp-car"
|
EMU_CAR_AVD = "evabrp-car"
|
||||||
EMU_CAR_IMAGE = "system-images;android-33;android-automotive;x86_64"
|
EMU_CAR_IMAGE = "system-images;android-33;android-automotive;x86_64"
|
||||||
|
|||||||
Reference in New Issue
Block a user