1
0
Fork 0
mirror of https://github.com/gwm17/Daqromancy.git synced 2024-11-23 03:08:51 -05:00

Compare commits

..

2 Commits

3 changed files with 15 additions and 10 deletions

View File

@ -296,7 +296,7 @@ namespace Daqromancy {
changed = true; changed = true;
} }
ImGui::TableNextColumn(); ImGui::TableNextColumn();
if (ImGui::InputInt(fmt::format("##flatTopDelay_{0}", i).c_str(), &channel.decayTimeConst, 0, 0)) if (ImGui::InputInt(fmt::format("##flatTopDelay_{0}", i).c_str(), &channel.flatTopDelay, 0, 0))
{ {
changed = true; changed = true;
} }

View File

@ -258,24 +258,29 @@ namespace Daqromancy {
if (panel_status) if (panel_status)
{ {
//Update project //Update project
m_project->SetDigitizerParameters(panel.GetDigitizerHandle(), panel.GetDigitizerParameters()); int handle = panel.GetDigitizerHandle();
if (panel.GetPanelType() == DigitizerPanel::Type::PHA) DigitizerPanel::Type type = panel.GetPanelType();
m_project->SetDigitizerParameters(handle, panel.GetDigitizerParameters());
if (type == DigitizerPanel::Type::PHA)
{ {
m_project->SetPHAParameters(panel.GetDigitizerHandle(), panel.GetPHAChannelParameters()); m_project->SetPHAParameters(handle, panel.GetPHAChannelParameters());
m_project->SetPHAWaveParameters(panel.GetDigitizerHandle(), panel.GetPHAWaveParameters()); m_project->SetPHAWaveParameters(handle, panel.GetPHAWaveParameters());
} }
else if (panel.GetPanelType() == DigitizerPanel::Type::PSD) else if (type == DigitizerPanel::Type::PSD)
{ {
m_project->SetPSDParameters(panel.GetDigitizerHandle(), panel.GetPSDChannelParameters()); m_project->SetPSDParameters(handle, panel.GetPSDChannelParameters());
m_project->SetPSDWaveParameters(panel.GetDigitizerHandle(), panel.GetPSDWaveParameters()); m_project->SetPSDWaveParameters(handle, panel.GetPSDWaveParameters());
} }
else else
{ {
DY_WARN("Unidentified digitizer type attempting to communicate with project"); DY_WARN("Unidentified digitizer type attempting to communicate with project");
} }
//Emit event to update aquisition side //Emit event to update aquisition side
AcqParametersEvent e(DigitizerAccessType::Single, panel.GetDigitizerHandle()); AcqParametersEvent e(DigitizerAccessType::Single, handle);
m_eventCallback(e); m_eventCallback(e);
//Load back any changes CAEN made, sometimes specific numbers are invalid
UpdateDigitizerPanels();
} }
} }

View File

@ -56,7 +56,7 @@ namespace Daqromancy {
{ {
m_selectedBoard = boardArgs.handle; m_selectedBoard = boardArgs.handle;
availChannels = boardArgs.channels; availChannels = boardArgs.channels;
selectedBoardString = fmt::format("{0}", m_selectedBoard); selectedBoardString = boardArgs.name;
if (boardArgs.firmware == CAEN_DGTZ_DPPFirmware_PHA) if (boardArgs.firmware == CAEN_DGTZ_DPPFirmware_PHA)
{ {
const auto& phaParams = m_project->GetPHAWaveParameters(boardArgs.handle); const auto& phaParams = m_project->GetPHAWaveParameters(boardArgs.handle);