diff --git a/default.nix b/default.nix index 1f56d5e..fb16079 100644 --- a/default.nix +++ b/default.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage { nativeBuildInputs = [ pkg-config ]; - cargoBuildFlags = [ "--no-default-features" "--bin" "main_loop" ]; + cargoBuildFlags = [ "--no-default-features" "--bin" "take_measurement" ]; buildInputs = [ sqlite ]; diff --git a/src/bin/draw/totp.rs b/src/bin/draw/totp.rs index f41d8fd..0d8bdb2 100644 --- a/src/bin/draw/totp.rs +++ b/src/bin/draw/totp.rs @@ -33,9 +33,9 @@ impl Totp { pub fn next_page(&mut self) { self.page += 1; - if self.secrets.len() < self.page * 6 { - self.page = 0; - } + if self.secrets.len() < self.page * 6 { + self.page = 0; + } } } diff --git a/src/bin/main_loop.rs b/src/bin/main_loop.rs index 59397a5..2d5f7ad 100644 --- a/src/bin/main_loop.rs +++ b/src/bin/main_loop.rs @@ -326,13 +326,6 @@ fn main_loop(mut disp: Oled, mut ctx: ContextDefault) { let mut last_button = Instant::now(); let mut menu = vec![]; - // high pins for buttons - let _high_outputs = gpiocdev::Request::builder() - .on_chip("/dev/gpiochip0") - .with_lines(&[23, 24]) - .as_output(Value::Active) - .request() - .unwrap(); let lines = gpiocdev::Request::builder() .on_chip("/dev/gpiochip0") .with_line(19)