Skip to content

Commit 092cb7f

Browse files
AI3Iclaude
andcommitted
fix(weatheralert): flood messages now say 'high water' instead of 'heavy rain'
Flash flood, flood, coastal flood, and lakeshore flood warning/watch messages were built from heavy.ulaw + rain.ulaw. Updated all four cases to high.ulaw + watt.ulaw + suffix_er.ulaw + warning/watch.ulaw so the audio reads "high water warning/watch", matching the TMS5220 sound set and more accurately describing the flood hazard. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 5368d18 commit 092cb7f

2 files changed

Lines changed: 13 additions & 12 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ All notable changes to `app_rpt__ultra` are documented here.
1515
- **`kerchunkd.sh`: TOCTOU race in PID file check** — Replaced check-then-write PID file pattern with `flock -n` on a lock file for atomic single-instance enforcement.
1616
- **`configkeeper.sh`: `--delete` on single-file rsync calls**`rsync --delete` is only meaningful for directory syncs; removed from all five single-file `rsync -az` calls (config.ini, rpt.conf, manager.conf, extensions.conf, allmon3.ini).
1717
- **`repair.sh`: `eval` used for fix command execution** — Replaced `eval "$fix_command"` with `bash -c "$fix_command"` at both call sites in `ask_repair()`.
18+
- **`weatheralert.sh`: Flood messages announced as "heavy rain"** — Flash flood, flood, coastal flood, and lakeshore flood warnings/watches were built from `heavy.ulaw + rain.ulaw`. Changed to `high.ulaw + watt.ulaw + suffix_er.ulaw + warning/watch.ulaw` ("high water warning/watch") to match the correct TMS5220 sound set and more accurately describe the hazard.
1819
- **`upgrade.sh`: sed substitution vulnerable to special characters in user values** — API keys, hostnames, and other user-supplied values containing `/`, `&`, or `\` would corrupt sed expressions. Added `escape_sed_replacement()` helper; all ten config sed substitutions now escape their values before substitution.
1920
- **`kerchunkd.sh`: Daemon exits on transient loop iteration errors** — Extracted loop body to `_loop_iteration()` function; `main_loop()` calls it with `|| log_error …` so individual iteration failures are logged and recovered from without killing the daemon.
2021
- **`install.sh`: Temp file leaked on crontab install failure**`mktemp` temp file is now explicitly cleaned up if `crontab -u` fails.

app_rpt/bin/weatheralert.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -195,14 +195,14 @@ build_weather_message() {
195195
log "Built custom message: dense fog advisory (as heavy fog condition)"
196196
;;
197197
*flash*flood*warning*|*flood*warning*)
198-
# NWS: "Flash Flood Warning", "Flood Warning" → "heavy rain warning"
199-
cat "${SOUNDS}/_male/heavy.ulaw" "${SOUNDS}/_male/rain.ulaw" "${SOUNDS}/_male/warning.ulaw" > "$message_file"
200-
log "Built custom message: flood warning (as heavy rain warning)"
198+
# NWS: "Flash Flood Warning", "Flood Warning" → "high water warning"
199+
cat "${SOUNDS}/_male/high.ulaw" "${SOUNDS}/_male/watt.ulaw" "${SOUNDS}/_male/suffix_er.ulaw" "${SOUNDS}/_male/warning.ulaw" > "$message_file"
200+
log "Built custom message: flood warning (as high water warning)"
201201
;;
202202
*flash*flood*watch*|*flood*watch*)
203-
# NWS: "Flash Flood Watch", "Flood Watch" → "heavy rain watch"
204-
cat "${SOUNDS}/_male/heavy.ulaw" "${SOUNDS}/_male/rain.ulaw" "${SOUNDS}/_male/watch.ulaw" > "$message_file"
205-
log "Built custom message: flood watch (as heavy rain watch)"
203+
# NWS: "Flash Flood Watch", "Flood Watch" → "high water watch"
204+
cat "${SOUNDS}/_male/high.ulaw" "${SOUNDS}/_male/watt.ulaw" "${SOUNDS}/_male/suffix_er.ulaw" "${SOUNDS}/_male/watch.ulaw" > "$message_file"
205+
log "Built custom message: flood watch (as high water watch)"
206206
;;
207207
*freeze*warning*|*hard*freeze*warning*)
208208
# NWS: "Freeze Warning", "Hard Freeze Warning" → "freezing warning"
@@ -230,14 +230,14 @@ build_weather_message() {
230230
log "Built custom message: frost advisory (as freezing condition)"
231231
;;
232232
*coastal*flood*warning*|*lakeshore*flood*warning*)
233-
# NWS: "Coastal Flood Warning", "Lakeshore Flood Warning" → "heavy rain warning"
234-
cat "${SOUNDS}/_male/heavy.ulaw" "${SOUNDS}/_male/rain.ulaw" "${SOUNDS}/_male/warning.ulaw" > "$message_file"
235-
log "Built custom message: coastal/lakeshore flood warning (as heavy rain warning)"
233+
# NWS: "Coastal Flood Warning", "Lakeshore Flood Warning" → "high water warning"
234+
cat "${SOUNDS}/_male/high.ulaw" "${SOUNDS}/_male/watt.ulaw" "${SOUNDS}/_male/suffix_er.ulaw" "${SOUNDS}/_male/warning.ulaw" > "$message_file"
235+
log "Built custom message: coastal/lakeshore flood warning (as high water warning)"
236236
;;
237237
*coastal*flood*watch*|*lakeshore*flood*watch*)
238-
# NWS: "Coastal Flood Watch", "Lakeshore Flood Watch" → "heavy rain watch"
239-
cat "${SOUNDS}/_male/heavy.ulaw" "${SOUNDS}/_male/rain.ulaw" "${SOUNDS}/_male/watch.ulaw" > "$message_file"
240-
log "Built custom message: coastal/lakeshore flood watch (as heavy rain watch)"
238+
# NWS: "Coastal Flood Watch", "Lakeshore Flood Watch" → "high water watch"
239+
cat "${SOUNDS}/_male/high.ulaw" "${SOUNDS}/_male/watt.ulaw" "${SOUNDS}/_male/suffix_er.ulaw" "${SOUNDS}/_male/watch.ulaw" > "$message_file"
240+
log "Built custom message: coastal/lakeshore flood watch (as high water watch)"
241241
;;
242242
*extreme*heat*warning*|*excessive*heat*warning*)
243243
# NWS: "Extreme Heat Warning", "Excessive Heat Warning" → "severe temperature warning"

0 commit comments

Comments
 (0)