From 6807bb597276f3ef9ba0db03cd4da43a15aaf98a Mon Sep 17 00:00:00 2001 From: alemidev Date: Fri, 13 Jan 2023 02:59:53 +0100 Subject: [PATCH] fix: update readme and increments --- README.md | 15 +++++++++------ src/app.rs | 12 ++++++------ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index e6fd1bf..8ef243e 100644 --- a/README.md +++ b/README.md @@ -42,18 +42,21 @@ To change audio buffer size, the PulseAudio client must be restarted. Because of ## Controls * Use `q` or `CTRL+C` to exit +* Use `t` to toggle triggered mode * Use `` to pause and resume display -* Use `` and `` to decrease or increase range by 100 -* Use `` and `` to decrease or increase threshold by 100 - * Combine arrows with `` to increase or decrease by 1000 instead - * Combine arrows with `` to increase or decrease by 10 instead - * Combine arrows with `` to increase or decrease by 1 instead +* Use `` and `` to increase or decrease time range by 25 +* Use `` and `` to increase or decrease amplitude scale by 250 +* Use `` and `` to increase or decrease threshold by 250 + * Combine arrows with `` to increase or decrease by x4 + * Combine arrows with `` to increase or decrease by /5 + * Press `` to restore width and scale to default values * Use `v` to toggle vectorscope mode * Use `s` to toggle scatter mode * Use `b` to toggle braille characters * Use `h` to toggle interface * Use `r` to toggle reference lines -* Use `t` to toggle triggered mode +* Use `` to show ui and revert to oscilloscope +* Use `` to reset all options to startup values # About precision While "scatter" plot mode is as precise as Pulseaudio and the terminal lets us be, "line" plot mode simply draws a straight line across points, meaning high frequencies don't get properly represented. diff --git a/src/app.rs b/src/app.rs index 62fbe3f..f33c40a 100644 --- a/src/app.rs +++ b/src/app.rs @@ -270,12 +270,12 @@ pub fn run_app(args: Args, terminal: &mut Terminal) -> Result<() KeyModifiers::CONTROL => { match key.code { // mimic other programs shortcuts to quit, for user friendlyness KeyCode::Char('c') | KeyCode::Char('q') | KeyCode::Char('w') => break, - KeyCode::Up => app.cfg.scale -= 10, // inverted to act as zoom - KeyCode::Down => app.cfg.scale += 10, // inverted to act as zoom - KeyCode::Right => app.cfg.width += 1, - KeyCode::Left => app.cfg.width -= 1, - KeyCode::PageUp => app.cfg.threshold += 10.0, - KeyCode::PageDown => app.cfg.threshold -= 10.0, + KeyCode::Up => app.cfg.scale -= 50, // inverted to act as zoom + KeyCode::Down => app.cfg.scale += 50, // inverted to act as zoom + KeyCode::Right => app.cfg.width += 5, + KeyCode::Left => app.cfg.width -= 5, + KeyCode::PageUp => app.cfg.threshold += 50.0, + KeyCode::PageDown => app.cfg.threshold -= 50.0, KeyCode::Char('r') => { // reset settings app.cfg.references = !args.no_reference; app.cfg.show_ui = !args.no_ui;