Commit graph

7 commits

Author SHA1 Message Date
4366fa36da
Refactor conditionals to use multi-clause pattern matching
Replace case/cond/if blocks with multi-clause function dispatch
and pattern matching in function heads across 9 modules:
- WeatherUnits: case to multi-clause unit_system/1, unit_labels via do_unit_labels/1
- PacketUtils: if to pattern match on %{"id" => id}, multi-clause threshold/callsign
- SetLocale: case to multi-clause extract_locale/1
- IPGeolocation: if/cond to pattern match on conn, binary prefix matching for private_ip?
- DeviceIdentification: cond to extracted pattern_matches?/2
- MobileChannel: cond to multi-clause do_callsign_match/2
- PacketProcessor: cond to dispatch_visibility/6 on {in_bounds, has_marker} tuple
- PacketManager: destructure packet_state in heads, multi-clause maybe_cleanup/3
- AprsSymbol: case/if to multi-clause get_table_id/1, normalize_symbol_code/1
2026-02-10 17:15:49 -06:00
887c35a1c8
Fix DateTime.to_iso8601 error by handling NaiveDateTime
- Handle both DateTime and NaiveDateTime structs from database
- Convert NaiveDateTime to UTC DateTime before formatting
- Add fallback for string timestamps
- Fixes FunctionClauseError when processing packets
2025-07-29 10:57:36 -05:00
566198afa7
clean up warnings 2025-07-16 08:55:46 -05:00
8e507702f7
more performance improvements/cleanup 2025-07-14 16:49:55 -05:00
e6ccb9662b
major refactor for cleanup 2025-07-14 12:06:10 -05:00
b1ee1f92f9
dont parse device identifiers on each insert 2025-07-10 15:16:01 -05:00
48447ab42e
refactor and performance improvements 2025-07-10 10:53:34 -05:00