From 1193d021c95ac6b76b9636769b471af56e00889c Mon Sep 17 00:00:00 2001 From: Luke Fulcomer Date: Sat, 3 Oct 2026 10:28:45 -0700 Subject: [PATCH 1/2] Fix typos in comments, log messages and UI strings Spelling fixes only, in DSView/pv, libsigrok4DSL, common/log and the English language file. No identifiers, keys or settings names change. User-visible strings (code default and lang/en text, looked up by id): - "Substract" -> "Subtract", "2st Source" -> "2nd Source" - "Auto scoll latest" -> "Auto scroll latest" - "Tig pos in middle" -> "Trig pos in middle" - "Out off range" / "Data out off range" -> "... out of range" - "Decoder s_ann_search_editearch..." -> "Decoder search..." - "defualt" -> "default" in the calibration reset message - "setted" -> "set", "fullfill" -> "fulfill" in the multi-channel trigger warning; "suppport" -> "support" Log messages: "expacted", "have'nt be inited", "Waitting", "Unkown", "Cant't", "Faild", "verison", "actived", "useable", "deivce" and similar; a full-width comma in a log line becomes an ASCII comma. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01EtTPqtfw2fhHmLjjJVS2GV --- DSView/main.cpp | 6 ++-- DSView/pv/appcontrol.cpp | 2 +- DSView/pv/config/appconfig.h | 2 +- DSView/pv/data/decode/annotation.cpp | 4 +-- DSView/pv/data/decode/annotationrestable.cpp | 2 +- DSView/pv/data/decode/annotationrestable.h | 2 +- DSView/pv/data/decode/rowdata.cpp | 4 +-- DSView/pv/data/decoderstack.cpp | 16 ++++----- DSView/pv/data/decoderstack.h | 2 +- DSView/pv/data/dsosnapshot.cpp | 2 +- DSView/pv/data/logicsnapshot.cpp | 4 +-- DSView/pv/dialogs/applicationpardlg.cpp | 4 +-- DSView/pv/dialogs/calibration.cpp | 2 +- DSView/pv/dialogs/decoderoptionsdlg.cpp | 2 +- DSView/pv/dialogs/deviceoptions.cpp | 4 +-- DSView/pv/dialogs/dsdialog.cpp | 2 +- DSView/pv/dialogs/dsmessagebox.cpp | 2 +- DSView/pv/dialogs/mathoptions.cpp | 4 +-- DSView/pv/dock/keywordlineedit.cpp | 4 +-- DSView/pv/dock/protocoldock.cpp | 2 +- DSView/pv/dock/protocolitemlayer.h | 2 +- DSView/pv/dock/triggerdock.cpp | 2 +- DSView/pv/mainframe.cpp | 4 +-- DSView/pv/mainframe.h | 2 +- DSView/pv/mainwindow.cpp | 18 +++++----- DSView/pv/sigsession.cpp | 8 ++--- DSView/pv/sigsession.h | 2 +- DSView/pv/storesession.cpp | 6 ++-- DSView/pv/toolbars/filebar.h | 2 +- DSView/pv/toolbars/logobar.h | 2 +- DSView/pv/toolbars/samplingbar.cpp | 2 +- DSView/pv/toolbars/trigbar.h | 2 +- DSView/pv/ui/langresource.cpp | 2 +- DSView/pv/view/analogsignal.h | 2 +- DSView/pv/view/decodetrace.h | 2 +- DSView/pv/view/devmode.h | 2 +- DSView/pv/view/dsldial.h | 2 +- DSView/pv/view/dsosignal.h | 2 +- DSView/pv/view/header.cpp | 4 +-- DSView/pv/view/spectrumtrace.h | 2 +- DSView/pv/view/trace.h | 4 +-- DSView/pv/view/view.h | 4 +-- DSView/pv/view/viewport.cpp | 2 +- DSView/pv/winnativewidget.cpp | 8 ++--- DSView/pv/winshadow.cpp | 2 +- common/log/xlog.c | 6 ++-- common/log/xlog.h | 10 +++--- lang/en/dlg.json | 4 +-- lang/en/msg.json | 4 +-- libsigrok4DSL/hardware/DSL/dscope.c | 14 ++++---- libsigrok4DSL/hardware/DSL/dsl.c | 26 +++++++------- libsigrok4DSL/hardware/DSL/dsl.h | 6 ++-- libsigrok4DSL/hardware/DSL/dslogic.c | 10 +++--- libsigrok4DSL/hardware/demo/demo.c | 8 ++--- libsigrok4DSL/hardware/demo/demo.h | 2 +- libsigrok4DSL/lib_main.c | 36 ++++++++++---------- libsigrok4DSL/libsigrok-internal.h | 2 +- libsigrok4DSL/libsigrok.h | 24 ++++++------- libsigrok4DSL/session.c | 2 +- libsigrok4DSL/session_driver.c | 4 +-- libsigrok4DSL/tests/test_main.cpp | 2 +- libsigrok4DSL/trigger.c | 32 ++++++++--------- 62 files changed, 177 insertions(+), 177 deletions(-) diff --git a/DSView/main.cpp b/DSView/main.cpp index 748a59d95..1d6443e0a 100644 --- a/DSView/main.cpp +++ b/DSView/main.cpp @@ -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; @@ -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(); diff --git a/DSView/pv/appcontrol.cpp b/DSView/pv/appcontrol.cpp index d5cb559b5..140e09d95 100644 --- a/DSView/pv/appcontrol.cpp +++ b/DSView/pv/appcontrol.cpp @@ -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(); diff --git a/DSView/pv/config/appconfig.h b/DSView/pv/config/appconfig.h index 106db5ce1..6cec762e6 100644 --- a/DSView/pv/config/appconfig.h +++ b/DSView/pv/config/appconfig.h @@ -76,7 +76,7 @@ struct AppOptions std::vector m_protocolFormats; }; - // The dock pannel open status. + // The dock panel open status. struct DockOptions { bool decodeDock; diff --git a/DSView/pv/data/decode/annotation.cpp b/DSView/pv/data/decode/annotation.cpp index f285247cb..2f1443b35 100644 --- a/DSView/pv/data/decode/annotation.cpp +++ b/DSView/pv/data/decode/annotation.cpp @@ -121,7 +121,7 @@ const std::vector& 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; } @@ -170,7 +170,7 @@ const std::vector& 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)); } diff --git a/DSView/pv/data/decode/annotationrestable.cpp b/DSView/pv/data/decode/annotationrestable.cpp index 6f2ec96ab..393582cdb 100644 --- a/DSView/pv/data/decode/annotationrestable.cpp +++ b/DSView/pv/data/decode/annotationrestable.cpp @@ -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; } diff --git a/DSView/pv/data/decode/annotationrestable.h b/DSView/pv/data/decode/annotationrestable.h index 740c56f74..48e362d2b 100644 --- a/DSView/pv/data/decode/annotationrestable.h +++ b/DSView/pv/data/decode/annotationrestable.h @@ -36,7 +36,7 @@ struct AnnotationSourceItem std::vector src_lines; //the origin source string lines std::vector 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 diff --git a/DSView/pv/data/decode/rowdata.cpp b/DSView/pv/data/decode/rowdata.cpp index 08690e620..ed389f382 100644 --- a/DSView/pv/data/decode/rowdata.cpp +++ b/DSView/pv/data/decode/rowdata.cpp @@ -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 lock(_global_visitor_mutex); - //destroy objercts + //destroy objects for (Annotation *p : _annotations){ delete p; } diff --git a/DSView/pv/data/decoderstack.cpp b/DSView/pv/data/decoderstack.cpp index cb6b0b9a3..665283d2d 100644 --- a/DSView/pv/data/decoderstack.cpp +++ b/DSView/pv/data/decoderstack.cpp @@ -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(); @@ -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(); @@ -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; @@ -700,8 +700,8 @@ 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){ @@ -709,7 +709,7 @@ void DecoderStack::execute_decode_stack() assert(false); } - // Get the intial sample count + // Get the initial sample count _sample_count = _snapshot->get_ring_sample_count(); // Create the decoders @@ -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); diff --git a/DSView/pv/data/decoderstack.h b/DSView/pv/data/decoderstack.h index c681eba47..466137417 100644 --- a/DSView/pv/data/decoderstack.h +++ b/DSView/pv/data/decoderstack.h @@ -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 diff --git a/DSView/pv/data/dsosnapshot.cpp b/DSView/pv/data/dsosnapshot.cpp index 97167fde2..5f073b6e5 100644 --- a/DSView/pv/data/dsosnapshot.cpp +++ b/DSView/pv/data/dsosnapshot.cpp @@ -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; diff --git a/DSView/pv/data/logicsnapshot.cpp b/DSView/pv/data/logicsnapshot.cpp index b2226cd8c..a0ce77897 100644 --- a/DSView/pv/data/logicsnapshot.cpp +++ b/DSView/pv/data/logicsnapshot.cpp @@ -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); } } @@ -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); diff --git a/DSView/pv/dialogs/applicationpardlg.cpp b/DSView/pv/dialogs/applicationpardlg.cpp index 774ed6015..8f8543136 100644 --- a/DSView/pv/dialogs/applicationpardlg.cpp +++ b/DSView/pv/dialogs/applicationpardlg.cpp @@ -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); @@ -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); diff --git a/DSView/pv/dialogs/calibration.cpp b/DSView/pv/dialogs/calibration.cpp index 9ddd066cb..d74184df9 100644 --- a/DSView/pv/dialogs/calibration.cpp +++ b/DSView/pv/dialogs/calibration.cpp @@ -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); diff --git a/DSView/pv/dialogs/decoderoptionsdlg.cpp b/DSView/pv/dialogs/decoderoptionsdlg.cpp index bf0b8e933..b01151aec 100644 --- a/DSView/pv/dialogs/decoderoptionsdlg.cpp +++ b/DSView/pv/dialogs/decoderoptionsdlg.cpp @@ -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); diff --git a/DSView/pv/dialogs/deviceoptions.cpp b/DSView/pv/dialogs/deviceoptions.cpp index 7d4ae1c4c..c82e1221d 100644 --- a/DSView/pv/dialogs/deviceoptions.cpp +++ b/DSView/pv/dialogs/deviceoptions.cpp @@ -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 @@ -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; diff --git a/DSView/pv/dialogs/dsdialog.cpp b/DSView/pv/dialogs/dsdialog.cpp index 555410115..27fe358a8 100644 --- a/DSView/pv/dialogs/dsdialog.cpp +++ b/DSView/pv/dialogs/dsdialog.cpp @@ -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 diff --git a/DSView/pv/dialogs/dsmessagebox.cpp b/DSView/pv/dialogs/dsmessagebox.cpp index c8cf41f00..4ce82fc38 100644 --- a/DSView/pv/dialogs/dsmessagebox.cpp +++ b/DSView/pv/dialogs/dsmessagebox.cpp @@ -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 diff --git a/DSView/pv/dialogs/mathoptions.cpp b/DSView/pv/dialogs/mathoptions.cpp index ac76ffda0..8ac1aca9e 100644 --- a/DSView/pv/dialogs/mathoptions.cpp +++ b/DSView/pv/dialogs/mathoptions.cpp @@ -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); @@ -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")); } diff --git a/DSView/pv/dock/keywordlineedit.cpp b/DSView/pv/dock/keywordlineedit.cpp index 2c2e4722d..9cdd2722e 100644 --- a/DSView/pv/dock/keywordlineedit.cpp +++ b/DSView/pv/dock/keywordlineedit.cpp @@ -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) @@ -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); diff --git a/DSView/pv/dock/protocoldock.cpp b/DSView/pv/dock/protocoldock.cpp index 648eb5b88..9eba44067 100644 --- a/DSView/pv/dock/protocoldock.cpp +++ b/DSView/pv/dock/protocoldock.cpp @@ -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(); diff --git a/DSView/pv/dock/protocolitemlayer.h b/DSView/pv/dock/protocolitemlayer.h index 38de97a6f..eb8f3772f 100644 --- a/DSView/pv/dock/protocolitemlayer.h +++ b/DSView/pv/dock/protocolitemlayer.h @@ -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; }; diff --git a/DSView/pv/dock/triggerdock.cpp b/DSView/pv/dock/triggerdock.cpp index 8280cdc7f..62e31b687 100644 --- a/DSView/pv/dock/triggerdock.cpp +++ b/DSView/pv/dock/triggerdock.cpp @@ -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); diff --git a/DSView/pv/mainframe.cpp b/DSView/pv/mainframe.cpp index 9f92d42b0..ca3791399 100644 --- a/DSView/pv/mainframe.cpp +++ b/DSView/pv/mainframe.cpp @@ -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(); }); @@ -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(); diff --git a/DSView/pv/mainframe.h b/DSView/pv/mainframe.h index 0c2ec3ee9..624e7cb56 100644 --- a/DSView/pv/mainframe.h +++ b/DSView/pv/mainframe.h @@ -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; diff --git a/DSView/pv/mainwindow.cpp b/DSView/pv/mainwindow.cpp index 74dc348b8..ca2ad16b3 100644 --- a/DSView/pv/mainwindow.cpp +++ b/DSView/pv/mainwindow.cpp @@ -243,7 +243,7 @@ namespace pv _measure_dock->installEventFilter(this); _search_dock->installEventFilter(this); - // defaut language + // default language AppConfig &app = AppConfig::Instance(); switchLanguage(app.frameOptions.language); switchTheme(app.frameOptions.style); @@ -735,7 +735,7 @@ namespace pv else if (info->datatype == SR_T_LIST) sessionVar[info->name] = QJsonValue::fromVariant(g_variant_get_int16(gvar)); else{ - dsv_err("Unkown config info type:%d", info->datatype); + dsv_err("Unknown config info type:%d", info->datatype); assert(false); } g_variant_unref(gvar); @@ -1214,7 +1214,7 @@ namespace pv } } - // Resotre the dock pannel. + // Restore the dock panel. if (_device_agent->have_instance()) _trig_bar->reload(); } @@ -1490,7 +1490,7 @@ namespace pv void MainWindow::receive_trigger(quint64 trigger_pos) { - _event.receive_trigger(trigger_pos); // save call + _event.receive_trigger(trigger_pos); // safe call } void MainWindow::on_receive_trigger(quint64 trigger_pos) @@ -1500,7 +1500,7 @@ namespace pv void MainWindow::frame_ended() { - _event.frame_ended(); // save call + _event.frame_ended(); // safe call } void MainWindow::on_frame_ended() @@ -1510,7 +1510,7 @@ namespace pv void MainWindow::frame_began() { - _event.frame_began(); // save call + _event.frame_began(); // safe call } void MainWindow::on_frame_began() @@ -1999,13 +1999,13 @@ namespace pv // The store confirm is not processed. if (_is_save_confirm_msg){ - dsv_info("New device attached:Waitting for the confirm box be closed."); + dsv_info("New device attached:Waiting for the confirm box be closed."); _is_auto_switch_device = true; return; } if (_session->is_saving()){ - dsv_info("New device attached:Waitting for store the data. and will switch to new device."); + dsv_info("New device attached:Waiting for store the data. and will switch to new device."); _is_auto_switch_device = true; return; } @@ -2044,7 +2044,7 @@ namespace pv _view->hide_calibration(); if (_session->is_saving()){ - dsv_info("Device detached:Waitting for store the data. and will switch to new device."); + dsv_info("Device detached:Waiting for store the data. and will switch to new device."); _is_auto_switch_device = true; return; } diff --git a/DSView/pv/sigsession.cpp b/DSView/pv/sigsession.cpp index 1ad7cc42e..f671ad62f 100644 --- a/DSView/pv/sigsession.cpp +++ b/DSView/pv/sigsession.cpp @@ -182,7 +182,7 @@ namespace pv assert(!_is_saving); if (_is_working){ - dsv_info("SigSession::set_default_device(),The current device is working, now to stop it."); + dsv_info("SigSession::set_default_device(), The current device is working, now to stop it."); dsv_info("SigSession::set_default_device(), stop capture"); stop_capture(); } @@ -339,7 +339,7 @@ namespace pv if (ds_remove_device(dev_handle) != SR_OK) { - dsv_err("Remove virtual deivice error!"); + dsv_err("Remove virtual device error!"); } if (isCurrent) @@ -2289,7 +2289,7 @@ namespace pv _trig_check_timer.Stop(); - //Switch the caputrued data buffer to view. + //Switch the captured data buffer to view. if (bSwapBuffer) { if (_view_data != _capture_data) @@ -2333,7 +2333,7 @@ namespace pv void SigSession::DeviceConfigChanged() { - // Nonthing. + // Nothing. } bool SigSession::switch_work_mode(int mode) diff --git a/DSView/pv/sigsession.h b/DSView/pv/sigsession.h index 3f000e319..29d77722d 100644 --- a/DSView/pv/sigsession.h +++ b/DSView/pv/sigsession.h @@ -631,7 +631,7 @@ class SigSession: private: // TODO: This should not be necessary. Multiple concurrent - // sessions should should be supported and it should be + // sessions should be supported and it should be // possible to associate a pointer with a ds_session. static SigSession *_session; }; diff --git a/DSView/pv/storesession.cpp b/DSView/pv/storesession.cpp index bad85ce6f..a2188c96e 100644 --- a/DSView/pv/storesession.cpp +++ b/DSView/pv/storesession.cpp @@ -239,7 +239,7 @@ void StoreSession::save_logic(pv::data::LogicSnapshot *logic_snapshot) int end_block = 0; if (start_index > logic_snapshot->get_ring_sample_count()){ - dsv_err("ERROR:the start curosr is invalid!"); + dsv_err("ERROR:the start cursor is invalid!"); _units_stored = -1; progress_updated(); return; @@ -1003,7 +1003,7 @@ void StoreSession::export_exec(data::Snapshot *snapshot) uint64_t end_offset = 0; if (start_index > logic_snapshot->get_ring_sample_count()){ - dsv_err("ERROR:the start curosr is invalid!"); + dsv_err("ERROR:the start cursor is invalid!"); _units_stored = -1; progress_updated(); return; @@ -1492,7 +1492,7 @@ bool StoreSession::load_decoders(dock::ProtocolDock *widget, QJsonArray &dec_arr if (options_obj.contains(opt->id)) { GVariant *new_value = NULL; - // When the numberic value is a string, it got zero always, + // When the numeric value is a string, it got zero always, // so must convert from string. QString vs = options_obj[opt->id].toString(); diff --git a/DSView/pv/toolbars/filebar.h b/DSView/pv/toolbars/filebar.h index 950697c0d..417444b05 100644 --- a/DSView/pv/toolbars/filebar.h +++ b/DSView/pv/toolbars/filebar.h @@ -36,7 +36,7 @@ namespace pv { namespace toolbars { //toolbar button,referenced by MainWindow -//TODO: load session file, sorte session, load log data file, sorte data, export data +//TODO: load session file, store session, load log data file, store data, export data class FileBar : public QToolBar, public IUiWindow { Q_OBJECT diff --git a/DSView/pv/toolbars/logobar.h b/DSView/pv/toolbars/logobar.h index 19fea7fde..4c7456ea0 100644 --- a/DSView/pv/toolbars/logobar.h +++ b/DSView/pv/toolbars/logobar.h @@ -49,7 +49,7 @@ class LogoBar : public QToolBar, public IUiWindow void enable_toggle(bool enable); - //show the hardware device conneted status with logo picture + //show the hardware device connected status with logo picture void dsl_connected(bool conn); inline void set_mainform_callback(IMainForm *callback){ diff --git a/DSView/pv/toolbars/samplingbar.cpp b/DSView/pv/toolbars/samplingbar.cpp index d82a3b5b4..6c000406f 100644 --- a/DSView/pv/toolbars/samplingbar.cpp +++ b/DSView/pv/toolbars/samplingbar.cpp @@ -1126,7 +1126,7 @@ namespace pv if (array == NULL) { - dsv_err("Get deivce list error!"); + dsv_err("Get device list error!"); return; } diff --git a/DSView/pv/toolbars/trigbar.h b/DSView/pv/toolbars/trigbar.h index 95d18380f..d845dc4de 100644 --- a/DSView/pv/toolbars/trigbar.h +++ b/DSView/pv/toolbars/trigbar.h @@ -38,7 +38,7 @@ class SigSession; namespace toolbars { -//boolbar, referenced by MainWindow +//toolbar, referenced by MainWindow //TODO:show the property panel about protocol\trigger class TrigBar : public QToolBar, public IUiWindow { diff --git a/DSView/pv/ui/langresource.cpp b/DSView/pv/ui/langresource.cpp index b0ce66a84..cf2b88661 100644 --- a/DSView/pv/ui/langresource.cpp +++ b/DSView/pv/ui/langresource.cpp @@ -168,7 +168,7 @@ void LangResource::load_page(Lang_resource_page &p, QString file) if (raw_bytes.length() == 0) return; - //dsv_info("Load lang resouce file: %s", file.toLocal8Bit().data()); + //dsv_info("Load lang resource file: %s", file.toLocal8Bit().data()); QJsonParseError error; QString jsonStr(raw_bytes.data()); diff --git a/DSView/pv/view/analogsignal.h b/DSView/pv/view/analogsignal.h index e30748148..df9fee09e 100644 --- a/DSView/pv/view/analogsignal.h +++ b/DSView/pv/view/analogsignal.h @@ -33,7 +33,7 @@ class AnalogSnapshot; namespace view { -//when device is data acquisition model, to draw signal trace +//when device is data acquisition mode, to draw signal trace //created by SigSession class AnalogSignal : public Signal { diff --git a/DSView/pv/view/decodetrace.h b/DSView/pv/view/decodetrace.h index 29ebe571d..8648c7fe2 100644 --- a/DSView/pv/view/decodetrace.h +++ b/DSView/pv/view/decodetrace.h @@ -179,7 +179,7 @@ private slots: void on_decode_done(); public: - volatile bool _delete_flag; //destroy it when deocde task end + volatile bool _delete_flag; //destroy it when decode task end private: pv::SigSession *_session; diff --git a/DSView/pv/view/devmode.h b/DSView/pv/view/devmode.h index 27b5355c4..9cab926cb 100644 --- a/DSView/pv/view/devmode.h +++ b/DSView/pv/view/devmode.h @@ -50,7 +50,7 @@ class SigSession; namespace view { -//devece work mode select list +//device work mode select list class DevMode : public QWidget, public IUiWindow { Q_OBJECT diff --git a/DSView/pv/view/dsldial.h b/DSView/pv/view/dsldial.h index 3ea02363f..99487c42e 100644 --- a/DSView/pv/view/dsldial.h +++ b/DSView/pv/view/dsldial.h @@ -29,7 +29,7 @@ namespace pv { namespace view { -//when device is oscilloscope model, to draw the dail on the left +//when device is oscilloscope mode, to draw the dial on the left //created by DsoSignal class dslDial : public QObject { diff --git a/DSView/pv/view/dsosignal.h b/DSView/pv/view/dsosignal.h index 660c9bb7e..57f3c097d 100644 --- a/DSView/pv/view/dsosignal.h +++ b/DSView/pv/view/dsosignal.h @@ -33,7 +33,7 @@ class DsoSnapshot; namespace view { -//when device is oscilloscope model,to draw trace +//when device is oscilloscope mode, to draw trace //created by SigSession class DsoSignal : public Signal { diff --git a/DSView/pv/view/header.cpp b/DSView/pv/view/header.cpp index 0fab4b6c0..6a2296cf9 100644 --- a/DSView/pv/view/header.cpp +++ b/DSView/pv/view/header.cpp @@ -216,7 +216,7 @@ void Header::mousePressEvent(QMouseEvent *event) for(auto t : traces){ if (t->signal_type() == SR_CHANNEL_LOGIC && _view.session().is_working()){ - // Disable set trigger from left pannel when capturing. + // Disable set trigger from left panel when capturing. break; } if (t->mouse_press(width(), event->pos())) @@ -415,7 +415,7 @@ void Header::mouseMoveEvent(QMouseEvent *event) assert(event); if (_view.session().is_working() && _view.session().get_device()->get_work_mode() == LOGIC){ - //Disable the hover status of trig button on left pannel. + //Disable the hover status of trig button on left panel. return; } diff --git a/DSView/pv/view/spectrumtrace.h b/DSView/pv/view/spectrumtrace.h index 83c5ccd49..431d315a2 100644 --- a/DSView/pv/view/spectrumtrace.h +++ b/DSView/pv/view/spectrumtrace.h @@ -40,7 +40,7 @@ class SpectrumStack; namespace view { -//when device is oscillcopse mode, to draw signal trace +//when device is oscilloscope mode, to draw signal trace //created by SigSession class SpectrumTrace : public Trace { diff --git a/DSView/pv/view/trace.h b/DSView/pv/view/trace.h index d05c8fb95..d89c0ae0b 100644 --- a/DSView/pv/view/trace.h +++ b/DSView/pv/view/trace.h @@ -304,7 +304,7 @@ class Trace : public SelectableItem QColor get_text_colour(); /** - * Paints optoins for different trace type. + * Paints options for different trace type. * @param p the QPainter to paint into. * @param right the x-coordinate of the right edge of the header * area. @@ -315,7 +315,7 @@ class Trace : public SelectableItem private: /** - * Computes an caches the size of the label text. + * Computes and caches the size of the label text. */ void compute_text_size(QPainter &p); diff --git a/DSView/pv/view/view.h b/DSView/pv/view/view.h index aa738ecd9..c4239c470 100644 --- a/DSView/pv/view/view.h +++ b/DSView/pv/view/view.h @@ -251,7 +251,7 @@ class View : public QScrollArea, public IUiWindow void scroll_to_logic_last_data_time(); /* - * horizental cursors + * horizontal cursors */ inline bool xcursors_shown(){ return _show_xcursors; @@ -305,7 +305,7 @@ class View : public QScrollArea, public IUiWindow } /* - * untils + * utils */ double index2pixel(uint64_t index, bool has_hoff = true); uint64_t pixel2index(double pixel); diff --git a/DSView/pv/view/viewport.cpp b/DSView/pv/view/viewport.cpp index dea3b912f..317ca3c0a 100644 --- a/DSView/pv/view/viewport.cpp +++ b/DSView/pv/view/viewport.cpp @@ -469,7 +469,7 @@ void Viewport::paintSignals(QPainter &p, QColor fore, QColor back) if (_view.session().get_device()->is_hardware()) { if (_view.session().dso_data_is_out_off_range()){ - QString data_status = L_S(STR_PAGE_DLG, S_ID(IDS_DLG_DATA_OUT_OFF_RANGE), "Out off range"); + QString data_status = L_S(STR_PAGE_DLG, S_ID(IDS_DLG_DATA_OUT_OFF_RANGE), "Out of range"); data_status += "! "; p.setPen(QColor(255,0,0,200)); p.drawText(_view.get_view_rect(), Qt::AlignRight | Qt::AlignTop, data_status); diff --git a/DSView/pv/winnativewidget.cpp b/DSView/pv/winnativewidget.cpp index c6a2aa509..644bf06bb 100644 --- a/DSView/pv/winnativewidget.cpp +++ b/DSView/pv/winnativewidget.cpp @@ -168,7 +168,7 @@ WinNativeWidget::WinNativeWidget(const int x, const int y, const int width, if (!_hWnd) { - dsv_info("ERROR: can't create naitive window"); + dsv_info("ERROR: can't create native window"); assert(false); } @@ -213,7 +213,7 @@ void WinNativeWidget::SetChildWidget(MainFrame *w) } else if (_shadow != NULL){ _shadow->hideShadow(); - _shadow->close(); //Set null, the applictoin will exit. + _shadow->close(); //Set null, the application will exit. UninitCapturePowerEvent(); } @@ -299,7 +299,7 @@ LRESULT CALLBACK WinNativeWidget::WndProc(HWND hWnd, UINT message, WPARAM wParam } case WM_NCACTIVATE: { - // Is activing. + // Is activating. if (wParam){ return 0; } @@ -312,7 +312,7 @@ LRESULT CALLBACK WinNativeWidget::WndProc(HWND hWnd, UINT message, WPARAM wParam return 0; } - //Is the foreground window, but is not actived, maybe opening a child dialog. + //Is the foreground window, but is not active, maybe opening a child dialog. SetWindowRedraw(hWnd, FALSE); LRESULT result = DefWindowProc(hWnd, message, wParam, lParam); SetWindowRedraw(hWnd, TRUE); diff --git a/DSView/pv/winshadow.cpp b/DSView/pv/winshadow.cpp index 8b806d766..733672cba 100644 --- a/DSView/pv/winshadow.cpp +++ b/DSView/pv/winshadow.cpp @@ -180,7 +180,7 @@ void WinShadow::moveShadow() void WinShadow::paintEvent(QPaintEvent *event) { - // The shandow is hiden. + // The shadow is hidden. if (!m_bActived){ return; } diff --git a/common/log/xlog.c b/common/log/xlog.c index 96d929f02..2022ce722 100644 --- a/common/log/xlog.c +++ b/common/log/xlog.c @@ -254,7 +254,7 @@ XLOG_API int xlog_add_receiver(xlog_context* ctx, xlog_receive_callback rev, int /** * append a log data receiver, return 0 if success. - * the log data will be writed to file. + * the log data will be written to file. */ XLOG_API int xlog_add_receiver_from_file(xlog_context* ctx, const char *file_path, int *out_index, int bAppend) { @@ -508,7 +508,7 @@ XLOG_API int xlog_set_domain(xlog_writer* wr, const char *domain) //-------------------------------------------------print api /** - * print a error message, return 0 if success. + * print an error message, return 0 if success. */ XLOG_API int xlog_err(xlog_writer *wr, const char *format, ...) { @@ -580,7 +580,7 @@ XLOG_API int xlog_warn(xlog_writer *wr, const char *format, ...) } /** - * print a informational message, return 0 if success. + * print an informational message, return 0 if success. */ XLOG_API int xlog_info(xlog_writer *wr, const char *format, ...) { diff --git a/common/log/xlog.h b/common/log/xlog.h index 249f080f1..820fe0e70 100644 --- a/common/log/xlog.h +++ b/common/log/xlog.h @@ -24,7 +24,7 @@ * xlog_context *ctx = xlog_new(); * xlog_writer *wr = xlog_create_writer(ctx, "module name"); * xlog_err(wr, "count:%d", 100); -* xlog_free(ctx); //free the context, all writer will can't to use +* xlog_free(ctx); //free the context, all writers can no longer be used */ #ifndef _X_LOG_H_ @@ -77,7 +77,7 @@ XLOG_API xlog_context* xlog_new2(int bConsole); /** * free a log context, return 0 if success. - * and all xlog_writer will be can't to use. + * and all xlog_writers can no longer be used. */ XLOG_API void xlog_free(xlog_context* ctx); @@ -88,7 +88,7 @@ XLOG_API int xlog_add_receiver(xlog_context* ctx, xlog_receive_callback rev, int /** * append a log data receiver, return 0 if success. - * the log data will be writed to file. + * the log data will be written to file. */ XLOG_API int xlog_add_receiver_from_file(xlog_context* ctx, const char *file_path, int *out_index, int bAppend); @@ -142,7 +142,7 @@ XLOG_API int xlog_set_domain(xlog_writer* wr, const char *domain); //-------------------------------------------------print api /** - * print a error message, return 0 if success. + * print an error message, return 0 if success. */ XLOG_API int xlog_err(xlog_writer *wr, const char *format, ...); @@ -152,7 +152,7 @@ XLOG_API int xlog_err(xlog_writer *wr, const char *format, ...); XLOG_API int xlog_warn(xlog_writer *wr, const char *format, ...); /** - * print a informational message, return 0 if success. + * print an informational message, return 0 if success. */ XLOG_API int xlog_info(xlog_writer *wr, const char *format, ...); diff --git a/lang/en/dlg.json b/lang/en/dlg.json index 7347a2621..b46f6df16 100644 --- a/lang/en/dlg.json +++ b/lang/en/dlg.json @@ -209,7 +209,7 @@ }, { "id": "IDS_DLG_SUBSTRACT", - "text": "Substract" + "text": "Subtract" }, { "id": "IDS_DLG_MULTIPLY", @@ -721,7 +721,7 @@ }, { "id": "IDS_DLG_DATA_OUT_OFF_RANGE", - "text": "Data out off range" + "text": "Data out of range" }, { "id": "IDS_DLG_START_CURSOR", diff --git a/lang/en/msg.json b/lang/en/msg.json index 42610cc57..7847bdfef 100644 --- a/lang/en/msg.json +++ b/lang/en/msg.json @@ -109,7 +109,7 @@ }, { "id": "IDS_MSG_MAX_CHANNEL_COUNT_WARNING", - "text": "Current mode only suppport max {0} channels!" + "text": "Current mode only support max {0} channels!" }, { "id": "IDS_MSG_TRI_SET_ISSUE", @@ -177,7 +177,7 @@ }, { "id": "IDS_MSG_SET_TRI_MULTI_CHANNEL", - "text": "Trigger setted on multiple channels!\nCapture will Only triggered when all setted channels fullfill at one sample" + "text": "Trigger set on multiple channels!\nCapture will Only triggered when all set channels fulfill at one sample" }, { "id": "IDS_MSG_NOT_SHOW_AGAIN", diff --git a/libsigrok4DSL/hardware/DSL/dscope.c b/libsigrok4DSL/hardware/DSL/dscope.c index 591b46ef0..274db525d 100644 --- a/libsigrok4DSL/hardware/DSL/dscope.c +++ b/libsigrok4DSL/hardware/DSL/dscope.c @@ -287,7 +287,7 @@ static GSList *scan(GSList *options) if (prof == NULL){ isProduct = 0; - //Mybe is a dslogic device. + //Maybe is a dslogic device. for (j = 0; supported_DSLogic[j].vid; j++) { if (des.idVendor == supported_DSLogic[j].vid && @@ -377,7 +377,7 @@ static GSList *scan(GSList *options) libusb_unref_device(device_handle); #endif - sr_info("Waitting for device reconnect, name:\"%s\"", prof->model); + sr_info("Waiting for device reconnect, name:\"%s\"", prof->model); } } @@ -1040,7 +1040,7 @@ static int dso_zero(const struct sr_dev_inst *sdi, gboolean reset) probe->vdiv = vdiv_back[probe->index]; ret = dsl_wr_dso(sdi, dso_cmd_gen(sdi, probe, SR_CONF_PROBE_VDIV)); - // vgain tunning + // vgain tuning if (devc->profile->dev_caps.feature_caps & CAPS_FEATURE_AUTO_VGAIN) { if (probe->vga_ptr != NULL) { for (uint16_t i = 0; devc->profile->dev_caps.vdivs[i]; i++) { @@ -1305,7 +1305,7 @@ static int config_set(int id, GVariant *data, struct sr_dev_inst *sdi, //devc->trigger_hpos = devc->trigger_hrate * dsl_en_ch_num(sdi) * devc->limit_samples / 200.0; /* * devc->trigger_hpos should be updated before each acquisition - * because the samplelimits may changed + * because the samplelimits may change */ devc->trigger_hpos = devc->trigger_hrate * dsl_en_ch_num(sdi) * devc->limit_samples / 200.0; if ((ret = dsl_wr_dso(sdi, dso_cmd_gen(sdi, NULL, SR_CONF_HORIZ_TRIGGERPOS))) == SR_OK) @@ -1595,7 +1595,7 @@ static int config_set(int id, GVariant *data, struct sr_dev_inst *sdi, struct sr_channel *probe = (struct sr_channel *)l->data; if (!dso_load_eep(sdi, probe, FALSE)) { config_set(SR_CONF_ZERO, g_variant_new_boolean(TRUE), sdi, NULL, NULL); - sr_info("Zero have not been setted!"); + sr_info("Zero has not been set!"); break; } } @@ -1853,7 +1853,7 @@ static int dev_open(struct sr_dev_inst *sdi) struct DSL_context *devc = sdi->priv; if ((ret = dsl_dev_open(di, sdi, &fpga_done)) == SR_OK) { - // load zero informations + // load zero information for(l = sdi->channels; l; l = l->next) { struct sr_channel *probe = (struct sr_channel *)l->data; zeroed = dso_load_eep(sdi, probe, fpga_done); @@ -1862,7 +1862,7 @@ static int dev_open(struct sr_dev_inst *sdi) } if (!zeroed) { config_set(SR_CONF_ZERO, g_variant_new_boolean(TRUE), sdi, NULL, NULL); - sr_info("Zero have not been setted!"); + sr_info("Zero has not been set!"); } if (!fpga_done) { if (devc->profile->dev_caps.feature_caps & CAPS_FEATURE_HMCAD1511) { diff --git a/libsigrok4DSL/hardware/DSL/dsl.c b/libsigrok4DSL/hardware/DSL/dsl.c index d80e59b0e..9f7ae74b5 100644 --- a/libsigrok4DSL/hardware/DSL/dsl.c +++ b/libsigrok4DSL/hardware/DSL/dsl.c @@ -237,7 +237,7 @@ SR_PRIV int dsl_en_ch_num(const struct sr_dev_inst *sdi) } /** - * Check the USB configuration to determine if this is an dsl device. + * Check the USB configuration to determine if this is a dsl device. * * @return TRUE if the device's configuration profile match dsl hardware * configuration, FALSE otherwise. @@ -265,7 +265,7 @@ SR_PRIV gboolean dsl_check_conf_profile(libusb_device *dev) if ((ret = libusb_open(dev, &hdl)) < 0){ sr_err("%s:%d, Failed to open device: %s", __func__, __LINE__, libusb_error_name(ret)); - // Mybe the device is busy, add it to list. + // Maybe the device is busy, add it to list. return TRUE; } @@ -289,7 +289,7 @@ SR_PRIV gboolean dsl_check_conf_profile(libusb_device *dev) if (strncmp((const char *)strdesc, "USB-based DSL Instrument v2", 27)) break; - /* If we made it here, it must be an dsl device. */ + /* If we made it here, it must be a dsl device. */ bSucess = TRUE; } @@ -1056,7 +1056,7 @@ SR_PRIV int dsl_fpga_arm(const struct sr_dev_inst *sdi) if (trigger == NULL) { - sr_err("Trigger have'nt inited."); + sr_err("Trigger hasn't been inited."); return SR_ERR_CALL_STATUS; } @@ -1230,7 +1230,7 @@ SR_PRIV int dsl_fpga_arm(const struct sr_dev_inst *sdi) sr_err("Sent bulk write command of arm FPGA failed."); return SR_ERR; } - // check sys_clr dessert + // check sys_clr deassert rd_cmd.header.dest = DSL_CTL_HW_STATUS; rd_cmd.header.size = 1; rd_cmd_data = 0; @@ -1253,7 +1253,7 @@ SR_PRIV int dsl_fpga_arm(const struct sr_dev_inst *sdi) libusb_error_name(ret)); return SR_ERR; } else if (transferred != sizeof(struct DSL_setting)) { - sr_err("Arm FPGA error: expacted transfer size %d; actually %d", + sr_err("Arm FPGA error: expected transfer size %d; actually %d", sizeof(struct DSL_setting), transferred); return SR_ERR; } @@ -1268,7 +1268,7 @@ SR_PRIV int dsl_fpga_arm(const struct sr_dev_inst *sdi) libusb_error_name(ret)); return SR_ERR; } else if (transferred != sizeof(struct DSL_setting_ext32)) { - sr_err("Arm FPGA(setting_ext32) error: expacted transfer size %d; actually %d", + sr_err("Arm FPGA(setting_ext32) error: expected transfer size %d; actually %d", sizeof(struct DSL_setting_ext32), transferred); return SR_ERR; } @@ -1352,7 +1352,7 @@ SR_PRIV int dsl_fpga_config(struct libusb_device_handle *hdl, const char *filena return SR_ERR; } - // step2: assert PORG_B high + // step2: assert PROG_B high wr_cmd.header.dest = DSL_CTL_PROG_B; wr_cmd.header.size = 1; wr_cmd.data[0] = bmWR_PROG_B; @@ -1432,7 +1432,7 @@ SR_PRIV int dsl_fpga_config(struct libusb_device_handle *hdl, const char *filena libusb_error_name(ret)); return SR_ERR; } else if (transferred != chunksize) { - sr_err("Configure FPGA error: expacted transfer size %d; actually %d.", + sr_err("Configure FPGA error: expected transfer size %d; actually %d.", chunksize, transferred); return SR_ERR; } @@ -1927,7 +1927,7 @@ SR_PRIV int dsl_dev_open(struct sr_dev_driver *di, struct sr_dev_inst *sdi, gboo } } else { - ret = dsl_wr_reg(sdi, CTR0_ADDR, bmNONE); // dessert clear + ret = dsl_wr_reg(sdi, CTR0_ADDR, bmNONE); // deassert clear /* Check HDL version */ ret = dsl_hdl_version(sdi, &hw_info); @@ -1940,7 +1940,7 @@ SR_PRIV int dsl_dev_open(struct sr_dev_driver *di, struct sr_dev_inst *sdi, gboo } if (hw_info != DSL_HDL_VERSION) { - sr_err("%s: HDL verison incompatible! device:%02X, target:%02X", __func__, + sr_err("%s: HDL version incompatible! device:%02X, target:%02X", __func__, hw_info, DSL_HDL_VERSION); ds_set_last_error(SR_ERR_DEVICE_FIRMWARE_VERSION_LOW); sdi->status = SR_ST_INCOMPATIBLE; @@ -1951,7 +1951,7 @@ SR_PRIV int dsl_dev_open(struct sr_dev_driver *di, struct sr_dev_inst *sdi, gboo // check security uint16_t encryption[SECU_STEPS]; - ret = dsl_wr_reg(sdi, CTR0_ADDR, bmNONE); // dessert clear + ret = dsl_wr_reg(sdi, CTR0_ADDR, bmNONE); // deassert clear if (dsl_rd_nvm(sdi, (unsigned char *)encryption, SECU_EEP_ADDR, SECU_STEPS*2) != SR_OK) { sr_err("%s:%d, Read EEPROM content failed!", __func__, __LINE__); @@ -2603,7 +2603,7 @@ SR_PRIV int sr_option_value_to_code(int config_id, const char *value, const stru p++; } - sr_err("Unkown lang text value:%s,config id:%d", value, config_id); + sr_err("Unknown lang text value:%s,config id:%d", value, config_id); return -1; } diff --git a/libsigrok4DSL/hardware/DSL/dsl.h b/libsigrok4DSL/hardware/DSL/dsl.h index b06dab646..43fff8af2 100644 --- a/libsigrok4DSL/hardware/DSL/dsl.h +++ b/libsigrok4DSL/hardware/DSL/dsl.h @@ -53,7 +53,7 @@ #define CAPS_FEATURE_BUF (1 << 1) // pre offset control #define CAPS_FEATURE_PREOFF (1 << 2) -// small startup eemprom +// small startup eeprom #define CAPS_FEATURE_SEEP (1 << 3) // zero calibration ability #define CAPS_FEATURE_ZERO (1 << 4) @@ -71,7 +71,7 @@ #define CAPS_FEATURE_FLASH (1 << 10) // 32 channels #define CAPS_FEATURE_LA_CH32 (1 << 11) -// auto tunning vgain +// auto tuning vgain #define CAPS_FEATURE_AUTO_VGAIN (1 << 12) // max 2.5v fpga threshold #define CAPS_FEATURE_MAX25_VTH (1 << 13) @@ -129,7 +129,7 @@ * for DSCope device * trans: x << 8 + y * x = vpos(coarse), each step(1024 total) indicate x(mv) at 1/20 attenuation, and x/10(mv) at 1/2 attenuation - * y = voff(fine), each step(1024 total) indicate y/100(mv) at 1/20 attenuation, adn y/1000(mv) at 1/2 attenuation + * y = voff(fine), each step(1024 total) indicate y/100(mv) at 1/20 attenuation, and y/1000(mv) at 1/2 attenuation * voff: x << 10 + y * x = vpos(coarse) default bias * y = voff(fine) default bias diff --git a/libsigrok4DSL/hardware/DSL/dslogic.c b/libsigrok4DSL/hardware/DSL/dslogic.c index 777341ad6..ec0bbf9f9 100644 --- a/libsigrok4DSL/hardware/DSL/dslogic.c +++ b/libsigrok4DSL/hardware/DSL/dslogic.c @@ -355,7 +355,7 @@ static GSList *scan(GSList *options) continue; } - /* Check manufactory id and product id, and speed type. */ + /* Check manufacturer id and product id, and speed type. */ prof = NULL; for (j = 0; supported_DSLogic[j].vid; j++) { @@ -372,7 +372,7 @@ static GSList *scan(GSList *options) if (prof == NULL){ isProduct = 0; - //Mybe is a dscope device. + //Maybe is a dscope device. for (j = 0; supported_DSCope[j].vid; j++) { if (des.idVendor == supported_DSCope[j].vid && @@ -462,7 +462,7 @@ static GSList *scan(GSList *options) libusb_unref_device(device_handle); #endif - sr_info("Waitting for device reconnect, name:\"%s\"", prof->model); + sr_info("Waiting for device reconnect, name:\"%s\"", prof->model); } } @@ -843,7 +843,7 @@ static int config_set(int id, GVariant *data, struct sr_dev_inst *sdi, //devc->trigger_hpos = devc->trigger_hrate * dsl_en_ch_num(sdi) * devc->limit_samples / 200.0; /* * devc->trigger_hpos should be updated before each acquisition - * because the samplelimits may changed + * because the samplelimits may change */ devc->trigger_hpos = devc->trigger_hrate * dsl_en_ch_num(sdi) * devc->limit_samples / 200.0; if ((ret = dsl_wr_dso(sdi, dso_cmd_gen(sdi, NULL, SR_CONF_HORIZ_TRIGGERPOS))) == SR_OK) @@ -1567,7 +1567,7 @@ SR_PRIV int sr_dslogic_option_value_to_code(const struct sr_dev_inst *sdi, int c } } - sr_err("Unkown text value:%s, config id:%d", value, config_id); + sr_err("Unknown text value:%s, config id:%d", value, config_id); return -1; } diff --git a/libsigrok4DSL/hardware/demo/demo.c b/libsigrok4DSL/hardware/demo/demo.c index 877ae31d1..2122f73bc 100644 --- a/libsigrok4DSL/hardware/demo/demo.c +++ b/libsigrok4DSL/hardware/demo/demo.c @@ -440,7 +440,7 @@ static int get_pattern_mode_from_file(const char *sub_dir, struct demo_mode_patt dir = g_dir_open(dir_path,0,NULL); if(dir == NULL) { - sr_err("Faild to open dir:%s", dir_path); + sr_err("Failed to open dir:%s", dir_path); return SR_ERR; } @@ -2024,7 +2024,7 @@ static int receive_data_dso(int fd, int revents, const struct sr_dev_inst *sdi) if (unzLocateFile(vdev->archive, file_name, 0) != UNZ_OK) { - sr_err("cant't locate zip inner file:\"%s\"", file_name); + sr_err("can't locate zip inner file:\"%s\"", file_name); send_error_packet(sdi, vdev, &packet); return FALSE; } @@ -2074,7 +2074,7 @@ static int receive_data_dso(int fd, int revents, const struct sr_dev_inst *sdi) // Read the data to buffer. if (unzOpenCurrentFile(vdev->archive) != UNZ_OK) { - sr_err("cant't open zip inner file:\"%s\"", file_name); + sr_err("can't open zip inner file:\"%s\"", file_name); send_error_packet(sdi, vdev, &packet); return FALSE; } @@ -2566,7 +2566,7 @@ static int load_virtual_device_session(struct sr_dev_inst *sdi) } if (unzOpenCurrentFile(archive) != UNZ_OK) { - sr_err("%s: Cant't open zip inner file.", __func__); + sr_err("%s: Can't open zip inner file.", __func__); unzClose(archive); return SR_ERR; } diff --git a/libsigrok4DSL/hardware/demo/demo.h b/libsigrok4DSL/hardware/demo/demo.h index 4d8753577..baa9cbf71 100644 --- a/libsigrok4DSL/hardware/demo/demo.h +++ b/libsigrok4DSL/hardware/demo/demo.h @@ -96,7 +96,7 @@ #define ANALOG_RETE(n) ((n/SR_HZ(10))) -//defult value +//default value #define LOGIC_DEFAULT_SAMPLERATE SR_MHZ(1) #define LOGIC_DEFAULT_TOTAL_SAMPLES SR_MHZ(1) #define LOGIC_DEFAULT_NUM_PROBE 16 diff --git a/libsigrok4DSL/lib_main.c b/libsigrok4DSL/lib_main.c index 054cddd9f..3eb015179 100644 --- a/libsigrok4DSL/lib_main.c +++ b/libsigrok4DSL/lib_main.c @@ -565,7 +565,7 @@ SR_API int ds_device_from_file(const char *file_path) } /** - * Get the decive supports work mode, mode list: LOGIC、ANALOG、DSO + * Get the work modes the device supports, mode list: LOGIC, ANALOG, DSO * return type see struct sr_dev_mode. */ SR_API const GSList *ds_get_actived_device_mode_list() @@ -576,7 +576,7 @@ SR_API const GSList *ds_get_actived_device_mode_list() if (dev == NULL) { - sr_err("Have no actived device."); + sr_err("Have no active device."); } if (dev->driver == NULL || dev->driver->dev_mode_list == NULL) { @@ -588,7 +588,7 @@ SR_API const GSList *ds_get_actived_device_mode_list() } /** - * Remove one device from the list, and destory it. + * Remove one device from the list, and destroy it. * User need to call ds_get_device_list() to get the new list. */ SR_API int ds_remove_device(ds_device_handle handle) @@ -646,8 +646,8 @@ SR_API int ds_remove_device(ds_device_handle handle) } /** - * Get the actived device info. - * If the actived device is not exists, the handle filed will be set null. + * Get the active device info. + * If the active device does not exist, the handle field will be set null. */ SR_API int ds_get_actived_device_info(struct ds_device_full_info *fill_info) { @@ -699,7 +699,7 @@ SR_API int ds_get_actived_device_info(struct ds_device_full_info *fill_info) } /** - * Get actived device work model. mode list:LOGIC、ANALOG、DSO + * Get the active device work mode. mode list: LOGIC, ANALOG, DSO */ SR_API int ds_get_actived_device_mode() { @@ -745,7 +745,7 @@ SR_API int ds_start_collect() } if (ds_channel_is_enabled() == 0) { - sr_err("There have no useable channel, unable to collect."); + sr_err("There have no usable channel, unable to collect."); return SR_ERR_CALL_STATUS; } if (lib_ctx.data_forward_callback == NULL) @@ -882,13 +882,13 @@ SR_API int ds_release_actived_device() if (lib_ctx.actived_device_instance->dev_type == DEV_TYPE_USB) { - sr_info("Release current actived device. name:\"%s\", handle:%p", + sr_info("Release current active device. name:\"%s\", handle:%p", lib_ctx.actived_device_instance->name, lib_ctx.actived_device_instance->handle); } else { - sr_info("Release current actived device. name:\"%s\"", + sr_info("Release current active device. name:\"%s\"", lib_ctx.actived_device_instance->name); } @@ -940,7 +940,7 @@ SR_API int ds_get_actived_device_config(const struct sr_channel *ch, { if (lib_ctx.actived_device_instance == NULL) { - sr_err("Have no actived device."); + sr_err("Have no active device."); return SR_ERR_CALL_STATUS; } @@ -958,7 +958,7 @@ SR_API int ds_set_actived_device_config(const struct sr_channel *ch, { if (lib_ctx.actived_device_instance == NULL) { - sr_err("Have no actived device."); + sr_err("Have no active device."); return SR_ERR_CALL_STATUS; } @@ -975,7 +975,7 @@ SR_API int ds_get_actived_device_config_list(const struct sr_channel_group *cg, { if (lib_ctx.actived_device_instance == NULL) { - sr_err("Have no actived device."); + sr_err("Have no active device."); return SR_ERR_CALL_STATUS; } @@ -990,7 +990,7 @@ SR_API const struct sr_config_info *ds_get_actived_device_config_info(int key) { if (lib_ctx.actived_device_instance == NULL) { - sr_err("Have no actived device."); + sr_err("Have no active device."); return NULL; } @@ -1001,7 +1001,7 @@ SR_API int ds_get_actived_device_status(struct sr_status *status, gboolean prg) { if (lib_ctx.actived_device_instance == NULL) { - sr_err("Have no actived device."); + sr_err("Have no active device."); return SR_ERR_CALL_STATUS; } @@ -1267,7 +1267,7 @@ static void hotplug_event_listen_callback(struct libusb_context *ctx, struct lib if (lib_ctx.detach_device_handle == NULL) { - sr_err("The detached device handle is null, but the status is waitting for reconnect."); + sr_err("The detached device handle is null, but the status is waiting for reconnect."); } else { @@ -1285,7 +1285,7 @@ static void hotplug_event_listen_callback(struct libusb_context *ctx, struct lib } if (bDone == 0) { - lib_ctx.attach_event_flag = 1; // Is a new device attched. + lib_ctx.attach_event_flag = 1; // Is a new device attached. lib_ctx.attach_device_handle = dev; } lib_ctx.is_waitting_reconnect = 0; @@ -1381,7 +1381,7 @@ static void process_attach_event(int isEvent) drivers++; } - // Tell user one new device attched, and the list is updated. + // Tell user one new device attached, and the list is updated. if (num > 0 && isEvent){ post_event_async(DS_EV_NEW_DEVICE_ATTACH); } @@ -1496,7 +1496,7 @@ static gpointer usb_hotplug_process_proc(gpointer data) if (lib_ctx.callback_thread_count > 0) { - sr_info("%d callback thread is actived, waiting all ends...", lib_ctx.callback_thread_count); + sr_info("%d callback thread is active, waiting all ends...", lib_ctx.callback_thread_count); } // Wait all callback thread end. diff --git a/libsigrok4DSL/libsigrok-internal.h b/libsigrok4DSL/libsigrok-internal.h index a5534c0cd..445269473 100644 --- a/libsigrok4DSL/libsigrok-internal.h +++ b/libsigrok4DSL/libsigrok-internal.h @@ -397,7 +397,7 @@ SR_PRIV struct sr_session *sr_session_new(void); SR_PRIV int sr_session_destroy(void); /** - * Create a virtual deivce from file. + * Create a virtual device from file. */ SR_PRIV int sr_new_virtual_device(const char *filename, struct sr_dev_inst **out_di); diff --git a/libsigrok4DSL/libsigrok.h b/libsigrok4DSL/libsigrok.h index 28d8a0caf..5ab224d2b 100644 --- a/libsigrok4DSL/libsigrok.h +++ b/libsigrok4DSL/libsigrok.h @@ -255,7 +255,7 @@ enum { * a unitless quantity, for example. */ SR_UNIT_UNITLESS, - /** Sound pressure level relative so 20 micropascals. */ + /** Sound pressure level relative to 20 micropascals. */ SR_UNIT_DECIBEL_SPL, /** * Normalized (0 to 1) concentration of a substance or compound with 0 @@ -497,7 +497,7 @@ struct sr_input_format { * the responsibility of the caller to free it later. * @param filename The name (and path) of the file to use. * - * @return SR_OK upon succcess, a negative error code upon failure. + * @return SR_OK upon success, a negative error code upon failure. */ int (*loadfile) (struct sr_input *in, const char *filename); }; @@ -604,7 +604,7 @@ struct sr_output_module { int (*init) (struct sr_output *o, GHashTable *options); /** - * This function is passed a copy of every packed in the data feed. + * This function is passed a copy of every packet in the data feed. * Any output generated by the output module in response to the * packet should be returned in a newly allocated GString * out, which will be freed by the caller. @@ -852,7 +852,7 @@ enum sr_config_option_id /** The device supports Run Length Encoding. */ SR_CONF_RLE = 30008, - /** Need wait to uplad captured data */ + /** Need wait to upload captured data */ SR_CONF_WAIT_UPLOAD = 30009, /** The device supports setting trigger slope. */ @@ -1105,7 +1105,7 @@ enum sr_device_status { SR_ST_INITIALIZING, /** The device instance is live, but not in use. */ SR_ST_INACTIVE, - /** The device instance has an imcompatible firmware */ + /** The device instance has an incompatible firmware */ SR_ST_INCOMPATIBLE, /** The device instance is actively in use in a session. */ SR_ST_ACTIVE, @@ -1437,25 +1437,25 @@ SR_API int ds_have_actived_device(); SR_API int ds_device_from_file(const char *file_path); /** - * Remove one device from the list, and destory it. + * Remove one device from the list, and destroy it. * User need to call ds_get_device_list() to get the new list. */ SR_API int ds_remove_device(ds_device_handle handle); /** - * Get the decive supports work mode, mode list: LOGIC、ANALOG、DSO + * Get the work modes the device supports, mode list: LOGIC, ANALOG, DSO * return type see struct sr_dev_mode. */ SR_API const GSList *ds_get_actived_device_mode_list(); /** - * Get the actived device info. - * If the actived device is not exists, the handle filed will be set null. + * Get the active device info. + * If the active device does not exist, the handle field will be set null. */ SR_API int ds_get_actived_device_info(struct ds_device_full_info *fill_info); /** - * Get actived device work model. mode list:LOGIC、ANALOG、DSO + * Get the active device work mode. mode list: LOGIC, ANALOG, DSO */ SR_API int ds_get_actived_device_mode(); @@ -1475,7 +1475,7 @@ SR_API int ds_stop_collect(); SR_API int ds_is_collecting(); /** - * Close the actived device, and stop collect. + * Close the active device, and stop collect. */ SR_API int ds_release_actived_device(); @@ -1522,7 +1522,7 @@ SR_API int ds_enable_device_channel_index(int ch_index, gboolean enable); SR_API int ds_set_device_channel_name(int ch_index, const char *name); /** - * heck that at least one probe is enabled + * check that at least one probe is enabled */ int ds_channel_is_enabled(); diff --git a/libsigrok4DSL/session.c b/libsigrok4DSL/session.c index 1279e2be5..4bcaf89a9 100644 --- a/libsigrok4DSL/session.c +++ b/libsigrok4DSL/session.c @@ -72,7 +72,7 @@ SR_PRIV struct sr_session *sr_session_new(void) { if (session != NULL){ sr_detail("Destroy the old session."); - sr_session_destroy(); // Destory the old. + sr_session_destroy(); // Destroy the old. } session = g_try_malloc0(sizeof(struct sr_session)); diff --git a/libsigrok4DSL/session_driver.c b/libsigrok4DSL/session_driver.c index 3b298d4da..b4c22b896 100644 --- a/libsigrok4DSL/session_driver.c +++ b/libsigrok4DSL/session_driver.c @@ -523,7 +523,7 @@ static int receive_data_logic_dso_v2(int fd, int revents, const struct sr_dev_in while (pack_buffer->post_write_len < pack_buffer->post_buf_len) { - // The current block is readed end, or the buffer is empty. + // The current block has been fully read, or the buffer is empty. if (pack_buffer->block_read_len >= pack_buffer->block_data_len) { // The block index to end. @@ -1624,7 +1624,7 @@ static int sr_load_virtual_device_session(struct sr_dev_inst *sdi) } if (unzOpenCurrentFile(archive) != UNZ_OK) { - sr_err("%s: Cant't open zip inner file.", __func__); + sr_err("%s: Can't open zip inner file.", __func__); unzClose(archive); return SR_ERR; } diff --git a/libsigrok4DSL/tests/test_main.cpp b/libsigrok4DSL/tests/test_main.cpp index 3ab8d96c1..8a832136b 100644 --- a/libsigrok4DSL/tests/test_main.cpp +++ b/libsigrok4DSL/tests/test_main.cpp @@ -44,7 +44,7 @@ void ctrl() this_thread::sleep_for(chrono::milliseconds(2000)); } - qDebug()<<"exit command waitting"; + qDebug()<<"exit command waiting"; } int main() diff --git a/libsigrok4DSL/trigger.c b/libsigrok4DSL/trigger.c index 35be1806e..f4b5791dc 100644 --- a/libsigrok4DSL/trigger.c +++ b/libsigrok4DSL/trigger.c @@ -104,7 +104,7 @@ SR_API int ds_trigger_stage_set_value(uint16_t stage, uint16_t probes, char *tri assert(probes <= MaxTriggerProbes); if (trigger == NULL){ - sr_err("ds_trigger_stage_set_value() error, trigger have'nt be inited."); + sr_err("ds_trigger_stage_set_value() error, trigger hasn't been inited."); return SR_ERR_CALL_STATUS; } @@ -125,7 +125,7 @@ SR_API int ds_trigger_stage_set_logic(uint16_t stage, uint16_t probes, unsigned assert(probes <= MaxTriggerProbes); if (trigger == NULL){ - sr_err("ds_trigger_stage_set_logic() error, trigger have'nt be inited."); + sr_err("ds_trigger_stage_set_logic() error, trigger hasn't been inited."); return SR_ERR_CALL_STATUS; } @@ -141,7 +141,7 @@ SR_API int ds_trigger_stage_set_inv(uint16_t stage, uint16_t probes, unsigned ch assert(probes <= MaxTriggerProbes); if (trigger == NULL){ - sr_err("ds_trigger_stage_set_inv() error, trigger have'nt be inited."); + sr_err("ds_trigger_stage_set_inv() error, trigger hasn't been inited."); return SR_ERR_CALL_STATUS; } @@ -158,7 +158,7 @@ SR_API int ds_trigger_stage_set_count(uint16_t stage, uint16_t probes, uint32_t assert(probes <= MaxTriggerProbes); if (trigger == NULL){ - sr_err("ds_trigger_stage_set_count() error, trigger have'nt be inited."); + sr_err("ds_trigger_stage_set_count() error, trigger hasn't been inited."); return SR_ERR_CALL_STATUS; } @@ -178,7 +178,7 @@ SR_API int ds_trigger_probe_set(uint16_t probe, unsigned char trigger0, unsigned assert(probe < MaxTriggerProbes); if (trigger == NULL){ - sr_err("ds_trigger_probe_set() error, trigger have'nt be inited."); + sr_err("ds_trigger_probe_set() error, trigger hasn't been inited."); return SR_ERR_CALL_STATUS; } @@ -198,7 +198,7 @@ SR_API int ds_trigger_set_stage(uint16_t stages) assert(stages <= TriggerStages); if (trigger == NULL){ - sr_err("ds_trigger_set_stage() error, trigger have'nt be inited."); + sr_err("ds_trigger_set_stage() error, trigger hasn't been inited."); return SR_ERR_CALL_STATUS; } @@ -217,7 +217,7 @@ SR_API int ds_trigger_set_pos(uint16_t position) assert(position <= 100); if (trigger == NULL){ - sr_err("ds_trigger_set_pos() error, trigger have'nt be inited."); + sr_err("ds_trigger_set_pos() error, trigger hasn't been inited."); return SR_ERR_CALL_STATUS; } @@ -234,7 +234,7 @@ SR_API int ds_trigger_set_pos(uint16_t position) SR_API uint16_t ds_trigger_get_pos() { if (trigger == NULL){ - sr_err("ds_trigger_get_pos() error, trigger have'nt be inited."); + sr_err("ds_trigger_get_pos() error, trigger hasn't been inited."); return 0; } @@ -249,7 +249,7 @@ SR_API uint16_t ds_trigger_get_pos() SR_API int ds_trigger_set_en(uint16_t enable) { if (trigger == NULL){ - sr_err("ds_trigger_set_en() error, trigger have'nt be inited."); + sr_err("ds_trigger_set_en() error, trigger hasn't been inited."); return SR_ERR_CALL_STATUS; } @@ -279,7 +279,7 @@ SR_API uint16_t ds_trigger_get_en() SR_API int ds_trigger_set_mode(uint16_t mode) { if (trigger == NULL){ - sr_err("ds_trigger_set_en() error, trigger have'nt be inited."); + sr_err("ds_trigger_set_mode() error, trigger hasn't been inited."); return SR_ERR_CALL_STATUS; } @@ -298,7 +298,7 @@ SR_PRIV uint16_t ds_trigger_get_mask0(uint16_t stage, uint16_t msc, uint16_t lsc assert(msc < MaxTriggerProbes); if (trigger == NULL){ - sr_err("ds_trigger_get_mask0() error, trigger have'nt be inited."); + sr_err("ds_trigger_get_mask0() error, trigger hasn't been inited."); return SR_ERR_CALL_STATUS; } @@ -330,7 +330,7 @@ SR_PRIV uint16_t ds_trigger_get_mask1(uint16_t stage, uint16_t msc, uint16_t lsc assert(msc < MaxTriggerProbes); if (trigger == NULL){ - sr_err("ds_trigger_get_mask1() error, trigger have'nt be inited."); + sr_err("ds_trigger_get_mask1() error, trigger hasn't been inited."); return SR_ERR_CALL_STATUS; } @@ -362,7 +362,7 @@ SR_PRIV uint16_t ds_trigger_get_value0(uint16_t stage, uint16_t msc, uint16_t ls assert(msc < MaxTriggerProbes); if (trigger == NULL){ - sr_err("ds_trigger_get_value0() error, trigger have'nt be inited."); + sr_err("ds_trigger_get_value0() error, trigger hasn't been inited."); return SR_ERR_CALL_STATUS; } @@ -399,7 +399,7 @@ SR_PRIV uint16_t ds_trigger_get_value1(uint16_t stage, uint16_t msc, uint16_t ls int i; if (trigger == NULL){ - sr_err("ds_trigger_get_value1() error, trigger have'nt be inited."); + sr_err("ds_trigger_get_value1() error, trigger hasn't been inited."); return SR_ERR_CALL_STATUS; } @@ -431,7 +431,7 @@ SR_PRIV uint16_t ds_trigger_get_edge0(uint16_t stage, uint16_t msc, uint16_t lsc int i; if (trigger == NULL){ - sr_err("ds_trigger_get_edge0() error, trigger have'nt be inited."); + sr_err("ds_trigger_get_edge0() error, trigger hasn't been inited."); return SR_ERR_CALL_STATUS; } @@ -464,7 +464,7 @@ SR_PRIV uint16_t ds_trigger_get_edge1(uint16_t stage, uint16_t msc, uint16_t lsc int i; if (trigger == NULL){ - sr_err("ds_trigger_get_edge1() error, trigger have'nt be inited."); + sr_err("ds_trigger_get_edge1() error, trigger hasn't been inited."); return SR_ERR_CALL_STATUS; } From 0eddc3a2936fda8f2aeb34e33364ea8915fec231 Mon Sep 17 00:00:00 2001 From: Luke Fulcomer Date: Sat, 3 Oct 2026 10:34:59 -0700 Subject: [PATCH 2/2] Spell the DSLogic Plus model name correctly The driver table listed the DSLogic Plus as "DSLogic PLus" for USB IDs 0x0020, 0x0030 and 0x0034. The name is only displayed; no setting or file uses it. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01EtTPqtfw2fhHmLjjJVS2GV --- libsigrok4DSL/hardware/DSL/dsl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libsigrok4DSL/hardware/DSL/dsl.h b/libsigrok4DSL/hardware/DSL/dsl.h index 43fff8af2..69c29b991 100644 --- a/libsigrok4DSL/hardware/DSL/dsl.h +++ b/libsigrok4DSL/hardware/DSL/dsl.h @@ -505,7 +505,7 @@ static const struct DSL_profile supported_DSLogic[] = { SR_MHZ(400)} }, - {DS_VENDOR_ID, 0x0020, LIBUSB_SPEED_HIGH, "DreamSourceLab", "DSLogic PLus", NULL, + {DS_VENDOR_ID, 0x0020, LIBUSB_SPEED_HIGH, "DreamSourceLab", "DSLogic Plus", NULL, "DSLogicPlus.fw", "DSLogicPlus.bin", "DSLogicPlus.bin", @@ -721,7 +721,7 @@ static const struct DSL_profile supported_DSLogic[] = { SR_GHZ(1)} }, - {0x2A0E, 0x0030, LIBUSB_SPEED_HIGH, "DreamSourceLab", "DSLogic PLus", NULL, + {0x2A0E, 0x0030, LIBUSB_SPEED_HIGH, "DreamSourceLab", "DSLogic Plus", NULL, "DSLogicPlus.fw", "DSLogicPlus-pgl12.bin", "DSLogicPlus-pgl12.bin", @@ -775,7 +775,7 @@ static const struct DSL_profile supported_DSLogic[] = { SR_MHZ(400)} }, - {0x2A0E, 0x0034, LIBUSB_SPEED_HIGH, "DreamSourceLab", "DSLogic PLus", NULL, + {0x2A0E, 0x0034, LIBUSB_SPEED_HIGH, "DreamSourceLab", "DSLogic Plus", NULL, "DSLogicPlus-pgl12-2.fw", "DSLogicPlus-pgl12-2.bin", "DSLogicPlus-pgl12-2.bin",