Remove freeze functionality

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
rolandnsharp
2026-04-05 20:25:19 +10:00
parent eca991b685
commit a4f39f8494
2 changed files with 4 additions and 13 deletions

View File

@@ -37,13 +37,9 @@ proc main() =
h = nh
scope.resize(w, h)
if not scope.frozen:
audio.readSamples(scope)
audio.readSamples(scope)
scope.phosphor.decay()
if not scope.frozen:
scope.renderTrace()
scope.renderTrace()
tb = newTerminalBuffer(w, h)
scope.phosphor.render(tb)
@@ -65,8 +61,6 @@ proc main() =
scope.timeDiv = min(scope.timeDiv * 1.5, 16.0)
of Key.LeftBracket:
scope.timeDiv = max(scope.timeDiv / 1.5, 0.25)
of Key.Space:
scope.frozen = not scope.frozen
of Key.G:
scope.grid = if scope.grid == gsGrid: gsOff else: gsGrid
else:

View File

@@ -19,7 +19,6 @@ type
sampleCount*: int
gain*: float # amplitude scaling (volts/div)
timeDiv*: float # horizontal zoom (time/div)
frozen*: bool
grid*: GridStyle
proc initScope*(w, h: int): Scope =
@@ -31,7 +30,6 @@ proc initScope*(w, h: int): Scope =
sampleCount: 0,
gain: 5.0,
timeDiv: 2.25,
frozen: false,
grid: gsOff
)
@@ -128,9 +126,8 @@ proc drawHUD*(tb: var TerminalBuffer, w, h: int, scope: Scope) =
let tdStr = if scope.mode == ModeYT:
" T:" & formatFloat(scope.timeDiv, ffDecimal, 1)
else: ""
let freezeStr = if scope.frozen: " ▌▌" else: ""
tb.write(1, 0, fgGreen, styleBright,
" " & modeStr & gainStr & tdStr & freezeStr & " ")
" " & modeStr & gainStr & tdStr & " ")
let help = " m:mode +/-:gain [/]:time g:grid spc:freeze q:quit "
let help = " m:mode +/-:gain [/]:time g:grid q:quit "
tb.write(w - help.len - 1, h - 1, fgGreen, styleDim, help)