From bd2411a1dfc71a8ccabaa2de6c7ff6dfe8542ca9 Mon Sep 17 00:00:00 2001 From: Kyle Corry Date: Wed, 29 Nov 2023 17:07:12 -0500 Subject: [PATCH] Add guide for lightning strike distance tool --- .../trail_sense/tools/guide/infrastructure/Guides.kt | 5 +++++ .../java/com/kylecorry/trail_sense/tools/ui/Tools.kt | 3 ++- .../res/raw/guide_tool_lightning_stike_distance.md | 12 ++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 app/src/main/res/raw/guide_tool_lightning_stike_distance.md diff --git a/app/src/main/java/com/kylecorry/trail_sense/tools/guide/infrastructure/Guides.kt b/app/src/main/java/com/kylecorry/trail_sense/tools/guide/infrastructure/Guides.kt index 256bbb705..a0b68011a 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/tools/guide/infrastructure/Guides.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/tools/guide/infrastructure/Guides.kt @@ -66,6 +66,11 @@ object Guides { null, R.raw.guide_tool_clouds ), + UserGuide( + context.getString(R.string.tool_lightning_title), + null, + R.raw.guide_tool_lightning_stike_distance + ), if (Sensors.hasBarometer(context)) UserGuide( context.getString(R.string.guide_barometer_calibration_title), null, diff --git a/app/src/main/java/com/kylecorry/trail_sense/tools/ui/Tools.kt b/app/src/main/java/com/kylecorry/trail_sense/tools/ui/Tools.kt index 05aac1769..6b4b47b75 100644 --- a/app/src/main/java/com/kylecorry/trail_sense/tools/ui/Tools.kt +++ b/app/src/main/java/com/kylecorry/trail_sense/tools/ui/Tools.kt @@ -234,7 +234,8 @@ object Tools { R.drawable.ic_torch_on, R.id.action_action_experimental_tools_to_fragmentToolLightning, ToolCategory.Weather, - context.getString(R.string.tool_lightning_description) + context.getString(R.string.tool_lightning_description), + guideId = R.raw.guide_tool_lightning_stike_distance ), if (prefs.isAugmentedRealityEnabled && hasCompass) Tool( 25, diff --git a/app/src/main/res/raw/guide_tool_lightning_stike_distance.md b/app/src/main/res/raw/guide_tool_lightning_stike_distance.md new file mode 100644 index 000000000..b5c40e903 --- /dev/null +++ b/app/src/main/res/raw/guide_tool_lightning_stike_distance.md @@ -0,0 +1,12 @@ +The Lightning Strike Distance tool calculates how far away a lightning strike is. This helps you know if a storm is approaching or moving away. + +## Measuring Distance +To use: + +1. Press the lightning icon immediately after seeing lightning. +2. Press the thunder icon immediately after hearing thunder. +3. The distance to the strike will display at the top of the screen. + +If lightning is close enough to be dangerous, you will see a warning. + +The bottom of the screen shows the distance to the most recent strike. If the current strike distance is less than the last, the storm is likely approaching. If more, the storm is likely moving away. \ No newline at end of file