mirror of
https://github.com/hubaldv/bioz-host-rs.git
synced 2025-12-06 05:11:17 +00:00
Add 2/4-lead option to GUI.
This commit is contained in:
@@ -103,7 +103,7 @@ pub async fn communicate_with_hardware(
|
||||
if gui_logging_enabled_clone.load(Ordering::Relaxed) {
|
||||
let settings = *settings_clone.lock().unwrap();
|
||||
match settings.frequency {
|
||||
Some(StartStopSignal::StartSingle(freq, _)) => {
|
||||
Some(StartStopSignal::StartSingle(freq, _, _)) => {
|
||||
if let Err(e) = log_tx_clone.send(LoggingSignal::SingleImpedance(SystemTime::now(), freq, val.magnitude, val.phase)).await {
|
||||
error!("Failed to send logging signal: {:?}", e);
|
||||
}
|
||||
@@ -177,11 +177,11 @@ pub async fn communicate_with_hardware(
|
||||
select! {
|
||||
Some(frequency) = run_impedancemeter_rx.recv() => {
|
||||
match frequency {
|
||||
StartStopSignal::StartSingle(freq, dft_num) => {
|
||||
match workbook_client.start_impedancemeter_single(freq, dft_num).await {
|
||||
StartStopSignal::StartSingle(freq, lead_mode, dft_num) => {
|
||||
match workbook_client.start_impedancemeter_single(freq, lead_mode, dft_num).await {
|
||||
Ok(Ok(periods)) => {
|
||||
info!("Impedance meter started at frequency: {} with periods per DFT: {}", freq, periods);
|
||||
settings.lock().unwrap().frequency = Some(StartStopSignal::StartSingle(freq, dft_num));
|
||||
settings.lock().unwrap().frequency = Some(StartStopSignal::StartSingle(freq, lead_mode, dft_num));
|
||||
*periods_per_dft.lock().unwrap() = Some(periods);
|
||||
},
|
||||
Ok(Err(e)) => {
|
||||
|
||||
Reference in New Issue
Block a user