Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions DSView/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@ int main(int argc, char *argv[])
}

if (argcFinal - optind > 1) {
printf("Only one file can be openened.\n");
printf("Only one file can be opened.\n");
return 1;
}
else if (argcFinal - optind == 1){
open_file = argvFinal[argcFinal - 1];
}

//----------------------HightDpiScaling
//----------------------HighDpiScaling
#if QT_VERSION >= QT_VERSION_CHECK(5,6,0)
bool bHighScale = true;

Expand Down Expand Up @@ -238,7 +238,7 @@ bool bHighScale = true;
pv::MainFrame w;
control->Start();
w.ShowFormInit();
w.ShowHelpDocAsync(); //to show the dailog for open help document
w.ShowHelpDocAsync(); //to show the dialog for open help document

ret = a.exec(); //Run the application
control->Stop();
Expand Down
2 changes: 1 addition & 1 deletion DSView/pv/appcontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ bool AppControl::Init()
qs = GetDecodeScriptDir();
cs = pv::path::ToUnicodePath(qs);
dsv_info("GetDecodeScriptDir:\"%s\"", cs.c_str());
//---------------end print directorys.
//---------------end print directories.

_session->init();

Expand Down
2 changes: 1 addition & 1 deletion DSView/pv/config/appconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ struct AppOptions
std::vector<StringPair> m_protocolFormats;
};

// The dock pannel open status.
// The dock panel open status.
struct DockOptions
{
bool decodeDock;
Expand Down
4 changes: 2 additions & 2 deletions DSView/pv/data/decode/annotation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const std::vector<QString>& Annotation::annotations() const

AnnotationSourceItem &resItem = *pobj;

//get origin data, is not a numberic value
//get origin data, is not a numeric value
if (!resItem.is_numeric){
return resItem.src_lines;
}
Expand Down Expand Up @@ -170,7 +170,7 @@ const std::vector<QString>& Annotation::annotations() const
free(text_format_buf);
}
else{
//have only numberic value
//have only numeric value
const char *num_str = _status->m_resTable.format_numberic(resItem.str_number_hex, resItem.cur_display_format);
resItem.cvt_lines.push_back(QString(num_str));
}
Expand Down
2 changes: 1 addition & 1 deletion DSView/pv/data/decode/annotationrestable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ const char* AnnotationResTable::format_numberic(const char *hex_str, int fmt)

if ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f')){
if (sub_wr == sub_end){
printf("conver error,sub string length is too long!\n");
printf("convert error,sub string length is too long!\n");
return hex_str;
}

Expand Down
2 changes: 1 addition & 1 deletion DSView/pv/data/decode/annotationrestable.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct AnnotationSourceItem

std::vector<QString> src_lines; //the origin source string lines
std::vector<QString> cvt_lines; //the converted to bin/hex/oct format string lines
int cur_display_format; //current format as bin/ex/oct..., init with -1
int cur_display_format; //current format as bin/hex/oct..., init with -1
};

class AnnotationResTable
Expand Down
4 changes: 2 additions & 2 deletions DSView/pv/data/decode/rowdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ RowData::RowData() :

RowData::~RowData()
{
//stack object can not destory the sources
//stack object can not destroy the sources
}

void RowData::clear()
{
std::lock_guard<std::mutex> lock(_global_visitor_mutex);

//destroy objercts
//destroy objects
for (Annotation *p : _annotations){
delete p;
}
Expand Down
16 changes: 8 additions & 8 deletions DSView/pv/data/decoderstack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ DecoderStack::DecoderStack(pv::SigSession *session,

DecoderStack::~DecoderStack()
{
//release resource talbe
//release resource table
DESTROY_OBJECT(_decoder_status);

//release source
for (auto &kv : _rows)
{
kv.second->clear(); //destory all annotations
kv.second->clear(); //destroy all annotations
delete kv.second;
}
_rows.clear();
Expand Down Expand Up @@ -148,7 +148,7 @@ void DecoderStack::build_row()
//release source
for (auto &kv : _rows)
{
kv.second->clear(); //destory all annotations
kv.second->clear(); //destroy all annotations
delete kv.second;
}
_rows.clear();
Expand Down Expand Up @@ -508,7 +508,7 @@ void DecoderStack::decode_data(const uint64_t decode_start, const uint64_t decod
uint64_t notify_cnt = (decode_end - decode_start + 1)/100;
srd_decoder_inst *logic_di = NULL;

// find the first level decoder instant
// find the first level decoder instance
for (GSList *d = session->di_list; d; d = d->next) {
srd_decoder_inst *di = (srd_decoder_inst *)d->data;
srd_decoder *decoder = di->decoder;
Expand Down Expand Up @@ -700,16 +700,16 @@ void DecoderStack::execute_decode_stack()
assert(_snapshot);

// Create the session
// one decoderstatck onwer one session
// all decoderstatck execute in sequence
// one decoderstack owns one session
// all decoderstacks execute in sequence
srd_session_new(&session);

if (session == NULL){
dsv_err("Failed to call srd_session_new()");
assert(false);
}

// Get the intial sample count
// Get the initial sample count
_sample_count = _snapshot->get_ring_sample_count();

// Create the decoders
Expand Down Expand Up @@ -780,7 +780,7 @@ uint64_t DecoderStack::sample_rate()
return _samplerate;
}

//the decode callback, annotation object will be create
//the decode callback, annotation object will be created
void DecoderStack::annotation_callback(srd_proto_data *pdata, void *self)
{
assert(pdata);
Expand Down
2 changes: 1 addition & 1 deletion DSView/pv/data/decoderstack.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ struct decode_task_status
DecoderStack *_decoder;
};

//a torotocol have a DecoderStack, destroy by DecodeTrace
//a protocol has a DecoderStack, destroy by DecodeTrace
class DecoderStack : public QObject, public SignalData
{
Q_OBJECT
Expand Down
2 changes: 1 addition & 1 deletion DSView/pv/data/dsosnapshot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ double DsoSnapshot::cal_vrms(double zero_off, int index)
{
assert(index >= 0);

// root-meam-squart value
// root-mean-square value
double vrms_pre = 0;
double vrms = 0;
double tmp;
Expand Down
4 changes: 2 additions & 2 deletions DSView/pv/data/logicsnapshot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ void LogicSnapshot::first_payload(const sr_datafeed_logic &logic, uint64_t total
}

if (_ch_index.size() == 0){
dsv_info("ERROR: all channels disalbed");
dsv_info("ERROR: all channels disabled");
assert(0);
}
}
Expand Down Expand Up @@ -231,7 +231,7 @@ void LogicSnapshot::append_cross_payload(const sr_datafeed_logic &logic)
uint64_t offset = 0;
void *lbp = NULL;

// samples not accurate, lead to a larger _sampole_count
// samples not accurate, lead to a larger _sample_count
// _sample_count should be fixed in the last packet
// so _total_sample_count must be align to LeafBlock
uint64_t samples = ceil(logic.length * 8.0 / _channel_num);
Expand Down
4 changes: 2 additions & 2 deletions DSView/pv/dialogs/applicationpardlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ bool ApplicationParamDlg::ShowDlg(QWidget *parent)
logicLay->addWidget(ck_quickScroll, 0, 1, Qt::AlignRight);
logicLay->addWidget(new QLabel(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_USE_ABORT_DATA_REPEAT), "Used abort data")), 1, 0, Qt::AlignLeft);
logicLay->addWidget(ck_abortData, 1, 1, Qt::AlignRight);
logicLay->addWidget(new QLabel(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_AUTO_SCROLL_LATEAST_DATA), "Auto scoll latest")), 2, 0, Qt::AlignLeft);
logicLay->addWidget(new QLabel(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_AUTO_SCROLL_LATEAST_DATA), "Auto scroll latest")), 2, 0, Qt::AlignLeft);
logicLay->addWidget(ck_autoScrollLatestData, 2, 1, Qt::AlignRight);
lay->addWidget(logicGroup);

Expand All @@ -156,7 +156,7 @@ bool ApplicationParamDlg::ShowDlg(QWidget *parent)
dsoLay->setContentsMargins(10,15,15,10);
dsoLay->setAlignment(Qt::AlignTop | Qt::AlignLeft);
dsoGroup->setLayout(dsoLay);
dsoLay->addWidget(new QLabel(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_TRIG_DISPLAY_MIDDLE), "Tig pos in middle")), 0, 0, Qt::AlignLeft);
dsoLay->addWidget(new QLabel(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_TRIG_DISPLAY_MIDDLE), "Trig pos in middle")), 0, 0, Qt::AlignLeft);
dsoLay->addWidget(ck_trigInMid, 0, 1, Qt::AlignRight);
lay->addWidget(dsoGroup);

Expand Down
2 changes: 1 addition & 1 deletion DSView/pv/dialogs/calibration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ void Calibration::reload_value()
void Calibration::on_reset()
{
QString strMsg(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_SET_DEF_CAL_SETTING),
"All calibration settings will become the defualt values!"));
"All calibration settings will become the default values!"));

if (MsgBox::Confirm(strMsg)) {
_device_agent->set_config_bool(SR_CONF_ZERO_DEFAULT, true);
Expand Down
2 changes: 1 addition & 1 deletion DSView/pv/dialogs/decoderoptionsdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void DecoderOptionsDlg::load_options_view()
form->setLabelAlignment(Qt::AlignLeft);
dlg->layout()->addLayout(form);

//scroll pannel
//scroll panel
QWidget *scroll_pannel = new QWidget();
QVBoxLayout *scroll_lay = new QVBoxLayout();
scroll_lay->setContentsMargins(0, 0, 0, 0);
Expand Down
4 changes: 2 additions & 2 deletions DSView/pv/dialogs/deviceoptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ DeviceOptions::DeviceOptions(QWidget *parent) :
minWid->setMinimumWidth(230);
_container_lay->addWidget(minWid);

// chnnels group box
// channels group box
this->build_dynamic_panel();

// space
Expand Down Expand Up @@ -863,7 +863,7 @@ void DeviceOptions::try_resize_scroll()
// content area height
int contentHeight = _groupHeight1 + _groupHeight2 + 20; // +space
//dialog height
int dlgHeight = contentHeight + 100; // +bottom buttton
int dlgHeight = contentHeight + 100; // +bottom button

#ifdef Q_OS_DARWIN
dlgHeight += 20;
Expand Down
2 changes: 1 addition & 1 deletion DSView/pv/dialogs/dsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ DSDialog::DSDialog(QWidget *parent, bool hasClose):

DSDialog::DSDialog(QWidget *parent, bool hasClose, bool bBaseButton) :
#ifdef Q_OS_LINUX
QDialog(NULL), //enable the popup dialog draged.
QDialog(NULL), //enable the popup dialog dragged.
#else
QDialog(parent),
#endif
Expand Down
2 changes: 1 addition & 1 deletion DSView/pv/dialogs/dsmessagebox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace dialogs {

DSMessageBox::DSMessageBox(QWidget *parent,const QString title) :
#ifdef Q_OS_LINUX
QDialog(NULL) //enable the popup dialog draged.
QDialog(NULL) //enable the popup dialog dragged.
#else
QDialog(parent)
#endif
Expand Down
4 changes: 2 additions & 2 deletions DSView/pv/dialogs/mathoptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ MathOptions::MathOptions(SigSession *session, QWidget *parent) :
QRadioButton *add_radio = new QRadioButton(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_ADD), "Add"), _math_group);
add_radio->setProperty("type", data::MathStack::MATH_ADD);
type_layout->addWidget(add_radio);
QRadioButton *sub_radio = new QRadioButton(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_SUBSTRACT), "Substract"), _math_group);
QRadioButton *sub_radio = new QRadioButton(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_SUBSTRACT), "Subtract"), _math_group);
sub_radio->setProperty("type", data::MathStack::MATH_SUB);
type_layout->addWidget(sub_radio);
QRadioButton *mul_radio = new QRadioButton(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_MULTIPLY), "Multiply"), _math_group);
Expand Down Expand Up @@ -172,7 +172,7 @@ void MathOptions::retranslateUi()
_enable->setText(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_ENABLE), "Enable"));
_math_group->setTitle(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_MATH_TYPE), "Math Type"));
_src1_group->setTitle(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_1ST_SOURCE), "1st Source"));
_src2_group->setTitle(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_2ST_SOURCE), "2st Source"));
_src2_group->setTitle(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_2ST_SOURCE), "2nd Source"));
setTitle(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_MATH_OPTIONS), "Math Options"));
}

Expand Down
4 changes: 2 additions & 2 deletions DSView/pv/dock/keywordlineedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void KeywordLineEdit::ResetText()
return;
}

this->setText(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_KEY_DECODER_SEARCH), "Decoder s_ann_search_editearch..."));
this->setText(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_KEY_DECODER_SEARCH), "Decoder search..."));
}

void KeywordLineEdit::SetInputText(QString text)
Expand Down Expand Up @@ -102,7 +102,7 @@ void KeyLineEdit::keyPressEvent(QKeyEvent *event)
}

new_text = QString::number(v);
setText(new_text); //Maby need to restore the old value.
setText(new_text); //Maybe need to restore the old value.

if (new_text != old_text){
valueChanged(v);
Expand Down
2 changes: 1 addition & 1 deletion DSView/pv/dock/protocoldock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ void ProtocolDock::del_all_protocol()

for (auto it = _protocol_lay_items.begin(); it != _protocol_lay_items.end(); it++)
{
DESTROY_QT_LATER((*it)); //destory control
DESTROY_QT_LATER((*it)); //destroy control
}

_protocol_lay_items.clear();
Expand Down
2 changes: 1 addition & 1 deletion DSView/pv/dock/protocolitemlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private slots:
QPushButton *_del_button;
DsComboBox *_format_combox;
IProtocolItemLayerCallback *m_callback;
QString _protocolName; //the lable text
QString _protocolName; //the label text
bool m_bSetting;
bool m_singleFlag;
};
Expand Down
2 changes: 1 addition & 1 deletion DSView/pv/dock/triggerdock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ void TriggerDock::try_commit_trigger()
dialogs::DSMessageBox msg(this);
msg.mBox()->setText(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_TRIGGER), "Trigger"));
msg.mBox()->setInformativeText(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_SET_TRI_MULTI_CHANNEL),
"Trigger setted on multiple channels!\nCapture will Only triggered when all setted channels fullfill at one sample"));
"Trigger set on multiple channels!\nCapture will Only triggered when all set channels fulfill at one sample"));
msg.mBox()->setIcon(QMessageBox::Information);

QPushButton *noMoreButton = msg.mBox()->addButton(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_NOT_SHOW_AGAIN), "Not Show Again"), QMessageBox::ActionRole);
Expand Down
4 changes: 2 additions & 2 deletions DSView/pv/mainframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ void MainFrame::AttachNativeWindow()
nativeWindow->SetBorderColor(QColor(0x80, 0x80, 0x80));
_parentNativeWidget = nativeWindow;

//Make sure the shadow displayed at a right position fisrt time for windows 10.
//Make sure the shadow displayed at a right position first time for windows 10.
QTimer::singleShot(100, this, [this](){
_parentNativeWidget->ResizeChild();
});
Expand Down Expand Up @@ -1021,7 +1021,7 @@ void MainFrame::ReadSettings()
#ifdef _WIN32
void MainFrame::showEvent(QShowEvent *event)
{
// Taskbar Progress Effert for Win7 and Above
// Taskbar Progress Effect for Win7 and Above
if (_taskBtn && _taskBtn->window() == NULL) {
_taskBtn->setWindow(windowHandle());
_taskPrg = _taskBtn->progress();
Expand Down
2 changes: 1 addition & 1 deletion DSView/pv/mainframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public slots:
int _hit_border;
QTimer _timer;
bool _freezing;
// Taskbar Progress Effert for Win7 and Above
// Taskbar Progress Effect for Win7 and Above
#ifdef _WIN32
QWinTaskbarButton *_taskBtn;
QWinTaskbarProgress *_taskPrg;
Expand Down
Loading