Skip to content

Commit cff69f1

Browse files
author
arthur
committed
git-svn-id: https://valelab.ucsf.edu/svn/micromanager2/trunk@13639 d0ab736e-dc22-4aeb-8dc9-08def0aa14fd
1 parent 75c7c61 commit cff69f1

6 files changed

Lines changed: 38 additions & 4 deletions

File tree

MMCore/CoreCallback.cpp

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ int CoreCallback::OnPropertyChanged(const MM::Device* device, const char* propNa
219219
core_->stateCache_.addSetting(*ps);
220220
}
221221
core_->externalCallback_->onPropertyChanged(label, propName, value);
222-
222+
223223
// find all configs that contain this property and callback to indicate
224224
// that the config group changed
225225
// TODO: assess whether performace is better by maintaining a map tying
@@ -349,6 +349,21 @@ int CoreCallback::OnExposureChanged(const MM::Device* device, double newExposure
349349
return DEVICE_OK;
350350
}
351351

352+
/**
353+
* Handler for SLM exposure update
354+
*
355+
*/
356+
int CoreCallback::OnSLMExposureChanged(const MM::Device* device, double newExposure)
357+
{
358+
if (core_->externalCallback_) {
359+
MMThreadGuard g(*pValueChangeLock_);
360+
char label[MM::MaxStrLength];
361+
device->GetLabel(label);
362+
core_->externalCallback_->onSLMExposureChanged(label, newExposure);
363+
}
364+
return DEVICE_OK;
365+
}
366+
352367
/**
353368
* Handler for magnifier changer
354369
*

MMCore/CoreCallback.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ class CoreCallback : public MM::Core
171171
int OnXYStagePositionChanged(const MM::Device* device, double xpos, double ypos);
172172
int OnFinished(const MM::Device* /* caller */);
173173
int OnExposureChanged(const MM::Device* device, double newExposure);
174+
int OnSLMExposureChanged(const MM::Device* device, double newExposure);
174175
int OnMagnifierChanged(const MM::Device* device);
175176

176177

MMCore/MMCore.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ using namespace std;
7979

8080
// version info
8181
const int MMCore_versionMajor = 2;
82-
const int MMCore_versionMinor = 3;
83-
const int MMCore_versionBuild = 2;
82+
const int MMCore_versionMinor = 4;
83+
const int MMCore_versionBuild = 0;
8484

8585

8686
// Legacy macros for logging.

MMCore/MMEventCallback.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,9 @@ class MMEventCallback
8585
std::cout << "onExposureChanged()" << name << " " << newExposure << "\n";
8686
}
8787

88+
virtual void onSLMExposureChanged(char* name, double newExposure)
89+
{
90+
std::cout << "onSLMExposureChanged()" << name << " " << newExposure << "\n";
91+
}
92+
8893
};

MMDevice/DeviceBase.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,6 +1110,15 @@ class CDeviceBase : public T
11101110
return DEVICE_NO_CALLBACK_REGISTERED;
11111111
}
11121112

1113+
/*
1114+
*/
1115+
int OnSLMExposureChanged(double exposure)
1116+
{
1117+
if (callback_)
1118+
return callback_->OnSLMExposureChanged(this, exposure);
1119+
return DEVICE_NO_CALLBACK_REGISTERED;
1120+
}
1121+
11131122
/**
11141123
*/
11151124
int OnMagnifierChanged()

MMDevice/MMDevice.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
// Header version
2828
// If any of the class definitions changes, the interface version
2929
// must be incremented
30-
#define DEVICE_INTERFACE_VERSION 59
30+
#define DEVICE_INTERFACE_VERSION 60
3131
///////////////////////////////////////////////////////////////////////////////
3232

3333

@@ -1197,6 +1197,10 @@ namespace MM {
11971197
* When the exposure time has changed, use this callback to inform the UI
11981198
*/
11991199
virtual int OnExposureChanged(const Device* caller, double newExposure) = 0;
1200+
/**
1201+
* When the SLM exposure time has changed, use this callback to inform the UI
1202+
*/
1203+
virtual int OnSLMExposureChanged(const Device* caller, double newExposure) = 0;
12001204
/**
12011205
* Magnifiers can use this to signal changes in magnification
12021206
*/

0 commit comments

Comments
 (0)