summaryrefslogtreecommitdiff
path: root/android-app/app/src/main/res/layout
diff options
context:
space:
mode:
authorClaude <noreply@anthropic.com>2026-06-03 01:54:38 +0000
committerClaude <noreply@anthropic.com>2026-06-03 01:54:38 +0000
commitbfeab101083970a3fd5a67aa62d09a7506027da4 (patch)
treece5e21a6749dc2516b72a6970bbdc2e68329781c /android-app/app/src/main/res/layout
parent17cfd884976b4accbb2ad6af6acf3578d0c6ec53 (diff)
PMIM-1 hardware support: UDP, IIXDR, inclinometer
Transport: - NmeaStreamManager supports TCP and UDP modes - NmeaConnectionPrefs replaces hardcoded 192.168.1.1:10110; defaults to UDP/10110 matching PMIM-1 spec (ESP32 AP at 192.168.4.1) - LocationService reads prefs via startNmeaFromPrefs() Parsing: - NmeaParser.parseXdr() handles $IIXDR attitude (HEEL/PTCH in degrees) and baro (pressure in bar → hPa, air temp °C) - New AttitudeData and NmeaBaroData sensor types UI: - Heel + pitch row in instrument sheet (hidden until data arrives) - InclinometerView: canvas circle with rotating waterline (heel) and displaced dot (pitch), colorPrimary-tinted, respects night mode - Inclinometer overlay top-left of map, appears on first attitude packet - NMEA baro overrides device sensor reading when available https://claude.ai/code/session_01KXYBuAHZkvv63DeUG6XaZD
Diffstat (limited to 'android-app/app/src/main/res/layout')
-rw-r--r--android-app/app/src/main/res/layout/activity_main.xml11
-rw-r--r--android-app/app/src/main/res/layout/layout_instruments_sheet.xml63
2 files changed, 73 insertions, 1 deletions
diff --git a/android-app/app/src/main/res/layout/activity_main.xml b/android-app/app/src/main/res/layout/activity_main.xml
index ca13105..d3b7942 100644
--- a/android-app/app/src/main/res/layout/activity_main.xml
+++ b/android-app/app/src/main/res/layout/activity_main.xml
@@ -53,6 +53,17 @@
app:layout_constraintTop_toBottomOf="@id/nav_hud"
app:layout_constraintEnd_toEndOf="parent" />
+ <!-- Inclinometer overlay — top-left, hidden until attitude data arrives -->
+ <org.terst.nav.ui.InclinometerView
+ android:id="@+id/inclinometer_view"
+ android:layout_width="72dp"
+ android:layout_height="72dp"
+ android:layout_marginStart="12dp"
+ android:layout_marginTop="8dp"
+ android:visibility="gone"
+ app:layout_constraintTop_toBottomOf="@id/nav_hud"
+ app:layout_constraintStart_toStartOf="parent" />
+
<!-- Night mode toggle FAB -->
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_night_mode"
diff --git a/android-app/app/src/main/res/layout/layout_instruments_sheet.xml b/android-app/app/src/main/res/layout/layout_instruments_sheet.xml
index 5e58009..96298f9 100644
--- a/android-app/app/src/main/res/layout/layout_instruments_sheet.xml
+++ b/android-app/app/src/main/res/layout/layout_instruments_sheet.xml
@@ -158,6 +158,67 @@
</LinearLayout>
+ <!-- Heel + Pitch row — hidden until PMIM attitude data arrives -->
+ <LinearLayout
+ android:id="@+id/attitude_row"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:visibility="gone"
+ app:layout_constraintTop_toBottomOf="@id/conditions_header"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent">
+
+ <LinearLayout
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:orientation="vertical"
+ android:gravity="center"
+ android:padding="8dp">
+ <TextView style="@style/InstrumentLabel" android:text="Heel" />
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:orientation="horizontal"
+ android:gravity="center_vertical">
+ <TextView
+ android:id="@+id/value_heel"
+ style="@style/InstrumentPrimaryValue"
+ tools:text="-5.2" />
+ <TextView
+ style="@style/InstrumentUnit"
+ android:text="°" />
+ </LinearLayout>
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:orientation="vertical"
+ android:gravity="center"
+ android:padding="8dp">
+ <TextView style="@style/InstrumentLabel" android:text="Pitch" />
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:orientation="horizontal"
+ android:gravity="center_vertical">
+ <TextView
+ android:id="@+id/value_pitch"
+ style="@style/InstrumentPrimaryValue"
+ tools:text="+2.1" />
+ <TextView
+ style="@style/InstrumentUnit"
+ android:text="°" />
+ </LinearLayout>
+ </LinearLayout>
+
+ </LinearLayout>
+
<!-- Animated wave divider — colors adapt via wave_sky/sea color resources -->
<org.terst.nav.ui.WaveView
android:id="@+id/wave_divider"
@@ -165,7 +226,7 @@
android:layout_height="72dp"
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
- app:layout_constraintTop_toBottomOf="@id/conditions_header"
+ app:layout_constraintTop_toBottomOf="@id/attitude_row"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />