diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f0449b..b8e662f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,12 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how Security -- in case of vulnerabilities. --> +## [0.18.2] + +### Fixed + +- Fix issue in discovering instruments when VISA errors + ## [0.18.1] ### Fixed diff --git a/Cargo.lock b/Cargo.lock index 4ff6e72..cd6cfa5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1054,7 +1054,7 @@ dependencies = [ [[package]] name = "instrument-repl" -version = "0.18.1" +version = "0.18.2" dependencies = [ "chrono", "clap", @@ -1169,7 +1169,7 @@ dependencies = [ [[package]] name = "kic" -version = "0.18.1" +version = "0.18.2" dependencies = [ "anyhow", "clap", @@ -1188,7 +1188,7 @@ dependencies = [ [[package]] name = "kic-discover" -version = "0.18.1" +version = "0.18.2" dependencies = [ "anyhow", "async-std", @@ -1218,7 +1218,7 @@ dependencies = [ [[package]] name = "kic-discover-visa" -version = "0.18.1" +version = "0.18.2" dependencies = [ "anyhow", "async-std", @@ -1248,7 +1248,7 @@ dependencies = [ [[package]] name = "kic-visa" -version = "0.18.1" +version = "0.18.2" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index b10a1b2..60b8e55 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ members = [ resolver = "2" [workspace.package] -version = "0.18.1" +version = "0.18.2" authors = ["Keithley Instruments, LLC"] edition = "2021" repository = "https://github.com/tektronix/tsp-toolkit-kic-cli" diff --git a/kic-discover-visa/src/visa.rs b/kic-discover-visa/src/visa.rs index 6f7c88f..aa51a4b 100644 --- a/kic-discover-visa/src/visa.rs +++ b/kic-discover-visa/src/visa.rs @@ -15,7 +15,13 @@ pub async fn visa_discover(timeout: Option) -> anyhow::Result = HashSet::new(); let rm = visa_rs::DefaultRM::new()?; - let instruments = rm.find_res_list(&CString::new("?*")?.into())?; + let instruments = match rm.find_res_list(&CString::new("?*")?.into()) { + Ok(x) => x, + Err(e) => { + trace!("No VISA instruments found: {e}"); + return Ok(discovered_instruments); + } + }; trace!("discovered: {instruments:?}"); for i in instruments {