summaryrefslogtreecommitdiff
path: root/android-app/app/src/main/res
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-04-03 07:25:13 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-04-03 07:25:13 +0000
commitbe56cf32a68ee1b0df2966ff39fd9751fd6afd7a (patch)
tree221ecb14396794e67ba475e107fbdc98b2b818ac /android-app/app/src/main/res
parenteccd9912ca52a245922a2984e3f88603ac42ef8f (diff)
feat(instruments): replace simulation with real GPS and barometer data
- Drop VMG, Polar %, and PolarDiagramView — no NMEA source on boat - Shrink grid to 3×2 (AWS/HDG/BSP / TWS/COG/SOG) - Move Depth + Baro to expanded section side by side - Initialize all instruments to "—" on startup - Wire LocationService.locationFlow → SOG + COG display (real GPS) - Wire LocationService.barometerStatus → Baro display (device sensor) - Delete startInstrumentSimulation() fake loop entirely Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'android-app/app/src/main/res')
-rw-r--r--android-app/app/src/main/res/layout/layout_instruments_sheet.xml88
1 files changed, 28 insertions, 60 deletions
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 0a84418..c651ba2 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
@@ -16,14 +16,14 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
- <!-- Grid of Instruments -->
+ <!-- 3×2 grid: AWS/HDG/BSP top row, TWS/COG/SOG bottom row -->
<androidx.gridlayout.widget.GridLayout
android:id="@+id/instrument_grid"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
app:columnCount="3"
- app:rowCount="3"
+ app:rowCount="2"
app:layout_constraintTop_toBottomOf="@id/drag_handle">
<!-- Wind: AWS -->
@@ -35,7 +35,7 @@
android:gravity="center"
android:padding="8dp">
<TextView style="@style/InstrumentLabel" android:text="AWS" />
- <TextView android:id="@+id/value_aws" style="@style/InstrumentPrimaryValue" tools:text="12.5" />
+ <TextView android:id="@+id/value_aws" style="@style/InstrumentPrimaryValue" tools:text="—" />
</LinearLayout>
<!-- Compass: HDG -->
@@ -47,7 +47,7 @@
android:gravity="center"
android:padding="8dp">
<TextView style="@style/InstrumentLabel" android:text="HDG" />
- <TextView android:id="@+id/value_hdg" style="@style/InstrumentPrimaryValue" tools:text="225" />
+ <TextView android:id="@+id/value_hdg" style="@style/InstrumentPrimaryValue" tools:text="—" />
</LinearLayout>
<!-- Performance: BSP -->
@@ -59,7 +59,7 @@
android:gravity="center"
android:padding="8dp">
<TextView style="@style/InstrumentLabel" android:text="BSP" />
- <TextView android:id="@+id/value_bsp" style="@style/InstrumentPrimaryValue" tools:text="6.2" />
+ <TextView android:id="@+id/value_bsp" style="@style/InstrumentPrimaryValue" tools:text="—" />
</LinearLayout>
<!-- Wind: TWS -->
@@ -71,7 +71,7 @@
android:gravity="center"
android:padding="8dp">
<TextView style="@style/InstrumentLabel" android:text="TWS" />
- <TextView android:id="@+id/value_tws" style="@style/InstrumentPrimaryValue" tools:text="15.0" />
+ <TextView android:id="@+id/value_tws" style="@style/InstrumentPrimaryValue" tools:text="—" />
</LinearLayout>
<!-- Compass: COG -->
@@ -83,7 +83,7 @@
android:gravity="center"
android:padding="8dp">
<TextView style="@style/InstrumentLabel" android:text="COG" />
- <TextView android:id="@+id/value_cog" style="@style/InstrumentPrimaryValue" tools:text="230" />
+ <TextView android:id="@+id/value_cog" style="@style/InstrumentPrimaryValue" tools:text="—" />
</LinearLayout>
<!-- Performance: SOG -->
@@ -95,72 +95,40 @@
android:gravity="center"
android:padding="8dp">
<TextView style="@style/InstrumentLabel" android:text="SOG" />
- <TextView android:id="@+id/value_sog" style="@style/InstrumentPrimaryValue" tools:text="6.5" />
+ <TextView android:id="@+id/value_sog" style="@style/InstrumentPrimaryValue" tools:text="—" />
</LinearLayout>
- <!-- VMG -->
- <LinearLayout
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- app:layout_columnWeight="1"
- android:orientation="vertical"
- android:gravity="center"
- android:padding="8dp">
- <TextView style="@style/InstrumentLabel" android:text="VMG" />
- <TextView android:id="@+id/value_vmg" style="@style/InstrumentPrimaryValue" tools:text="4.2" />
- </LinearLayout>
+ </androidx.gridlayout.widget.GridLayout>
+
+ <!-- Expanded: Depth + Baro side by side -->
+ <LinearLayout
+ android:id="@+id/expanded_instruments"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:layout_marginTop="24dp"
+ app:layout_constraintTop_toBottomOf="@id/instrument_grid"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent">
- <!-- Depth -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
- app:layout_columnWeight="1"
- android:orientation="vertical"
- android:gravity="center"
- android:padding="8dp">
+ android:layout_weight="1"
+ android:orientation="vertical">
<TextView style="@style/InstrumentLabel" android:text="Depth" />
- <TextView android:id="@+id/value_depth" style="@style/InstrumentPrimaryValue" tools:text="12.0" />
+ <TextView android:id="@+id/value_depth" style="@style/InstrumentPrimaryValue" tools:text="—" />
</LinearLayout>
- <!-- Polar % -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
- app:layout_columnWeight="1"
- android:orientation="vertical"
- android:gravity="center"
- android:padding="8dp">
- <TextView style="@style/InstrumentLabel" android:text="Polar %" />
- <TextView android:id="@+id/value_polar_pct" style="@style/InstrumentPrimaryValue" tools:text="95%" />
+ android:layout_weight="1"
+ android:orientation="vertical">
+ <TextView style="@style/InstrumentLabel" android:text="Baro" />
+ <TextView android:id="@+id/value_baro" style="@style/InstrumentPrimaryValue" tools:text="—" />
</LinearLayout>
- </androidx.gridlayout.widget.GridLayout>
-
- <!-- Additional Detail (Visible when expanded) -->
- <TextView
- android:id="@+id/label_baro"
- style="@style/InstrumentLabel"
- android:text="Barometer"
- android:layout_marginTop="24dp"
- app:layout_constraintTop_toBottomOf="@id/instrument_grid"
- app:layout_constraintStart_toStartOf="parent" />
-
- <TextView
- android:id="@+id/value_baro"
- style="@style/InstrumentPrimaryValue"
- tools:text="1013.2 hPa"
- app:layout_constraintTop_toBottomOf="@id/label_baro"
- app:layout_constraintStart_toStartOf="parent" />
-
- <org.terst.nav.PolarDiagramView
- android:id="@+id/polar_diagram_view"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:layout_marginTop="24dp"
- app:layout_constraintDimensionRatio="1:1"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintTop_toBottomOf="@id/value_baro"
- app:layout_constraintBottom_toBottomOf="parent" />
+ </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>