diff --git a/README.md b/README.md index 9f997e8..82dc9d0 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,14 @@ A terminal-based oscilloscope with CRT phosphor physics, written in Nim. Zero dependencies — 200KB binary, just libc. -## Half-block renderer - -![demo](demo.gif) - ## Braille renderer (amber palette) ![braille demo](braille_demo.gif) +## Half-block renderer + +![demo](demo.gif) + ## Features - **CRT boot/shutdown animations** — phosphor ramp, beam sweep, vertical collapse, dot fade diff --git a/src/osc.nim b/src/osc.nim index f42345c..e021e21 100644 --- a/src/osc.nim +++ b/src/osc.nim @@ -1,7 +1,7 @@ ## Terminal oscilloscope with CRT phosphor physics. ## Zero dependencies beyond Nim stdlib + libav (dlopen at runtime). -import os +import os, strutils import posix/termios as ptermios from posix import read import osc/canvas/[term, effects] @@ -135,7 +135,7 @@ proc main() = c.renderTrace(scope) let hud = " " & (if scope.mode == ModeYT: "Y-T" else: "X-Y") & - " G:" & $scope.gain & " " + " G:" & scope.gain.formatFloat(ffDecimal, 1) & " " let help = " m:mode +/-:gain [/]:time q:quit " c.flush([(1, 0, tNormal, hud), (w - help.len - 1, h - 1, tDim, help)]) diff --git a/src/osc_braille.nim b/src/osc_braille.nim index 20fa193..28714f0 100644 --- a/src/osc_braille.nim +++ b/src/osc_braille.nim @@ -1,6 +1,6 @@ ## Terminal oscilloscope — braille dot rendering (4× resolution). -import os +import os, strutils import posix/termios as ptermios from posix import read import osc/canvas/[braille, term, effects] @@ -129,7 +129,7 @@ proc main() = c.renderTrace(scope) let hud = " " & (if scope.mode == ModeYT: "Y-T" else: "X-Y") & - " G:" & $scope.gain & " " + " G:" & scope.gain.formatFloat(ffDecimal, 1) & " " let help = " m:mode +/-:gain [/]:time q:quit " c.flush([(1, 0, tNormal, hud), (w - help.len - 1, h - 1, tDim, help)])