From 0797fa4e1041c1bb737e47fda0c0dfc8917809de Mon Sep 17 00:00:00 2001 From: David Meyer Date: Sat, 6 Jan 2024 23:19:54 -0800 Subject: [PATCH] disable opening an nScope that needs an update --- src/lab_bench.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lab_bench.rs b/src/lab_bench.rs index 84b54b0..1f8026c 100644 --- a/src/lab_bench.rs +++ b/src/lab_bench.rs @@ -244,6 +244,9 @@ impl NscopeLink { /// /// Fails if the nScope is in DFU mode or needs an update pub fn open(&self, power_on: bool) -> Result> { + if self.needs_update { + return Err("nScope needs a firmware update".into()); + } Nscope::new(&self.device, power_on) }