From 21f47eb1d0fadf0e9e378ebd4ccab915c0ccf4c6 Mon Sep 17 00:00:00 2001 From: Brandon Date: Wed, 12 Aug 2026 09:15:10 -0700 Subject: [PATCH 1/3] fix PLogic issue and restore channel switching in SLICE_HW --- .../model/acquisitions/AcquisitionEngine.java | 17 +++++++++++++++-- .../model/devices/vendor/ASIPLogic.java | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/micromanager/lightsheetmanager/model/acquisitions/AcquisitionEngine.java b/src/main/java/org/micromanager/lightsheetmanager/model/acquisitions/AcquisitionEngine.java index ead6517f..43580b4e 100644 --- a/src/main/java/org/micromanager/lightsheetmanager/model/acquisitions/AcquisitionEngine.java +++ b/src/main/java/org/micromanager/lightsheetmanager/model/acquisitions/AcquisitionEngine.java @@ -534,9 +534,22 @@ public void setPause(boolean b) { @Override public boolean abortRequest() { - if (currentAcquisition_ != null) { - currentAcquisition_.abort(); + // read once: the acquisition thread clears this field as soon as finish() returns + final Acquisition acq = currentAcquisition_; + if (acq == null) { + return true; // nothing is running, so there is nothing to protect + } + // Micro-Manager vetoes the entire viewer close when this returns false, so refusing here + // keeps the close from racing the end of run save. Both closes post to the same event + // subscriber, and the acquisition thread already holds that lock while the save runs. + // The display's own abort button also calls this and ignores the result, so the + // confirmation has to answer for both callers. Unattended runs are not asked and are + // left running. + if (!model_.logging().confirmOrDefault("Abort Acquisition", + "Abort the current acquisition task?", false)) { + return false; } + acq.abort(); return true; } diff --git a/src/main/java/org/micromanager/lightsheetmanager/model/devices/vendor/ASIPLogic.java b/src/main/java/org/micromanager/lightsheetmanager/model/devices/vendor/ASIPLogic.java index 39607d53..cef28fd8 100644 --- a/src/main/java/org/micromanager/lightsheetmanager/model/devices/vendor/ASIPLogic.java +++ b/src/main/java/org/micromanager/lightsheetmanager/model/devices/vendor/ASIPLogic.java @@ -17,7 +17,7 @@ public class ASIPLogic extends ASITigerBase { public static final int addrZero = 0; - public static final int addrEdge = 0; + public static final int addrEdge = 128; public static final int addrInvert = 64; // front panel BNC 1-8 From f5859030bc394700a77c2146eab9b66d4a98c4cd Mon Sep 17 00:00:00 2001 From: Brandon Date: Wed, 12 Aug 2026 09:23:03 -0700 Subject: [PATCH 2/3] bump version number --- .../micromanager/lightsheetmanager/LightSheetManagerPlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/micromanager/lightsheetmanager/LightSheetManagerPlugin.java b/src/main/java/org/micromanager/lightsheetmanager/LightSheetManagerPlugin.java index 2e97db16..e918010a 100644 --- a/src/main/java/org/micromanager/lightsheetmanager/LightSheetManagerPlugin.java +++ b/src/main/java/org/micromanager/lightsheetmanager/LightSheetManagerPlugin.java @@ -15,7 +15,7 @@ public class LightSheetManagerPlugin implements MenuPlugin, SciJavaPlugin { public static final String copyright = "Applied Scientific Instrumentation (ASI), 2022-2026"; public static final String description = "A plugin to control various types of light sheet microscopes."; public static final String menuName = "Light Sheet Manager"; - public static final String version = "0.7.8"; + public static final String version = "0.8.0"; private Studio studio_; From 37a0d4b110c29e572df847e370add9def4f12ca4 Mon Sep 17 00:00:00 2001 From: Brandon Date: Wed, 12 Aug 2026 16:18:34 -0700 Subject: [PATCH 3/3] fix hang when closing the acquisition window during an acquisition --- .../model/acquisitions/AcquisitionEngine.java | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/micromanager/lightsheetmanager/model/acquisitions/AcquisitionEngine.java b/src/main/java/org/micromanager/lightsheetmanager/model/acquisitions/AcquisitionEngine.java index 43580b4e..4f83970e 100644 --- a/src/main/java/org/micromanager/lightsheetmanager/model/acquisitions/AcquisitionEngine.java +++ b/src/main/java/org/micromanager/lightsheetmanager/model/acquisitions/AcquisitionEngine.java @@ -539,18 +539,15 @@ public boolean abortRequest() { if (acq == null) { return true; // nothing is running, so there is nothing to protect } - // Micro-Manager vetoes the entire viewer close when this returns false, so refusing here - // keeps the close from racing the end of run save. Both closes post to the same event - // subscriber, and the acquisition thread already holds that lock while the save runs. - // The display's own abort button also calls this and ignores the result, so the - // confirmation has to answer for both callers. Unattended runs are not asked and are - // left running. - if (!model_.logging().confirmOrDefault("Abort Acquisition", + // always refuse while a run is live: Micro-Manager vetoes the close, and that veto is what + // keeps it from racing the abort into finish(), whose save closes the same datastore from + // the acquisition thread. answering yes only aborts, so the close succeeds on the next + // attempt. the display's abort button also lands here and ignores the result. + if (model_.logging().confirmOrDefault("Abort Acquisition", "Abort the current acquisition task?", false)) { - return false; + acq.abort(); } - acq.abort(); - return true; + return false; } @Override