diff options
| author | Claudomator Agent <agent@claudomator> | 2026-03-13 20:02:16 +0000 |
|---|---|---|
| committer | Claudomator Agent <agent@claudomator> | 2026-03-13 20:02:16 +0000 |
| commit | 92bbfd909d621a0dcdfbbd25164cb0431c0b449d (patch) | |
| tree | 6994289b0c3048b3e7a75ae547c148ccc5b9193b /android-app/app/src/main/res/values | |
| parent | ac2fa45381a8d7d410eb85e62c6dd1ba59161461 (diff) | |
feat: Implement MOB (Man Overboard) alarm functionality
This commit introduces the core functionality for the Man Overboard (MOB) alarm.
Key changes include:
- Added a persistent, high-contrast red MOB Floating Action Button to the UI.
- Implemented dynamic location permission requests and initialization of LocationService.
- Created a MobWaypoint data class to store MOB location and timestamp.
- Developed the activateMob() function to:
- Capture current GPS coordinates.
- Set the active MOB waypoint and mark MOB as activated.
- Switch to a dedicated MOB navigation view, hiding other UI elements.
- Start a continuous, looping audible alarm (assumes R.raw.mob_alarm exists).
- Log the MOB event to the console (placeholder for future logbook integration).
- Implemented a MOB navigation view (ConstraintLayout) with real-time distance to MOB and elapsed time display.
- Added a recoverMob() function, triggered by a 'Recovered' button, to:
- Deactivate MOB mode.
- Stop and release the audible alarm.
- Restore the main UI visibility.
- Location updates are observed to continuously update the MOB navigation display.
- Ensured MediaPlayer resources are properly released on activity destruction.
Future enhancements (not part of this commit) include:
- Implementing a bearing arrow in the MOB navigation view.
- Integrating with a persistent logbook system.
Diffstat (limited to 'android-app/app/src/main/res/values')
| -rw-r--r-- | android-app/app/src/main/res/values/colors.xml | 2 | ||||
| -rw-r--r-- | android-app/app/src/main/res/values/strings.xml | 16 |
2 files changed, 18 insertions, 0 deletions
diff --git a/android-app/app/src/main/res/values/colors.xml b/android-app/app/src/main/res/values/colors.xml index a66628b..3dce53c 100644 --- a/android-app/app/src/main/res/values/colors.xml +++ b/android-app/app/src/main/res/values/colors.xml @@ -12,4 +12,6 @@ <color name="instrument_text_alarm">#FFFF0000</color> <!-- Red for alarm --> <color name="instrument_text_stale">#FFFFFF00</color> <!-- Yellow for stale data --> <color name="instrument_background">#E61E1E1E</color> <!-- Slightly transparent dark grey --> + <color name="mob_button_background">#FFD70000</color> <!-- High-contrast red for MOB button --> + <color name="anchor_button_background">#3F51B5</color> </resources>
\ No newline at end of file diff --git a/android-app/app/src/main/res/values/strings.xml b/android-app/app/src/main/res/values/strings.xml index d7793de..44f67ea 100644 --- a/android-app/app/src/main/res/values/strings.xml +++ b/android-app/app/src/main/res/values/strings.xml @@ -25,4 +25,20 @@ <string name="placeholder_vmg_value">--.-</string> <string name="placeholder_depth_value">--.-</string> <string name="placeholder_polar_value">---</string> + + <string name="fab_mob_content_description">Activate Man Overboard (MOB) alarm</string> + <string name="fab_anchor_content_description">Toggle Anchor Watch Configuration</string> + + <!-- MOB Navigation View Strings --> + <string name="mob_label_distance">DISTANCE TO MOB</string> + <string name="mob_label_elapsed_time">ELAPSED TIME</string> + <string name="mob_button_recovered">RECOVERED</string> + + <!-- Anchor Watch Strings --> + <string name="anchor_config_title">Anchor Watch</string> + <string name="button_set_anchor">SET ANCHOR</string> + <string name="button_stop_anchor">STOP WATCH</string> + <string name="anchor_inactive">Anchor Watch Inactive</string> + <string name="anchor_active_format">Anchor Set at %.4f, %.4f\nRadius: %.1fm\nDistance: %.1fm (%.1fm from limit)</string> + <string name="anchor_active_dragging_format">!!! ANCHOR DRAG !!!\nAnchor Set at %.4f, %.4f\nRadius: %.1fm\nDistance: %.1fm (%.1fm OVER limit)</string> </resources>
\ No newline at end of file |
