Re-arranged trigger source configuration
This commit is contained in:
1 parent
5ab32c3921
commit
51134fb2db
12 files changed
+126
-2824
No files matched your search
@@ -170,7 +170,7 @@ void ConfigDialog::OnBoardSelect( wxCommandEvent& event )
|
||||
m_osci->SetMultiBoard(true);
|
||||
for (int i=1 ; i<m_osci->GetNumberOfBoards() ; i++) {
|
||||
DRSBoard *b = m_frame->GetOsci()->GetBoard(i);
|
||||
m_frame->SetTriggerSource(i, 4); // select external trigger
|
||||
m_frame->SetTriggerConfig(i, (1<<4)); // select external trigger
|
||||
m_frame->SetTriggerPolarity(i, false); // positive trigger
|
||||
|
||||
if (b->GetFirmwareVersion() < 21260) {
|
||||
@@ -377,7 +377,7 @@ void ConfigDialog::OnButtonCalVolt( wxCommandEvent& event )
|
||||
int tcalSource = b->GetTcalSource();
|
||||
int flag1 = b->GetTriggerEnable(0);
|
||||
int flag2 = b->GetTriggerEnable(1);
|
||||
int trgSource = b->GetTriggerSource();
|
||||
int trgConfig = b->GetTriggerConfig();
|
||||
int trgDelay = b->GetTriggerDelay();
|
||||
double range = b->GetInputRange();
|
||||
int config = b->GetReadoutChannelConfig();
|
||||
@@ -391,7 +391,7 @@ void ConfigDialog::OnButtonCalVolt( wxCommandEvent& event )
|
||||
b->EnableTcal(tcalFreq, tcalLevel);
|
||||
b->SelectClockSource(tcalSource);
|
||||
b->EnableTrigger(flag1, flag2);
|
||||
b->SetTriggerSource(trgSource);
|
||||
b->SetTriggerConfig(trgConfig);
|
||||
b->SetTriggerDelayPercent(trgDelay);
|
||||
b->SetInputRange(range);
|
||||
if (casc == 2)
|
||||
@@ -437,7 +437,7 @@ void ConfigDialog::OnButtonCalTime( wxCommandEvent& event )
|
||||
int tcalSource = b->GetTcalSource();
|
||||
int flag1 = b->GetTriggerEnable(0);
|
||||
int flag2 = b->GetTriggerEnable(1);
|
||||
int trgSource = b->GetTriggerSource();
|
||||
int trgConfig = b->GetTriggerConfig();
|
||||
int trgDelay = b->GetTriggerDelay();
|
||||
double range = b->GetInputRange();
|
||||
int config = b->GetReadoutChannelConfig();
|
||||
@@ -461,7 +461,7 @@ void ConfigDialog::OnButtonCalTime( wxCommandEvent& event )
|
||||
b->EnableTcal(tcalFreq, tcalLevel);
|
||||
b->SelectClockSource(tcalSource);
|
||||
b->EnableTrigger(flag1, flag2);
|
||||
b->SetTriggerSource(trgSource);
|
||||
b->SetTriggerConfig(trgConfig);
|
||||
b->SetTriggerDelayPercent(trgDelay);
|
||||
b->SetInputRange(range);
|
||||
b->SetChannelConfig(config, 8, 8);
|
||||
|
||||
+43
-42
@@ -52,6 +52,7 @@ DOFrame_fb( parent )
|
||||
m_color[2] = wxColor(255, 150, 150); // light red
|
||||
m_color[3] = wxColor(150, 255, 150); // light green
|
||||
m_color[4] = wxColor(170, 170, 170); // grey for ext trigger
|
||||
m_color[5] = wxColor(170, 170, 170); // grey for combinatorial trigger
|
||||
|
||||
// colors for printing
|
||||
m_pcolor[0] = wxColor(128, 128, 0); // dark yellow
|
||||
@@ -59,6 +60,7 @@ DOFrame_fb( parent )
|
||||
m_pcolor[2] = wxColor(255, 0, 0); // red
|
||||
m_pcolor[3] = wxColor( 0, 255, 0); // green
|
||||
m_pcolor[4] = wxColor(128, 128, 128); // grey for ext trigger
|
||||
m_pcolor[5] = wxColor(128, 128, 128); // grey for combinatorial trigger
|
||||
|
||||
// initialize variables
|
||||
m_acqPerSecond = 0;
|
||||
@@ -104,7 +106,7 @@ DOFrame_fb( parent )
|
||||
m_HOffset[b] = 0;
|
||||
|
||||
m_trgMode[b] = TM_AUTO;
|
||||
m_trgSource[b] = 0; // CH1
|
||||
m_trgConfig[b] = (1<<0); // CH1
|
||||
m_trgLevel[b][0] = m_trgLevel[b][1] = m_trgLevel[b][2] = m_trgLevel[b][3] = 0.25;
|
||||
m_trgDelay[b] = 0;
|
||||
m_trgDelayNs[b] = 0;
|
||||
@@ -240,10 +242,7 @@ DOFrame_fb( parent )
|
||||
m_trgDelayNs[i] = m_osci->GetTriggerDelayNs();
|
||||
m_osci->SetInputRange(m_range[i]);
|
||||
m_osci->SetTriggerMode(m_trgMode[i]);
|
||||
if (m_trgConfig[i])
|
||||
m_osci->SetTriggerConfig(m_trgConfig[i]);
|
||||
else
|
||||
m_osci->SetTriggerSource(m_trgSource[i]);
|
||||
m_osci->SetTriggerConfig(m_trgConfig[i]);
|
||||
m_osci->SetTriggerLevel(m_trgLevel[0][i]);
|
||||
m_osci->SetTriggerPolarity(m_trgNegative[i]);
|
||||
m_osci->SetTriggerDelay(m_trgDelay[i]);
|
||||
@@ -260,7 +259,7 @@ DOFrame_fb( parent )
|
||||
if (m_multiBoard) {
|
||||
m_osci->SetMultiBoard(true);
|
||||
for (int i=1 ; i<m_osci->GetNumberOfBoards() ; i++) {
|
||||
SetTriggerSource(i, 4); // select external trigger
|
||||
SetTriggerConfig(i, (1<<4)); // select external trigger
|
||||
SetTriggerPolarity(i, false); // positive trigger
|
||||
}
|
||||
m_osci->SelectBoard(m_board);
|
||||
@@ -363,13 +362,11 @@ void DOFrame::UpdateControls()
|
||||
m_rbAuto->Enable(false);
|
||||
m_rbNormal->Enable(false);
|
||||
m_bpPolarity->Enable(false);
|
||||
m_rbSource->Enable(false);
|
||||
} else {
|
||||
m_slTrgLevel->Enable(true);
|
||||
m_rbAuto->Enable(true);
|
||||
m_rbNormal->Enable(true);
|
||||
m_bpPolarity->Enable(true);
|
||||
m_rbSource->Enable(true);
|
||||
m_btTrgCfg->Enable();
|
||||
}
|
||||
|
||||
@@ -382,10 +379,10 @@ void DOFrame::UpdateControls()
|
||||
m_bpPolarity->SetBitmapLabel(wxBitmap(neg_xpm));
|
||||
else
|
||||
m_bpPolarity->SetBitmapLabel(wxBitmap(pos_xpm));
|
||||
m_rbSource->SetSelection(m_trgSource[m_board]);
|
||||
|
||||
m_rbSource->Enable(5, false); // disable "X" button
|
||||
m_rbSource->SetSelection(GetTriggerChannel(m_board));
|
||||
m_slTrgDelay->SetValue(100-m_trgDelay[m_board]);
|
||||
if (m_trgConfig[m_board])
|
||||
m_rbSource->Enable(false);
|
||||
|
||||
m_btCh1->SetValue(m_chnOn[m_board][0]);
|
||||
m_btCh2->SetValue(m_chnOn[m_board][1]);
|
||||
@@ -549,8 +546,6 @@ void DOFrame::SaveConfig()
|
||||
mxml_write_element(xml, "TrgMode", str);
|
||||
sprintf(str, "%d", m_trgNegative[b]);
|
||||
mxml_write_element(xml, "TrgNegative", str);
|
||||
sprintf(str, "%d", m_trgSource[b]);
|
||||
mxml_write_element(xml, "TrgSource", str);
|
||||
sprintf(str, "%d", m_trgDelay[b]);
|
||||
mxml_write_element(xml, "TrgDelay", str);
|
||||
sprintf(str, "%d", m_trgConfig[b]);
|
||||
@@ -676,8 +671,6 @@ void DOFrame::LoadConfig(char *error, int size)
|
||||
if (node) m_trgMode[idx] = atoi(mxml_get_value(node));
|
||||
node = mxml_find_node(b, "TrgNegative");
|
||||
if (node) m_trgNegative[idx] = atoi(mxml_get_value(node)) == 1;
|
||||
node = mxml_find_node(b, "TrgSource");
|
||||
if (node) m_trgSource[idx] = atoi(mxml_get_value(node));
|
||||
node = mxml_find_node(b, "TrgDelay");
|
||||
if (node) m_trgDelay[idx] = atoi(mxml_get_value(node));
|
||||
node = mxml_find_node(b, "TrgConfig");
|
||||
@@ -864,7 +857,9 @@ void DOFrame::OnTrgLevelChange(wxScrollEvent& event)
|
||||
double f = (-m_slTrgLevel->GetValue()) / 1000.0; // -0.5 ... 0.5
|
||||
|
||||
/* convert to voltage according to screen settings */
|
||||
int chn = m_trgSource[m_board];
|
||||
int chn = GetTriggerChannel(m_board);
|
||||
if (chn > 3)
|
||||
chn = 0;
|
||||
m_trgLevel[m_board][0] = m_screen->GetScale(m_board, chn)*10*f/1000 + m_screen->GetOffset(m_board, chn);
|
||||
m_trgLevel[m_board][1] = m_trgLevel[m_board][0];
|
||||
m_trgLevel[m_board][2] = m_trgLevel[m_board][0];
|
||||
@@ -968,14 +963,12 @@ void DOFrame::OnTrgButton(wxCommandEvent& event)
|
||||
else
|
||||
m_bpPolarity->SetBitmapLabel(wxBitmap(pos_xpm));
|
||||
} else if (event.GetId() == ID_TR_SOURCE) {
|
||||
m_trgSource[m_board] = m_rbSource->GetSelection();
|
||||
m_trgConfig[m_board] = (1<<m_rbSource->GetSelection());
|
||||
m_triggerDialog->SelectBoard(m_board);
|
||||
}
|
||||
|
||||
m_osci->SetTriggerMode(m_trgMode[m_board]);
|
||||
if (m_trgConfig[m_board])
|
||||
m_osci->SetTriggerConfig(m_trgConfig[m_board]);
|
||||
else
|
||||
m_osci->SetTriggerSource(m_trgSource[m_board]);
|
||||
m_osci->SetTriggerConfig(m_trgConfig[m_board]);
|
||||
m_osci->SetTriggerPolarity(m_trgNegative[m_board]);
|
||||
m_osci->SetTriggerDelay(m_trgDelay[m_board]);
|
||||
m_lastTriggerUpdate = time(NULL);
|
||||
@@ -984,15 +977,38 @@ void DOFrame::OnTrgButton(wxCommandEvent& event)
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
void DOFrame::SetTriggerSource(int b, int source)
|
||||
void DOFrame::SetTriggerConfig(int b, int config)
|
||||
{
|
||||
m_trgSource[b] = source;
|
||||
m_trgConfig[b] = config;
|
||||
m_rbSource->SetSelection(GetTriggerChannel(b));
|
||||
m_osci->SelectBoard(b);
|
||||
m_osci->SetTriggerSource(source);
|
||||
m_osci->SetTriggerConfig(config);
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
int DOFrame::GetTriggerChannel(int b)
|
||||
{
|
||||
int chn = -1;
|
||||
int cfg = m_trgConfig[b];
|
||||
|
||||
for (int i=0 ; i<5 ; i++)
|
||||
if (cfg & (1<<i)) {
|
||||
if (chn != -1)
|
||||
return 5; // return 5 if several channels set (display "X" in tigger channel)
|
||||
chn = i;
|
||||
cfg &= ~ (1<<i);
|
||||
}
|
||||
|
||||
if (chn == -1)
|
||||
return 5; // return 5 if no trigger selected
|
||||
|
||||
return chn;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
|
||||
void DOFrame::SetTriggerPolarity(int b, bool negative)
|
||||
{
|
||||
m_trgNegative[b] = negative;
|
||||
@@ -1676,7 +1692,7 @@ void DOFrame::EnableTriggerConfig(bool flag)
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
void DOFrame::SetTriggerConfig(int id, bool flag)
|
||||
void DOFrame::OnSetTriggerConfig(int id, bool flag)
|
||||
{
|
||||
int chn;
|
||||
|
||||
@@ -1729,29 +1745,14 @@ void DOFrame::SetTriggerConfig(int id, bool flag)
|
||||
}
|
||||
|
||||
if ((m_trgConfig[m_board] & 0x7FFF) > 0) {
|
||||
m_rbSource->Enable(false);
|
||||
m_rbSource->SetSelection(GetTriggerChannel(m_board));
|
||||
if (m_multiBoard) {
|
||||
int b = m_board;
|
||||
for (int i=0 ; i<m_osci->GetNumberOfBoards() ; i++) {
|
||||
m_board = i;
|
||||
m_osci->SetTriggerConfig(m_trgConfig[i]);
|
||||
m_osci->GetBoard(i)->SetTriggerConfig(m_trgConfig[i]);
|
||||
}
|
||||
m_board = b;
|
||||
} else {
|
||||
m_osci->SetTriggerConfig(m_trgConfig[m_board]);
|
||||
}
|
||||
} else {
|
||||
m_rbSource->Enable(true);
|
||||
if (m_multiBoard) {
|
||||
int b = m_board;
|
||||
for (int i=0 ; i<m_osci->GetNumberOfBoards() ; i++) {
|
||||
m_board = i;
|
||||
m_osci->SetTriggerSource(m_trgSource[i]);
|
||||
}
|
||||
m_board = b;
|
||||
} else {
|
||||
m_osci->SetTriggerSource(m_trgSource[m_board]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -51,10 +51,11 @@ public:
|
||||
double GetTrgLevel(int i) { return m_trgLevel[m_board][i]; }
|
||||
bool IsTrgConfigEnabled() { return m_trgConfigEnabled[m_board]; }
|
||||
int GetTrgMode() { return m_trgMode[m_board]; }
|
||||
int GetTrgSource(int b) { return m_trgSource[b]; }
|
||||
int GetTrgPolarity() { return m_trgNegative[m_board]; }
|
||||
double GetTrgDelay() { return m_trgDelayNs[m_board]; }
|
||||
int GetTriggerConfig() { return m_trgConfig[m_board]; }
|
||||
int GetTriggerConfig(int b) { return m_trgConfig[b]; }
|
||||
int GetTriggerChannel(int b);
|
||||
double GetTrgPosition(int board);
|
||||
time_t GetLastTriggerUpdate() { return m_lastTriggerUpdate; }
|
||||
bool IsIdle();
|
||||
@@ -91,8 +92,8 @@ public:
|
||||
void ToggleControls();
|
||||
void SetMeasurement(int id, bool flag);
|
||||
void SetMathDisplay(int id, bool flag);
|
||||
void SetTriggerConfig(int id, bool flag);
|
||||
void SetTriggerSource(int b, int source);
|
||||
void OnSetTriggerConfig(int id, bool flag);
|
||||
void SetTriggerConfig(int id, int config);
|
||||
void SetTriggerPolarity(int b, bool negative);
|
||||
bool IsTranspTrigger() { return m_transpTrigger; }
|
||||
void SetStat(bool flag);
|
||||
@@ -179,7 +180,6 @@ private:
|
||||
double m_trgLevel[MAX_N_BOARDS][4];
|
||||
int m_trgMode[MAX_N_BOARDS];
|
||||
bool m_trgNegative[MAX_N_BOARDS];
|
||||
int m_trgSource[MAX_N_BOARDS];
|
||||
int m_trgDelay[MAX_N_BOARDS];
|
||||
double m_trgDelayNs[MAX_N_BOARDS];
|
||||
int m_trgConfig[MAX_N_BOARDS];
|
||||
@@ -198,8 +198,8 @@ private:
|
||||
bool m_spikeRemoval;
|
||||
bool m_displayScalers;
|
||||
|
||||
wxColour m_color[5];
|
||||
wxColour m_pcolor[5];
|
||||
wxColour m_color[6];
|
||||
wxColour m_pcolor[6];
|
||||
|
||||
int m_acquisitions;
|
||||
wxStopWatch m_stopWatch;
|
||||
|
||||
@@ -309,13 +309,13 @@ void DOScreen::DrawScopeBottom(wxDC& dc, int board, int x1, int y1, int width, b
|
||||
dc.DrawRoundedRectangle(x_start-20-w-20, y1+3, w+10+20, 15, 2);
|
||||
dc.DrawText(wxst, x_start-15-w, y1+3);
|
||||
} else {
|
||||
if (m_frame->GetTrgSource(board) == 4)
|
||||
if (m_frame->GetTriggerChannel(board) == 4)
|
||||
wxst.Printf(wxT("EXT %1.0lf ns"), m_frame->GetTrgDelay());
|
||||
else
|
||||
wxst.Printf(wxT("%1.3lf V %1.0lf ns"), m_frame->GetTrgLevel(m_frame->GetTrgSource(board)), m_frame->GetTrgDelay());
|
||||
wxst.Printf(wxT("%1.3lf V %1.0lf ns"), m_frame->GetTrgLevel(m_frame->GetTriggerChannel(board)), m_frame->GetTrgDelay());
|
||||
dc.GetTextExtent(wxst, &w, &h);
|
||||
dc.SetPen(wxPen(*wxLIGHT_GREY, 1, wxSOLID));
|
||||
dc.SetBrush(m_frame->GetColor(m_frame->GetTrgSource(board), printing));
|
||||
dc.SetBrush(m_frame->GetColor(m_frame->GetTriggerChannel(board), printing));
|
||||
dc.DrawRoundedRectangle(x_start-20-w-20, y1+3, w+10+20, 15, 2);
|
||||
dc.DrawText(wxst, x_start-15-w, y1+3);
|
||||
}
|
||||
@@ -486,30 +486,21 @@ void DOScreen::DrawWaveforms(wxDC& dc, int wfIndex, bool printing)
|
||||
|
||||
// draw trigger level
|
||||
for (int channel=0 ; channel<4 ; channel++) {
|
||||
if (!m_frame->GetTriggerConfig() && m_frame->GetTrgSource(m_board) < 4 && channel != m_frame->GetTrgSource(m_board))
|
||||
continue;
|
||||
if (!m_frame->GetTriggerConfig() && m_frame->GetTrgSource(m_board) == 4)
|
||||
continue;
|
||||
|
||||
double v = (m_frame->GetTrgLevel(channel) - m_offset[m_board][channel])*1000;
|
||||
y = (int) ((m_y1[m_board]+m_y2[m_board])/2-(v/10.0/m_scaleTable[m_scale[m_board][channel]]*(m_y2[m_board]-m_y1[m_board]) + 0.5));
|
||||
|
||||
p[0] = wxPoint(-8, 0);
|
||||
p[1] = wxPoint( 0, -5);
|
||||
p[2] = wxPoint( 0, 5);
|
||||
if (m_frame->GetTriggerConfig() &&
|
||||
(m_frame->GetTrgLevel(channel) == m_frame->GetTrgLevel((channel+1) % 4) ||
|
||||
m_frame->GetTrgLevel(channel) == m_frame->GetTrgLevel((channel+2) % 4) ||
|
||||
m_frame->GetTrgLevel(channel) == m_frame->GetTrgLevel((channel+3) % 4))) {
|
||||
dc.SetBrush(m_frame->GetColor(4, printing)); // gray if two levels overlap
|
||||
dc.SetPen(m_frame->GetColor(4, printing));
|
||||
} else {
|
||||
dc.SetBrush(m_frame->GetColor(channel, printing));
|
||||
dc.SetPen(m_frame->GetColor(channel, printing));
|
||||
}
|
||||
dc.DrawPolygon(3, p, m_x2[m_board]-2, y);
|
||||
if (time(NULL) - m_frame->GetLastTriggerUpdate() < 2 && !m_frame->IsFirst()) {
|
||||
dc.DrawLine(m_x1[m_board], y, m_x2[m_board]-2, y);
|
||||
if ((m_frame->GetTriggerConfig() & (1 << channel)) ||
|
||||
(m_frame->GetTriggerConfig() & (1 << (channel+8)))) {
|
||||
|
||||
double v = (m_frame->GetTrgLevel(channel) - m_offset[m_board][channel])*1000;
|
||||
y = (int) ((m_y1[m_board]+m_y2[m_board])/2-(v/10.0/m_scaleTable[m_scale[m_board][channel]]*(m_y2[m_board]-m_y1[m_board]) + 0.5));
|
||||
|
||||
p[0] = wxPoint(-8, 0);
|
||||
p[1] = wxPoint( 0, -5);
|
||||
p[2] = wxPoint( 0, 5);
|
||||
dc.SetBrush(m_frame->GetColor(channel, printing));
|
||||
dc.SetPen(m_frame->GetColor(channel, printing));
|
||||
dc.DrawPolygon(3, p, m_x2[m_board]-2, y);
|
||||
if (time(NULL) - m_frame->GetLastTriggerUpdate() < 2 && !m_frame->IsFirst()) {
|
||||
dc.DrawLine(m_x1[m_board], y, m_x2[m_board]-2, y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -520,14 +511,14 @@ void DOScreen::DrawWaveforms(wxDC& dc, int wfIndex, bool printing)
|
||||
p[3] = wxPoint( 0, 11);
|
||||
p[4] = wxPoint( -1, 11);
|
||||
p[5] = wxPoint(-5, 7);
|
||||
dc.SetBrush(m_frame->GetColor(m_frame->GetTrgSource(m_board), printing));
|
||||
dc.SetPen(m_frame->GetColor(m_frame->GetTrgSource(m_board), printing));
|
||||
dc.SetBrush(m_frame->GetColor(m_frame->GetTriggerChannel(m_board), printing));
|
||||
dc.SetPen(m_frame->GetColor(m_frame->GetTriggerChannel(m_board), printing));
|
||||
dc.DrawPolygon(6, p, (wxCoord)((m_frame->GetTrgPosition(m_board)-GetScreenOffset(m_board)) / GetScreenSize(m_board) * (m_x2[m_board]-m_x1[m_board]) + m_x1[m_board]),
|
||||
(wxCoord)m_y1[m_board]);
|
||||
|
||||
wxst = wxT("T");
|
||||
dc.SetPen(wxPen(*wxLIGHT_GREY, 1, wxSOLID));
|
||||
dc.SetBrush(m_frame->GetColor(m_frame->GetTrgSource(m_board), printing));
|
||||
dc.SetBrush(m_frame->GetColor(m_frame->GetTriggerChannel(m_board), printing));
|
||||
dc.SetTextForeground(*wxBLACK);
|
||||
dc.GetTextExtent(wxst, &w, &h);
|
||||
dc.DrawText(wxst, (wxCoord)((m_frame->GetTrgPosition(m_board)-GetScreenOffset(m_board)) / GetScreenSize(m_board) * (m_x2[m_board]-m_x1[m_board]) + m_x1[m_board] - w/2 - 1),
|
||||
|
||||
+1
-2072
File diff suppressed because it is too large.
Load diff
+1
-604
@@ -1,604 +1 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Nov 27 2012)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __DRSOSC_H__
|
||||
#define __DRSOSC_H__
|
||||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/icon.h>
|
||||
#include <wx/menu.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/slider.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/radiobut.h>
|
||||
#include <wx/bmpbuttn.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/radiobox.h>
|
||||
#include <wx/tglbtn.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/frame.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/gauge.h>
|
||||
#include <wx/dialog.h>
|
||||
#include <wx/combobox.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/statbmp.h>
|
||||
#include <wx/hyperlink.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define ID_CURSORA 1000
|
||||
#define ID_CURSORB 1001
|
||||
#define ID_TR_LEVEL 1002
|
||||
#define ID_RUN 1003
|
||||
#define ID_SINGLE 1004
|
||||
#define ID_TR_NORMAL 1005
|
||||
#define ID_TR_AUTO 1006
|
||||
#define ID_TR_POLARITY 1007
|
||||
#define ID_TRGCFG 1008
|
||||
#define ID_TR_DELAY 1009
|
||||
#define ID_TR_SOURCE 1010
|
||||
#define ID_HSCALEDOWN 1011
|
||||
#define ID_HSCALEUP 1012
|
||||
#define ID_HOR_POS 1013
|
||||
#define ID_CHON1 1014
|
||||
#define ID_POS1 1015
|
||||
#define ID_SCALEUP1 1016
|
||||
#define ID_SCALEDN1 1017
|
||||
#define ID_CHON2 1018
|
||||
#define ID_POS2 1019
|
||||
#define ID_SCALEUP2 1020
|
||||
#define ID_SCALEDN2 1021
|
||||
#define ID_CHON3 1022
|
||||
#define ID_POS3 1023
|
||||
#define ID_SCALEUP3 1024
|
||||
#define ID_SCALEDN3 1025
|
||||
#define ID_CHON4 1026
|
||||
#define ID_POS4 1027
|
||||
#define ID_SCALEUP4 1028
|
||||
#define ID_SCALEDN4 1029
|
||||
#define ID_CONFIG 1030
|
||||
#define ID_SAVE 1031
|
||||
#define ID_MEASURE 1032
|
||||
#define ID_PRINT 1033
|
||||
#define ID_ABOUT 1034
|
||||
#define ID_EXIT 1035
|
||||
#define ID_BSEL 1036
|
||||
#define ID_MULTI 1037
|
||||
#define ID_CH_HALF 1038
|
||||
#define ID_DISP_CALIBRATED 1039
|
||||
#define ID_DISP_CALIBRATED2 1040
|
||||
#define ID_DISP_ROTATED 1041
|
||||
#define ID_DISP_TCALIBRATED 1042
|
||||
#define ID_DISP_TRGCORR 1043
|
||||
#define ID_REFCLK 1044
|
||||
#define ID_DISPSAMPLE 1045
|
||||
#define ID_DISPAVERAGE 1046
|
||||
#define ID_DISPPERSIST 1047
|
||||
#define ID_DISPNUMBER 1048
|
||||
#define ID_PJ1 1049
|
||||
#define ID_PJ2 1050
|
||||
#define ID_PJ3 1051
|
||||
#define ID_PJ4 1052
|
||||
#define ID_LEVEL1 1053
|
||||
#define ID_LEVEL2 1054
|
||||
#define ID_LEVEL3 1055
|
||||
#define ID_LEVEL4 1056
|
||||
#define ID_PKPK1 1057
|
||||
#define ID_PKPK2 1058
|
||||
#define ID_PKPK3 1059
|
||||
#define ID_PKPK4 1060
|
||||
#define ID_RMS1 1061
|
||||
#define ID_RMS2 1062
|
||||
#define ID_RMS3 1063
|
||||
#define ID_RMS4 1064
|
||||
#define ID_VS1 1065
|
||||
#define ID_VS2 1066
|
||||
#define ID_VS3 1067
|
||||
#define ID_VS4 1068
|
||||
#define ID_CHRG1 1069
|
||||
#define ID_CHRG2 1070
|
||||
#define ID_CHRG3 1071
|
||||
#define ID_CHRG4 1072
|
||||
#define ID_FREQ1 1073
|
||||
#define ID_FREQ2 1074
|
||||
#define ID_FREQ3 1075
|
||||
#define ID_FREQ4 1076
|
||||
#define ID_PERIOD1 1077
|
||||
#define ID_PERIOD2 1078
|
||||
#define ID_PERIOD3 1079
|
||||
#define ID_PERIOD4 1080
|
||||
#define ID_RISE1 1081
|
||||
#define ID_RISE2 1082
|
||||
#define ID_RISE3 1083
|
||||
#define ID_RISE4 1084
|
||||
#define ID_FALL1 1085
|
||||
#define ID_FALL2 1086
|
||||
#define ID_FALL3 1087
|
||||
#define ID_FALL4 1088
|
||||
#define ID_POSWIDTH1 1089
|
||||
#define ID_POSWIDTH2 1090
|
||||
#define ID_POSWIDTH3 1091
|
||||
#define ID_POSWIDTH4 1092
|
||||
#define ID_NEGWIDTH1 1093
|
||||
#define ID_NEGWIDTH2 1094
|
||||
#define ID_NEGWIDTH3 1095
|
||||
#define ID_NEGWIDTH4 1096
|
||||
#define ID_CHNDELAY1 1097
|
||||
#define ID_CHNDELAY2 1098
|
||||
#define ID_CHNDELAY3 1099
|
||||
#define ID_CHNDELAY4 1100
|
||||
#define ID_HS1 1101
|
||||
#define ID_HS2 1102
|
||||
#define ID_HS3 1103
|
||||
#define ID_HS4 1104
|
||||
#define ID_OR1 1105
|
||||
#define ID_OR2 1106
|
||||
#define ID_OR3 1107
|
||||
#define ID_OR4 1108
|
||||
#define ID_OREXT 1109
|
||||
#define ID_AND1 1110
|
||||
#define ID_AND2 1111
|
||||
#define ID_AND3 1112
|
||||
#define ID_AND4 1113
|
||||
#define ID_ANDEXT 1114
|
||||
#define ID_TRANS 1115
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class DOFrame_fb
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class DOFrame_fb : public wxFrame
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxMenuBar* m_menubar1;
|
||||
wxMenu* m_menu1;
|
||||
wxMenu* m_menu4;
|
||||
wxMenu* m_menu3;
|
||||
wxMenu* m_menu2;
|
||||
wxPanel* m_pnScreen;
|
||||
wxPanel* m_pnControls;
|
||||
wxSlider* m_slTrgLevel;
|
||||
wxButton* m_btRun;
|
||||
wxButton* m_btSingle;
|
||||
wxRadioButton* m_rbNormal;
|
||||
wxRadioButton* m_rbAuto;
|
||||
wxBitmapButton* m_bpPolarity;
|
||||
wxButton* m_btTrgCfg;
|
||||
wxStaticText* m_staticText59;
|
||||
wxStaticText* m_staticText60;
|
||||
wxStaticText* m_staticText61;
|
||||
wxSlider* m_slTrgDelay;
|
||||
wxRadioBox* m_rbSource;
|
||||
wxBitmapButton* m_bpButton2;
|
||||
wxStaticText* m_stHScale;
|
||||
wxBitmapButton* m_bpButton3;
|
||||
wxSlider* m_slHOffset;
|
||||
wxToggleButton* m_btCh1;
|
||||
wxSlider* m_slPos1;
|
||||
wxBitmapButton* m_bpButton4;
|
||||
wxStaticText* m_stScale1;
|
||||
wxBitmapButton* m_bpButton5;
|
||||
wxToggleButton* m_btCh2;
|
||||
wxSlider* m_slPos2;
|
||||
wxBitmapButton* m_bpButton6;
|
||||
wxStaticText* m_stScale2;
|
||||
wxBitmapButton* m_bpButton7;
|
||||
wxToggleButton* m_btCh3;
|
||||
wxSlider* m_slPos3;
|
||||
wxBitmapButton* m_bpButton8;
|
||||
wxStaticText* m_stScale3;
|
||||
wxBitmapButton* m_bpButton9;
|
||||
wxToggleButton* m_btCh4;
|
||||
wxSlider* m_slPos4;
|
||||
wxBitmapButton* m_bpButton10;
|
||||
wxStaticText* m_stScale4;
|
||||
wxBitmapButton* m_bpButton11;
|
||||
wxStaticText* m_staticText76;
|
||||
wxToggleButton* m_toggleCursorA;
|
||||
wxToggleButton* m_toggleCursorB;
|
||||
wxCheckBox* m_checkBox8;
|
||||
wxButton* m_btConfig;
|
||||
wxButton* m_btSave;
|
||||
wxButton* m_btMeasure;
|
||||
wxButton* m_btDisplay;
|
||||
wxButton* m_btPrint;
|
||||
wxButton* m_btAbout;
|
||||
wxButton* m_btExit;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnSave( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnPrint( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnExit( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnCursor( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnSnap( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnConfig( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnMeasure( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnDisplay( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnAbout( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnTrgLevelChange( wxScrollEvent& event ) { event.Skip(); }
|
||||
virtual void OnZero( wxMouseEvent& event ) { event.Skip(); }
|
||||
virtual void OnTrigger( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnTrgButton( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnTrgDelayChange( wxScrollEvent& event ) { event.Skip(); }
|
||||
virtual void OnHScaleChange( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnHOffsetChange( wxScrollEvent& event ) { event.Skip(); }
|
||||
virtual void OnChnOn( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnPosChange( wxScrollEvent& event ) { event.Skip(); }
|
||||
virtual void OnScaleChange( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
|
||||
DOFrame_fb( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("DRS Oscilloscope"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 1024,768 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
|
||||
|
||||
~DOFrame_fb();
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class ConfigDialog_fb
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class ConfigDialog_fb : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxChoice* m_cbBoard;
|
||||
wxButton* m_btScan;
|
||||
wxButton* m_btInfo;
|
||||
wxCheckBox* m_cbMulti;
|
||||
wxRadioBox* m_rbChHalf;
|
||||
wxCheckBox* m_cbClkOn;
|
||||
wxRadioBox* m_rbRange;
|
||||
wxTextCtrl* m_tbFreq;
|
||||
wxStaticText* m_staticText26;
|
||||
wxCheckBox* m_cbLocked;
|
||||
wxStaticText* m_staticText261;
|
||||
wxStaticText* m_stActFreq;
|
||||
wxCheckBox* m_cbCalOn;
|
||||
wxTextCtrl* m_teCal;
|
||||
wxSlider* m_slCal;
|
||||
wxStaticText* m_staticText10;
|
||||
wxCheckBox* m_cbCalibrated;
|
||||
wxCheckBox* m_cbCalibrated2;
|
||||
wxCheckBox* m_cbSpikes;
|
||||
wxButton* m_button13;
|
||||
wxGauge* m_gaugeCalVolt;
|
||||
wxCheckBox* m_cbRotated;
|
||||
wxCheckBox* m_cbTCalOn;
|
||||
wxCheckBox* m_cbTrgCorr;
|
||||
wxCheckBox* m_cbExtRefclk;
|
||||
wxButton* m_button14;
|
||||
wxGauge* m_gaugeCalTime;
|
||||
wxButton* m_button10;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnBoardSelect( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnRescan( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnInfo( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnChannelHalf( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnClkOn( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnInputRange( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnFreq( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnLock( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnCalOn( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnCalEnter( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnCalSlider( wxScrollEvent& event ) { event.Skip(); }
|
||||
virtual void OnDisplayWaveforms( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnRemoveSpikes( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnButtonCalVolt( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnButtonCalTime( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnClose( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
|
||||
ConfigDialog_fb( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Configuration"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE );
|
||||
~ConfigDialog_fb();
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class DisplayDialog_fb
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class DisplayDialog_fb : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxCheckBox* m_checkBox7;
|
||||
wxCheckBox* m_checkBox71;
|
||||
wxCheckBox* m_checkBox88;
|
||||
wxCheckBox* m_checkBox73;
|
||||
wxRadioButton* m_rbShowSample;
|
||||
wxRadioButton* m_rbShowAverage;
|
||||
wxRadioButton* m_rbShowPersist;
|
||||
wxStaticText* m_staticText59;
|
||||
wxComboBox* m_cbNumber;
|
||||
wxStaticText* m_staticText11;
|
||||
wxStaticText* m_staticText12;
|
||||
wxStaticText* m_staticText13;
|
||||
wxStaticText* m_staticText14;
|
||||
wxStaticText* m_staticText15;
|
||||
wxStaticText* m_staticText17;
|
||||
wxCheckBox* m_checkBox13;
|
||||
wxCheckBox* m_checkBox14;
|
||||
wxCheckBox* m_checkBox15;
|
||||
wxCheckBox* m_checkBox16;
|
||||
wxButton* m_button10;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnDateTime( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnShowGrid( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnLines( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnScalers( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnDisplayMode( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnButton( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnClose( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
|
||||
DisplayDialog_fb( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Display"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE );
|
||||
~DisplayDialog_fb();
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class MeasureDialog_fb
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class MeasureDialog_fb : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxStaticText* m_staticText11;
|
||||
wxStaticText* m_staticText12;
|
||||
wxStaticText* m_staticText13;
|
||||
wxStaticText* m_staticText14;
|
||||
wxStaticText* m_staticText15;
|
||||
wxStaticText* m_staticText80;
|
||||
wxStaticText* m_staticText81;
|
||||
wxStaticText* m_staticText82;
|
||||
wxStaticText* m_staticText83;
|
||||
wxStaticText* m_staticText84;
|
||||
wxStaticText* m_staticText16;
|
||||
wxCheckBox* m_checkBox9;
|
||||
wxCheckBox* m_checkBox10;
|
||||
wxCheckBox* m_checkBox11;
|
||||
wxCheckBox* m_checkBox12;
|
||||
wxStaticText* m_staticText17;
|
||||
wxCheckBox* m_checkBox13;
|
||||
wxCheckBox* m_checkBox14;
|
||||
wxCheckBox* m_checkBox15;
|
||||
wxCheckBox* m_checkBox16;
|
||||
wxStaticText* m_staticText19;
|
||||
wxCheckBox* m_checkBox17;
|
||||
wxCheckBox* m_checkBox18;
|
||||
wxCheckBox* m_checkBox19;
|
||||
wxCheckBox* m_checkBox20;
|
||||
wxStaticText* m_staticText90;
|
||||
wxCheckBox* m_checkBox74;
|
||||
wxCheckBox* m_checkBox75;
|
||||
wxCheckBox* m_checkBox76;
|
||||
wxCheckBox* m_checkBox77;
|
||||
wxStaticText* m_staticText91;
|
||||
wxCheckBox* m_checkBox82;
|
||||
wxCheckBox* m_checkBox83;
|
||||
wxCheckBox* m_checkBox84;
|
||||
wxCheckBox* m_checkBox85;
|
||||
wxStaticLine* m_staticline4;
|
||||
wxStaticLine* m_staticline41;
|
||||
wxStaticLine* m_staticline42;
|
||||
wxStaticLine* m_staticline43;
|
||||
wxStaticLine* m_staticline44;
|
||||
wxStaticText* m_staticText85;
|
||||
wxStaticText* m_staticText86;
|
||||
wxStaticText* m_staticText87;
|
||||
wxStaticText* m_staticText88;
|
||||
wxStaticText* m_staticText89;
|
||||
wxStaticText* m_staticText20;
|
||||
wxCheckBox* m_checkBox21;
|
||||
wxCheckBox* m_checkBox22;
|
||||
wxCheckBox* m_checkBox23;
|
||||
wxCheckBox* m_checkBox24;
|
||||
wxStaticText* m_staticText21;
|
||||
wxCheckBox* m_checkBox25;
|
||||
wxCheckBox* m_checkBox26;
|
||||
wxCheckBox* m_checkBox27;
|
||||
wxCheckBox* m_checkBox28;
|
||||
wxStaticText* m_staticText22;
|
||||
wxCheckBox* m_checkBox29;
|
||||
wxCheckBox* m_checkBox30;
|
||||
wxCheckBox* m_checkBox31;
|
||||
wxCheckBox* m_checkBox32;
|
||||
wxStaticText* m_staticText23;
|
||||
wxCheckBox* m_checkBox33;
|
||||
wxCheckBox* m_checkBox34;
|
||||
wxCheckBox* m_checkBox35;
|
||||
wxCheckBox* m_checkBox36;
|
||||
wxStaticText* m_staticText221;
|
||||
wxCheckBox* m_checkBox291;
|
||||
wxCheckBox* m_checkBox2911;
|
||||
wxCheckBox* m_checkBox2912;
|
||||
wxCheckBox* m_checkBox2913;
|
||||
wxStaticText* m_staticText2211;
|
||||
wxCheckBox* m_checkBox2914;
|
||||
wxCheckBox* m_checkBox2915;
|
||||
wxCheckBox* m_checkBox2916;
|
||||
wxCheckBox* m_checkBox2917;
|
||||
wxStaticText* m_staticText231;
|
||||
wxCheckBox* m_checkBox37;
|
||||
wxCheckBox* m_checkBox38;
|
||||
wxCheckBox* m_checkBox39;
|
||||
wxCheckBox* m_checkBox40;
|
||||
wxStaticText* m_staticText901;
|
||||
wxCheckBox* m_checkBox78;
|
||||
wxCheckBox* m_checkBox79;
|
||||
wxCheckBox* m_checkBox80;
|
||||
wxCheckBox* m_checkBox81;
|
||||
wxStaticLine* m_staticline1;
|
||||
wxCheckBox* m_cbStat;
|
||||
wxCheckBox* m_cbHist;
|
||||
wxStaticText* m_staticText27;
|
||||
wxComboBox* m_cbNAverage;
|
||||
wxStaticText* m_staticText271;
|
||||
wxButton* m_button15;
|
||||
wxStaticLine* m_staticline2;
|
||||
wxCheckBox* m_cbIndicator;
|
||||
wxStaticLine* m_staticline21;
|
||||
wxButton* m_button11;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnButton( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnStat( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnHist( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnStatNAverage( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnStatReset( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnIndicator( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnClose( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
|
||||
MeasureDialog_fb( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Select Measurements"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE );
|
||||
~MeasureDialog_fb();
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class TriggerDialog_fb
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class TriggerDialog_fb : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxStaticText* m_staticText12;
|
||||
wxStaticText* m_staticText13;
|
||||
wxStaticText* m_staticText14;
|
||||
wxStaticText* m_staticText15;
|
||||
wxStaticText* m_staticText16;
|
||||
wxStaticLine* m_staticline11;
|
||||
wxStaticText* m_staticText771;
|
||||
wxCheckBox* m_cbOR1;
|
||||
wxStaticText* m_staticText17;
|
||||
wxCheckBox* m_cbOR2;
|
||||
wxStaticText* m_staticText171;
|
||||
wxCheckBox* m_cbOR3;
|
||||
wxStaticText* m_staticText172;
|
||||
wxCheckBox* m_cbOR4;
|
||||
wxStaticText* m_staticText173;
|
||||
wxCheckBox* m_cbOREXT;
|
||||
wxStaticText* m_staticText84;
|
||||
wxCheckBox* m_cbAND1;
|
||||
wxStaticText* m_staticText18;
|
||||
wxCheckBox* m_cbAND2;
|
||||
wxStaticText* m_staticText181;
|
||||
wxCheckBox* m_cbAND3;
|
||||
wxStaticText* m_staticText182;
|
||||
wxCheckBox* m_cbAND4;
|
||||
wxStaticText* m_staticText183;
|
||||
wxCheckBox* m_cbANDEXT;
|
||||
wxCheckBox* m_cbTrans;
|
||||
wxStaticLine* m_staticline10;
|
||||
wxStaticText* m_staticText77;
|
||||
wxTextCtrl* m_tbLevel1;
|
||||
wxTextCtrl* m_tbLevel2;
|
||||
wxTextCtrl* m_tbLevel3;
|
||||
wxTextCtrl* m_tbLevel4;
|
||||
wxStaticText* m_staticText78;
|
||||
wxStaticLine* m_staticline25;
|
||||
wxButton* m_button11;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnButton( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnTriggerLevel( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnClose( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
|
||||
TriggerDialog_fb( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Configure Trigger"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
|
||||
~TriggerDialog_fb();
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class AboutDialog_fb
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class AboutDialog_fb : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxStaticText* m_staticText18;
|
||||
wxStaticText* m_stVersion;
|
||||
wxStaticText* m_stBuild;
|
||||
wxStaticText* m_staticText20;
|
||||
wxStaticText* m_staticText21;
|
||||
wxStaticBitmap* m_bitmap1;
|
||||
wxStaticText* m_staticText23;
|
||||
wxHyperlinkCtrl* m_hyperlink1;
|
||||
wxButton* m_button12;
|
||||
|
||||
public:
|
||||
|
||||
AboutDialog_fb( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("About"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE );
|
||||
~AboutDialog_fb();
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class InfoDialog_fb
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class InfoDialog_fb : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxStaticText* m_staticText45;
|
||||
wxStaticText* m_stBoardType;
|
||||
wxStaticText* m_staticText47;
|
||||
wxStaticText* m_stDRSType;
|
||||
wxStaticText* m_staticText49;
|
||||
wxStaticText* m_stSerialNumber;
|
||||
wxStaticText* m_staticText51;
|
||||
wxStaticText* m_stFirmwareRevision;
|
||||
wxStaticText* m_staticText53;
|
||||
wxStaticText* m_stTemperature;
|
||||
wxStaticText* m_staticText55;
|
||||
wxStaticText* m_stInputRange;
|
||||
wxStaticText* m_staticText57;
|
||||
wxStaticText* m_stCalibratedRange;
|
||||
wxStaticText* m_staticText59;
|
||||
wxStaticText* m_stCalibratedFrequency;
|
||||
wxStaticText* m_staticText61;
|
||||
wxStaticText* m_stFrequency;
|
||||
wxButton* m_button12;
|
||||
|
||||
public:
|
||||
|
||||
InfoDialog_fb( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Info"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE );
|
||||
~InfoDialog_fb();
|
||||
|
||||
};
|
||||
|
||||
#endif //__DRSOSC_H__
|
||||
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 27 2012)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __DRSOSC_H__
#define __DRSOSC_H__
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/string.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/menu.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/panel.h>
#include <wx/slider.h>
#include <wx/button.h>
#include <wx/sizer.h>
#include <wx/radiobut.h>
#include <wx/bmpbuttn.h>
#include <wx/statbox.h>
#include <wx/stattext.h>
#include <wx/radiobox.h>
#include <wx/tglbtn.h>
#include <wx/checkbox.h>
#include <wx/frame.h>
#include <wx/choice.h>
#include <wx/textctrl.h>
#include <wx/gauge.h>
#include <wx/dialog.h>
#include <wx/combobox.h>
#include <wx/statline.h>
#include <wx/statbmp.h>
#include <wx/hyperlink.h>
///////////////////////////////////////////////////////////////////////////
#define ID_CURSORA 1000
#define ID_CURSORB 1001
#define ID_TR_LEVEL 1002
#define ID_RUN 1003
#define ID_SINGLE 1004
#define ID_TR_NORMAL 1005
#define ID_TR_AUTO 1006
#define ID_TR_POLARITY 1007
#define ID_TRGCFG 1008
#define ID_TR_DELAY 1009
#define ID_TR_SOURCE 1010
#define ID_HSCALEDOWN 1011
#define ID_HSCALEUP 1012
#define ID_HOR_POS 1013
#define ID_CHON1 1014
#define ID_POS1 1015
#define ID_SCALEUP1 1016
#define ID_SCALEDN1 1017
#define ID_CHON2 1018
#define ID_POS2 1019
#define ID_SCALEUP2 1020
#define ID_SCALEDN2 1021
#define ID_CHON3 1022
#define ID_POS3 1023
#define ID_SCALEUP3 1024
#define ID_SCALEDN3 1025
#define ID_CHON4 1026
#define ID_POS4 1027
#define ID_SCALEUP4 1028
#define ID_SCALEDN4 1029
#define ID_CONFIG 1030
#define ID_SAVE 1031
#define ID_MEASURE 1032
#define ID_PRINT 1033
#define ID_ABOUT 1034
#define ID_EXIT 1035
#define ID_BSEL 1036
#define ID_MULTI 1037
#define ID_CH_HALF 1038
#define ID_DISP_CALIBRATED 1039
#define ID_DISP_CALIBRATED2 1040
#define ID_DISP_ROTATED 1041
#define ID_DISP_TCALIBRATED 1042
#define ID_DISP_TRGCORR 1043
#define ID_REFCLK 1044
#define ID_DISPSAMPLE 1045
#define ID_DISPAVERAGE 1046
#define ID_DISPPERSIST 1047
#define ID_DISPNUMBER 1048
#define ID_PJ1 1049
#define ID_PJ2 1050
#define ID_PJ3 1051
#define ID_PJ4 1052
#define ID_LEVEL1 1053
#define ID_LEVEL2 1054
#define ID_LEVEL3 1055
#define ID_LEVEL4 1056
#define ID_PKPK1 1057
#define ID_PKPK2 1058
#define ID_PKPK3 1059
#define ID_PKPK4 1060
#define ID_RMS1 1061
#define ID_RMS2 1062
#define ID_RMS3 1063
#define ID_RMS4 1064
#define ID_VS1 1065
#define ID_VS2 1066
#define ID_VS3 1067
#define ID_VS4 1068
#define ID_CHRG1 1069
#define ID_CHRG2 1070
#define ID_CHRG3 1071
#define ID_CHRG4 1072
#define ID_FREQ1 1073
#define ID_FREQ2 1074
#define ID_FREQ3 1075
#define ID_FREQ4 1076
#define ID_PERIOD1 1077
#define ID_PERIOD2 1078
#define ID_PERIOD3 1079
#define ID_PERIOD4 1080
#define ID_RISE1 1081
#define ID_RISE2 1082
#define ID_RISE3 1083
#define ID_RISE4 1084
#define ID_FALL1 1085
#define ID_FALL2 1086
#define ID_FALL3 1087
#define ID_FALL4 1088
#define ID_POSWIDTH1 1089
#define ID_POSWIDTH2 1090
#define ID_POSWIDTH3 1091
#define ID_POSWIDTH4 1092
#define ID_NEGWIDTH1 1093
#define ID_NEGWIDTH2 1094
#define ID_NEGWIDTH3 1095
#define ID_NEGWIDTH4 1096
#define ID_CHNDELAY1 1097
#define ID_CHNDELAY2 1098
#define ID_CHNDELAY3 1099
#define ID_CHNDELAY4 1100
#define ID_HS1 1101
#define ID_HS2 1102
#define ID_HS3 1103
#define ID_HS4 1104
#define ID_OR1 1105
#define ID_OR2 1106
#define ID_OR3 1107
#define ID_OR4 1108
#define ID_OREXT 1109
#define ID_AND1 1110
#define ID_AND2 1111
#define ID_AND3 1112
#define ID_AND4 1113
#define ID_ANDEXT 1114
#define ID_TRANS 1115
///////////////////////////////////////////////////////////////////////////////
/// Class DOFrame_fb
///////////////////////////////////////////////////////////////////////////////
class DOFrame_fb : public wxFrame
{
private:
protected:
wxMenuBar* m_menubar1;
wxMenu* m_menu1;
wxMenu* m_menu4;
wxMenu* m_menu3;
wxMenu* m_menu2;
wxPanel* m_pnScreen;
wxPanel* m_pnControls;
wxSlider* m_slTrgLevel;
wxButton* m_btRun;
wxButton* m_btSingle;
wxRadioButton* m_rbNormal;
wxRadioButton* m_rbAuto;
wxBitmapButton* m_bpPolarity;
wxButton* m_btTrgCfg;
wxStaticText* m_staticText59;
wxStaticText* m_staticText60;
wxStaticText* m_staticText61;
wxSlider* m_slTrgDelay;
wxRadioBox* m_rbSource;
wxBitmapButton* m_bpButton2;
wxStaticText* m_stHScale;
wxBitmapButton* m_bpButton3;
wxSlider* m_slHOffset;
wxToggleButton* m_btCh1;
wxSlider* m_slPos1;
wxBitmapButton* m_bpButton4;
wxStaticText* m_stScale1;
wxBitmapButton* m_bpButton5;
wxToggleButton* m_btCh2;
wxSlider* m_slPos2;
wxBitmapButton* m_bpButton6;
wxStaticText* m_stScale2;
wxBitmapButton* m_bpButton7;
wxToggleButton* m_btCh3;
wxSlider* m_slPoLine truncated
|
||||
+27
-42
@@ -30,13 +30,13 @@ Osci::Osci(double samplingSpeed, bool mthread)
|
||||
m_triggerCell[0] = 0;
|
||||
m_writeSR[0] = 0;
|
||||
m_waveDepth = 1024;
|
||||
m_trgMode = TM_AUTO;
|
||||
m_trgNegative = false;
|
||||
m_trgDelay = 0;
|
||||
for (int i=0 ; i<4 ; i++)
|
||||
m_trgLevel[i] = 0;
|
||||
for (int b=0 ; b<MAX_N_BOARDS ; b++) {
|
||||
m_trgSource[b] = 0;
|
||||
m_trgNegative[b] = false;
|
||||
m_trgMode[b] = TM_AUTO;
|
||||
m_trgConfig[b] = 0;
|
||||
m_refClk[b] = false;
|
||||
for (int i=0 ; i<4 ; i++)
|
||||
m_chnOn[b][i] = false;
|
||||
@@ -203,12 +203,12 @@ int Osci::ScanBoards()
|
||||
b->SetReadoutMode(1);
|
||||
b->SetDominoActive(1);
|
||||
if (b->GetBoardType() == 5 || b->GetBoardType() == 7 || b->GetBoardType() == 8 || b->GetBoardType() == 9) {
|
||||
b->SetTranspMode(1); // Evaluation board with build-in trigger
|
||||
b->EnableTrigger(0, 1); // Enable analog trigger
|
||||
b->SetTriggerSource(0); // on CH0
|
||||
b->SetTranspMode(1); // Evaluation board with build-in trigger
|
||||
b->EnableTrigger(0, 1); // Enable analog trigger
|
||||
b->SetTriggerConfig(1<<0); // on CH0
|
||||
} else if (b->GetBoardType() == 6) {
|
||||
b->SetTranspMode(0); // VPC Mezzanine board
|
||||
b->EnableTrigger(0, 0); // Disable analog trigger
|
||||
b->SetTranspMode(0); // VPC Mezzanine board
|
||||
b->EnableTrigger(0, 0); // Disable analog trigger
|
||||
}
|
||||
b->SetRefclk(0);
|
||||
b->SetFrequency(m_samplingSpeed, true);
|
||||
@@ -1170,7 +1170,7 @@ void Osci::SetTriggerLevel(double level)
|
||||
|
||||
void Osci::SetTriggerPolarity(bool negative)
|
||||
{
|
||||
m_trgNegative = negative;
|
||||
m_trgNegative[m_board] = negative;
|
||||
|
||||
if (m_drs->GetNumberOfBoards() > 0)
|
||||
m_drs->GetBoard(m_board)->SetTriggerPolarity(negative);
|
||||
@@ -1218,32 +1218,11 @@ double Osci::GetTriggerDelayNs()
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
void Osci::SetTriggerSource(int source)
|
||||
{
|
||||
m_trgSource[m_board] = source;
|
||||
|
||||
if (m_drs->GetNumberOfBoards() > 0) {
|
||||
if (m_drs->GetBoard(m_board)->GetBoardType() == 8 || m_drs->GetBoard(m_board)->GetBoardType() == 9) {
|
||||
m_drs->GetBoard(m_board)->EnableTrigger(1, 0); // enable trigger
|
||||
m_drs->GetBoard(m_board)->SetTriggerSource(1 << source); // simple or of single channel
|
||||
} else {
|
||||
if (source == 4)
|
||||
m_drs->GetBoard(m_board)->EnableTrigger(1, 0); // external trigger
|
||||
else {
|
||||
m_drs->GetBoard(m_board)->EnableTrigger(0, 1); // analog trigger
|
||||
m_drs->GetBoard(m_board)->SetTriggerSource(source);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
void Osci::SetTriggerConfig(int tc)
|
||||
{
|
||||
if (m_drs->GetBoard(m_board)->GetBoardType() == 8 || m_drs->GetBoard(m_board)->GetBoardType() == 9) {
|
||||
m_drs->GetBoard(m_board)->EnableTrigger(1, 0); // enable trigger
|
||||
m_drs->GetBoard(m_board)->SetTriggerSource(tc);
|
||||
m_drs->GetBoard(m_board)->SetTriggerConfig(tc);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1319,34 +1298,40 @@ unsigned int Osci::GetScaler(int channel)
|
||||
|
||||
void Osci::CorrectTriggerPoint(double t)
|
||||
{
|
||||
int i, n, min_i;
|
||||
int i, n, min_i, trgChn;
|
||||
double min_dt, dt, t0, t1, trigPoint[2*kNumberOfBins];
|
||||
float *pt;
|
||||
|
||||
/*---- shift first channel according to trigger point ----*/
|
||||
|
||||
if (m_trgSource[0] == 3 && m_clkOn)
|
||||
for (i=trgChn=0 ; i<5 ; i++)
|
||||
if (m_trgConfig[0] & (1<<i)) {
|
||||
trgChn = i;
|
||||
break;
|
||||
}
|
||||
|
||||
if (trgChn == 3 && m_clkOn)
|
||||
pt = m_timeClk[0];
|
||||
else
|
||||
pt = m_time[0][m_trgSource[0]];
|
||||
pt = m_time[0][trgChn];
|
||||
|
||||
if (m_trgSource[0] < 4) {
|
||||
if (trgChn < 4) {
|
||||
// search and store all points
|
||||
for (i = n = 0 ; i<m_waveDepth-1 ; i++) {
|
||||
if (m_trgNegative) {
|
||||
if (m_waveform[0][m_trgSource[0]][i] >= m_trgLevel[m_trgSource[0]]*1000 &&
|
||||
m_waveform[0][m_trgSource[0]][i+1] < m_trgLevel[m_trgSource[0]]*1000) {
|
||||
if (m_trgNegative[m_board]) {
|
||||
if (m_waveform[0][trgChn][i] >= m_trgLevel[trgChn]*1000 &&
|
||||
m_waveform[0][trgChn][i+1] < m_trgLevel[trgChn]*1000) {
|
||||
|
||||
dt = pt[i+1] - pt[i];
|
||||
dt = dt * 1 / (1 + (m_trgLevel[m_trgSource[0]]*1000-m_waveform[0][m_trgSource[0]][i+1])/(m_waveform[0][m_trgSource[0]][i]-m_trgLevel[m_trgSource[0]]*1000));
|
||||
dt = dt * 1 / (1 + (m_trgLevel[trgChn]*1000-m_waveform[0][trgChn][i+1])/(m_waveform[0][trgChn][i]-m_trgLevel[trgChn]*1000));
|
||||
trigPoint[n++] = pt[i] + dt;
|
||||
}
|
||||
} else {
|
||||
if (m_waveform[0][m_trgSource[0]][i] <= m_trgLevel[m_trgSource[0]]*1000 &&
|
||||
m_waveform[0][m_trgSource[0]][i+1] > m_trgLevel[m_trgSource[0]]*1000) {
|
||||
if (m_waveform[0][trgChn][i] <= m_trgLevel[trgChn]*1000 &&
|
||||
m_waveform[0][trgChn][i+1] > m_trgLevel[trgChn]*1000) {
|
||||
|
||||
dt = pt[i+1] - pt[i];
|
||||
dt = dt * 1 / (1 + (m_waveform[0][m_trgSource[0]][i+1]-m_trgLevel[m_trgSource[0]]*1000)/(m_trgLevel[m_trgSource[0]]*1000-m_waveform[0][m_trgSource[0]][i]));
|
||||
dt = dt * 1 / (1 + (m_waveform[0][trgChn][i+1]-m_trgLevel[trgChn]*1000)/(m_trgLevel[trgChn]*1000-m_waveform[0][trgChn][i]));
|
||||
trigPoint[n++] = pt[i] + dt;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,10 +96,9 @@ public:
|
||||
void SetTriggerDelay(int delay);
|
||||
int GetTriggerDelay();
|
||||
double GetTriggerDelayNs();
|
||||
void SetTriggerMode(int mode) { m_trgMode = mode; }
|
||||
int GetTriggerMode() { return m_trgMode; }
|
||||
void SetTriggerSource(int source);
|
||||
int GetTriggerSource() { return m_trgSource[m_board]; }
|
||||
void SetTriggerMode(int mode) { m_trgMode[m_board] = mode; }
|
||||
int GetTriggerMode() { return m_trgMode[m_board]; }
|
||||
int GetTriggerConfig() { return m_trgConfig[m_board]; }
|
||||
void SetTriggerConfig(int tc);
|
||||
void SetRefclk(int board, bool flag);
|
||||
void SetChnOn(int board, int chn, bool flag);
|
||||
@@ -140,9 +139,9 @@ private:
|
||||
int m_writeSR[MAX_N_BOARDS];
|
||||
int m_boardSerial[MAX_N_BOARDS];
|
||||
int m_waveDepth;
|
||||
int m_trgMode;
|
||||
int m_trgSource[MAX_N_BOARDS];
|
||||
bool m_trgNegative;
|
||||
int m_trgMode[MAX_N_BOARDS];
|
||||
int m_trgConfig[MAX_N_BOARDS];
|
||||
bool m_trgNegative[MAX_N_BOARDS];
|
||||
int m_trgDelay;
|
||||
double m_trgLevel[4];
|
||||
bool m_chnOn[MAX_N_BOARDS][4];
|
||||
|
||||
@@ -109,7 +109,7 @@ void TriggerDialog::OnButton( wxCommandEvent& event )
|
||||
m_cbANDEXT->Enable();
|
||||
}
|
||||
}
|
||||
m_frame->SetTriggerConfig(event.GetId(), event.IsChecked());
|
||||
m_frame->OnSetTriggerConfig(event.GetId(), event.IsChecked());
|
||||
}
|
||||
|
||||
void TriggerDialog::OnTriggerLevel( wxCommandEvent& event )
|
||||
|
||||
@@ -1571,7 +1571,7 @@
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="choices">"1" "2" "3" "4" "E"</property>
|
||||
<property name="choices">"1" "2" "3" "4" "E" "X"</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
@@ -1603,7 +1603,7 @@
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selection">1</property>
|
||||
<property name="selection">0</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxRA_SPECIFY_ROWS</property>
|
||||
|
||||
@@ -510,7 +510,7 @@ protected:
|
||||
int fNMultiBuffer;
|
||||
int fTriggerEnable1;
|
||||
int fTriggerEnable2;
|
||||
int fTriggerSource;
|
||||
int fTriggerConfig;
|
||||
int fTriggerDelay;
|
||||
double fTriggerDelayNs;
|
||||
int fSyncDelay;
|
||||
@@ -645,8 +645,8 @@ public:
|
||||
int SetTriggerLevel(double value);
|
||||
int SetIndividualTriggerLevel(int channel, double voltage);
|
||||
int SetTriggerPolarity(bool negative);
|
||||
int SetTriggerSource(int source);
|
||||
int GetTriggerSource() { return fTriggerSource; }
|
||||
int SetTriggerConfig(int source);
|
||||
int GetTriggerConfig() { return fTriggerConfig; }
|
||||
int SetDelayedStart(int flag);
|
||||
int SetTranspMode(int flag);
|
||||
int SetStandbyMode(int flag);
|
||||
|
||||
+10
-10
@@ -474,7 +474,7 @@ DRSBoard::DRSBoard(MUSB_INTERFACE * musb_interface, int usb_slot)
|
||||
, fNMultiBuffer(0)
|
||||
, fTriggerEnable1(0)
|
||||
, fTriggerEnable2(0)
|
||||
, fTriggerSource(0)
|
||||
, fTriggerConfig(0)
|
||||
, fTriggerDelay(0)
|
||||
, fTriggerDelayNs(0)
|
||||
, fSyncDelay(0)
|
||||
@@ -566,7 +566,7 @@ DRSBoard::DRSBoard(MVME_INTERFACE * mvme_interface, mvme_addr_t base_address, in
|
||||
, fNMultiBuffer(0)
|
||||
, fTriggerEnable1(0)
|
||||
, fTriggerEnable2(0)
|
||||
, fTriggerSource(0)
|
||||
, fTriggerConfig(0)
|
||||
, fTriggerDelay(0)
|
||||
, fTriggerDelayNs(0)
|
||||
, fSyncDelay(0)
|
||||
@@ -662,7 +662,7 @@ void DRSBoard::ConstructBoard()
|
||||
}
|
||||
fTriggerEnable1 = (bits & BIT_ENABLE_TRIGGER1) > 0;
|
||||
fTriggerEnable2 = (bits & BIT_ENABLE_TRIGGER2) > 0;
|
||||
fTriggerSource = ((bits & BIT_TR_SOURCE1) > 0) | (((bits & BIT_TR_SOURCE2) > 0) << 1);
|
||||
fTriggerConfig = ((bits & BIT_TR_SOURCE1) > 0) | (((bits & BIT_TR_SOURCE2) > 0) << 1);
|
||||
fReadoutMode = (bits & BIT_READOUT_MODE) > 0;
|
||||
Read(T_CTRL, &fReadPointer, REG_READ_POINTER, 2);
|
||||
fADCClkInvert = (bits & BIT_ADCCLK_INVERT) > 0;
|
||||
@@ -1979,7 +1979,7 @@ int DRSBoard::Init()
|
||||
fReadPointer = 0;
|
||||
fTriggerEnable1 = 0;
|
||||
fTriggerEnable2 = 0;
|
||||
fTriggerSource = 0;
|
||||
fTriggerConfig = 0;
|
||||
fTriggerDelay = 0;
|
||||
fTriggerDelayNs = 0;
|
||||
fSyncDelay = 0;
|
||||
@@ -2005,7 +2005,7 @@ int DRSBoard::Init()
|
||||
SetDominoMode(fDominoMode);
|
||||
SetReadoutMode(fReadoutMode);
|
||||
EnableTrigger(fTriggerEnable1, fTriggerEnable2);
|
||||
SetTriggerSource(fTriggerSource);
|
||||
SetTriggerConfig(fTriggerConfig);
|
||||
SetTriggerDelayPercent(0);
|
||||
SetSyncDelay(fSyncDelay);
|
||||
SetDominoActive(fDominoActive);
|
||||
@@ -2333,19 +2333,19 @@ int DRSBoard::SetReadoutDelay(int ticks)
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
int DRSBoard::SetTriggerSource(int source)
|
||||
int DRSBoard::SetTriggerConfig(int config)
|
||||
{
|
||||
short int reg;
|
||||
|
||||
fTriggerSource = source;
|
||||
fTriggerConfig = config;
|
||||
if (fBoardType == 5 || fBoardType == 7) {
|
||||
// Set trigger source
|
||||
// 0=CH1, 1=CH2, 2=CH3, 3=CH4
|
||||
if (source & 1)
|
||||
if (config & 1)
|
||||
fCtrlBits |= BIT_TR_SOURCE1;
|
||||
else
|
||||
fCtrlBits &= ~BIT_TR_SOURCE1;
|
||||
if (source & 2)
|
||||
if (config & 2)
|
||||
fCtrlBits |= BIT_TR_SOURCE2;
|
||||
else
|
||||
fCtrlBits &= ~BIT_TR_SOURCE2;
|
||||
@@ -2356,7 +2356,7 @@ int DRSBoard::SetTriggerSource(int source)
|
||||
// OR Bit0=CH1, Bit1=CH2, Bit2=CH3, Bit3=CH4, Bit4=EXT
|
||||
// AND Bit8=CH1, Bit9=CH2, Bit10=CH3, Bit11=CH4, Bit12=EXT
|
||||
// TRANSP Bit15
|
||||
reg = (unsigned short) source;
|
||||
reg = (unsigned short) config;
|
||||
Write(T_CTRL, REG_TRG_CONFIG, ®, 2);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user