Fix gain display precision, reorder README demos

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
rolandnsharp
2026-04-07 20:15:57 +10:00
parent 7b7da1bca5
commit 7d886e8d1d
3 changed files with 8 additions and 8 deletions

View File

@@ -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

View File

@@ -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)])

View File

@@ -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)])