diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-04-03 07:38:22 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-04-03 07:38:22 +0000 |
| commit | 9417a7c6b08da362ad97e85973b7570e05d4f0b5 (patch) | |
| tree | 341837218b815bbabb6cd80c87781703b9e83c60 /android-app/app/src/main/res | |
| parent | be56cf32a68ee1b0df2966ff39fd9751fd6afd7a (diff) | |
feat(instruments): add forecast wind, wave, swell and current from Open-Meteo
- Add swell params to MarineApiService request
- Add swell fields to MarineHourly model
- Add MarineConditions snapshot model
- Add WeatherRepository.fetchCurrentConditions() (first forecast hour)
- Add MainViewModel.loadConditions() + marineConditions StateFlow
- Add Forecast section to instrument sheet: Curr / Wave / Swell
- Populate TWS from forecast wind speed on first GPS fix
- Trigger loadConditions() once on first GPS position received
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.xml | 66 |
1 files changed, 66 insertions, 0 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 c651ba2..a6b74b0 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 @@ -131,4 +131,70 @@ </LinearLayout> + <!-- Divider --> + <View + android:id="@+id/conditions_divider" + android:layout_width="match_parent" + android:layout_height="1dp" + android:background="@color/md_theme_outline" + android:layout_marginTop="20dp" + app:layout_constraintTop_toBottomOf="@id/expanded_instruments" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" /> + + <TextView + android:id="@+id/label_conditions" + style="@style/InstrumentLabel" + android:text="FORECAST" + android:layout_marginTop="12dp" + app:layout_constraintTop_toBottomOf="@id/conditions_divider" + app:layout_constraintStart_toStartOf="parent" /> + + <!-- Conditions: Curr | Wave | Swell (3 columns, value + sub-label) --> + <LinearLayout + android:id="@+id/conditions_row" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:layout_marginTop="8dp" + app:layout_constraintTop_toBottomOf="@id/label_conditions" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintBottom_toBottomOf="parent"> + + <LinearLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical" + android:gravity="center"> + <TextView style="@style/InstrumentLabel" android:text="Curr" /> + <TextView android:id="@+id/value_curr_spd" style="@style/InstrumentPrimaryValue" tools:text="—" /> + <TextView android:id="@+id/value_curr_dir" style="@style/InstrumentLabel" tools:text="—" /> + </LinearLayout> + + <LinearLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical" + android:gravity="center"> + <TextView style="@style/InstrumentLabel" android:text="Wave" /> + <TextView android:id="@+id/value_wave_ht" style="@style/InstrumentPrimaryValue" tools:text="—" /> + <TextView android:id="@+id/value_wave_dir" style="@style/InstrumentLabel" tools:text="—" /> + </LinearLayout> + + <LinearLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical" + android:gravity="center"> + <TextView style="@style/InstrumentLabel" android:text="Swell" /> + <TextView android:id="@+id/value_swell_ht" style="@style/InstrumentPrimaryValue" tools:text="—" /> + <TextView android:id="@+id/value_swell_per" style="@style/InstrumentLabel" tools:text="—" /> + </LinearLayout> + + </LinearLayout> + </androidx.constraintlayout.widget.ConstraintLayout> |
