Raxol.Sensor.HUD
(Raxol v2.3.0)
View Source
Pure functional HUD rendering for sensor data.
All functions take a region {x, y, w, h}, data, and options,
and return a list of {x, y, char, fg, bg, attrs} cell tuples.
Summary
Functions
Renders a horizontal gauge bar.
Renders a minimap using braille dot patterns.
Renders a sparkline from a list of numeric values.
Renders a threat indicator with level and bearing.
Types
@type cell() :: {non_neg_integer(), non_neg_integer(), String.t(), atom(), atom(), map()}
@type region() :: {non_neg_integer(), non_neg_integer(), pos_integer(), pos_integer()}
Functions
Renders a horizontal gauge bar.
Options:
label-- prefix label (default: "")min-- minimum value (default: 0.0)max-- maximum value (default: 100.0)thresholds--{warn, crit}percentages (default:{0.6, 0.85})
Renders a minimap using braille dot patterns.
Entities: [%{x: 0.0..1.0, y: 0.0..1.0, char: "x"}]
Maps normalized coordinates into a braille grid (2 dots wide x 4 dots tall per character).
Options:
border-- draw border (default: true)
Renders a sparkline from a list of numeric values.
Options:
label-- prefix label (default: "")min-- explicit minimum (default: auto from data)max-- explicit maximum (default: auto from data)
Renders a threat indicator with level and bearing.
Options:
label-- prefix (default: "THREAT")
Levels: :none, :low, :medium, :high, :critical