Skip to content

Commit

Permalink
Merge pull request #543 from nicost/Daheng
Browse files Browse the repository at this point in the history
Daheng: Fix TriggerActivation property
  • Loading branch information
nicost authored Dec 27, 2024
2 parents 90e6cc0 + 66cc618 commit f28f4a2
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions DeviceAdapters/DahengGalaxy/ClassGalaxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ int ClassGalaxy::Initialize()
}
//获取可执行程序的当前路径,默认开启第一个
initialized_ = false;
// This checks, among other things, that the camera is not already in use.
// This checks, among other things, that if the camera is already in use.
// Without that check, the following CreateDevice() may crash on duplicate
// serial number. Unfortunately, this call is slow. 默认打开第一个设备
int index = 0;
Expand Down Expand Up @@ -477,14 +477,20 @@ int ClassGalaxy::Initialize()
assert(ret == DEVICE_OK);
}

// TriggerActivation
// TriggerSelector. Should this be exposed as a property?
if (m_objDevicePtr->GetRemoteFeatureControl()->IsImplemented("TriggerSelector"))
{
m_objFeatureControlPtr->GetEnumFeature("TriggerSelector")->SetValue("FrameStart");
m_objFeatureControlPtr->GetEnumFeature("TriggerSelector")->SetValue("FrameStart");
}

// TriggerActivation
if (m_objDevicePtr->GetRemoteFeatureControl()->IsImplemented("TriggerActivation"))
{
CEnumFeaturePointer adjTriggerSelector = m_objFeatureControlPtr->GetEnumFeature("TriggerActivation");
pAct = new CPropertyAction(this, &ClassGalaxy::OnTriggerActivation);
ret = CreateProperty("TriggerActivation", "NA", MM::String, false, pAct);
vector<string> LSPVals;
gxstring_vector entries = triggersource->GetEnumEntryList();
gxstring_vector entries = adjTriggerSelector->GetEnumEntryList();
for (size_t i = 0; i < entries.size(); i++)
{
string strValue(entries[i]);
Expand Down

0 comments on commit f28f4a2

Please sign in to comment.