forked from Ivasoft/DSView
Update language resource
This commit is contained in:
@@ -502,7 +502,7 @@ void DecoderOptionsDlg::on_accept()
|
||||
{
|
||||
if (_cursor1 > 0 && _cursor1 == _cursor2){
|
||||
MsgBox::Show(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_ERROR), "error"),
|
||||
L_S(STR_PAGE_MSG, S_ID(IDS_MSG_INVAILD_CURSOR), "Invalid cursor index for sample range!"));
|
||||
L_S(STR_PAGE_MSG, S_ID(IDS_MSG_DECODE_INVAILD_CURSOR), "Invalid cursor index for sample range!"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -449,7 +449,7 @@ void DeviceOptions::zero_adj()
|
||||
|
||||
dialogs::DSMessageBox msg(this);
|
||||
msg.mBox()->setText(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_INFORMATION), "Information"));
|
||||
msg.mBox()->setInformativeText(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_A_CAL_START),
|
||||
msg.mBox()->setInformativeText(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_AUTO_CALIB_START),
|
||||
"Auto Calibration program will be started. Don't connect any probes. It can take a while!"));
|
||||
msg.mBox()->addButton(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_OK), "Ok"), QMessageBox::AcceptRole);
|
||||
msg.mBox()->addButton(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_CANCEL), "Cancel") ,QMessageBox::RejectRole);
|
||||
|
||||
@@ -47,7 +47,7 @@ KeywordLineEdit::KeywordLineEdit(QWidget *parent, IKeywordActive *active)
|
||||
}
|
||||
|
||||
//tr
|
||||
this->setText(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_KEYWORD_LINEEID), "Protocol search..."));
|
||||
this->setText(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_KEY_DECODER_SEARCH), "Decoder search..."));
|
||||
}
|
||||
|
||||
void KeywordLineEdit::SetInputText(QString text)
|
||||
|
||||
@@ -101,7 +101,7 @@ ProtocolDock::ProtocolDock(QWidget *parent, view::View &view, SigSession *sessio
|
||||
sort(_decoderInfoList.begin(), _decoderInfoList.end(), ProtocolDock::protocol_sort_callback);
|
||||
|
||||
if (repeatNammes != ""){
|
||||
QString err = L_S(STR_PAGE_MSG, S_ID(IDS_MSG_PROTOCOL_REPEAT), "Any protocol have repeated id or name:");
|
||||
QString err = L_S(STR_PAGE_MSG, S_ID(IDS_MSG_DECODER_REPEAT), "Any decoder have repeated id or name:");
|
||||
err += repeatNammes;
|
||||
MsgBox::Show(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_ERROR), "error"), err.toUtf8().data());
|
||||
}
|
||||
@@ -299,11 +299,11 @@ int ProtocolDock::get_protocol_index_by_id(QString id)
|
||||
void ProtocolDock::on_add_protocol()
|
||||
{
|
||||
if (_decoderInfoList.size() == 0){
|
||||
MsgBox::Show(NULL, L_S(STR_PAGE_MSG, S_ID(IDS_MSG_NO_PROTOCOL), "Protocol list is empty!"));
|
||||
MsgBox::Show(NULL, L_S(STR_PAGE_MSG, S_ID(IDS_MSG_DECODER_LIST_EMPTY), "Decoder list is empty!"));
|
||||
return;
|
||||
}
|
||||
if (_selected_protocol_id == ""){
|
||||
MsgBox::Show(NULL, L_S(STR_PAGE_MSG, S_ID(IDS_MSG_NO_SEL_PROTOCOL), "Please select a protocol!"));
|
||||
MsgBox::Show(NULL, L_S(STR_PAGE_MSG, S_ID(IDS_MSG_NO_SEL_DECODER), "Please select a decoder!"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -348,7 +348,7 @@ void ProtocolDock::on_add_protocol()
|
||||
|
||||
if (pro_id == ""){
|
||||
MsgBox::Show(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_ERROR), "error"),
|
||||
L_S(STR_PAGE_MSG, S_ID(IDS_MSG_FIND_BASE_PROTOCOL_ERROR), "find the base protocol error!"));
|
||||
L_S(STR_PAGE_MSG, S_ID(IDS_MSG_FIND_BASE_DECODER_ERROR), "find the base decoder error!"));
|
||||
|
||||
for(auto sub: sub_decoders){
|
||||
delete sub;
|
||||
@@ -417,11 +417,11 @@ bool ProtocolDock::add_protocol_by_id(QString id, bool silent, std::list<pv::dat
|
||||
|
||||
void ProtocolDock::on_del_all_protocol(){
|
||||
if (_protocol_lay_items.size() == 0){
|
||||
MsgBox::Show(NULL, L_S(STR_PAGE_MSG, S_ID(IDS_MSG_NO_PROTOCOL_DEL), "No Protocol Analyzer to delete!"), this);
|
||||
MsgBox::Show(NULL, L_S(STR_PAGE_MSG, S_ID(IDS_MSG_NO_DECODER_DEL), "Have no decoder to remove!"), this);
|
||||
return;
|
||||
}
|
||||
|
||||
if (MsgBox::Confirm(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_PROTOCOL_COMFRIEM_DEL_ALL), "Are you sure to remove all protocol analyzer?"), this)){
|
||||
if (MsgBox::Confirm(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_DECODER_CONFIRM_DEL_ALL), "Are you sure to remove all decoder?"), this)){
|
||||
del_all_protocol();
|
||||
}
|
||||
}
|
||||
@@ -842,7 +842,7 @@ void ProtocolDock::OnProtocolSetting(void *handle){
|
||||
}
|
||||
|
||||
void ProtocolDock::OnProtocolDelete(void *handle){
|
||||
if (!MsgBox::Confirm(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_PROTOCOL_COMFRIEM_DEL), "Are you sure to remove this protocol analyzer?"), this)){
|
||||
if (!MsgBox::Confirm(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_DECODER_CONFIRM_DEL), "Are you sure to remove this decoder?"), this)){
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@ namespace pv
|
||||
addToolBar(_logo_bar);
|
||||
|
||||
// Setup the dockWidget
|
||||
_protocol_dock = new QDockWidget(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_PROTOCOL_DOCK_TITLE), "Protocol"), this);
|
||||
_protocol_dock = new QDockWidget(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_PROTOCOL_DOCK_TITLE), "Decode Protocol"), this);
|
||||
_protocol_dock->setObjectName("protocol_dock");
|
||||
_protocol_dock->setFeatures(QDockWidget::DockWidgetMovable);
|
||||
_protocol_dock->setAllowedAreas(Qt::RightDockWidgetArea);
|
||||
@@ -313,7 +313,7 @@ namespace pv
|
||||
{
|
||||
_trigger_dock->setWindowTitle(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_TRIGGER_DOCK_TITLE), "Trigger Setting..."));
|
||||
_dso_trigger_dock->setWindowTitle(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_TRIGGER_DOCK_TITLE), "Trigger Setting..."));
|
||||
_protocol_dock->setWindowTitle(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_PROTOCOL_DOCK_TITLE), "Protocol"));
|
||||
_protocol_dock->setWindowTitle(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_PROTOCOL_DOCK_TITLE), "Decode Protocol"));
|
||||
_measure_dock->setWindowTitle(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_MEASURE_DOCK_TITLE), "Measurement"));
|
||||
_search_dock->setWindowTitle(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_SEARCH_DOCK_TITLE), "Search..."));
|
||||
}
|
||||
@@ -801,7 +801,7 @@ namespace pv
|
||||
// check device and mode
|
||||
if (driverName != sessionDevice || mode != conf_dev_mode)
|
||||
{
|
||||
MsgBox::Show(NULL, L_S(STR_PAGE_MSG, S_ID(IDS_MSG_NOT_COMPATIBLE), "Session File is not compatible with current device or mode!"), this);
|
||||
MsgBox::Show(NULL, L_S(STR_PAGE_MSG, S_ID(IDS_MSG_PROFILE_NOT_COMPATIBLE), "Profile is not compatible with current device or mode!"), this);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1127,7 +1127,7 @@ namespace pv
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
MsgBox::Show(NULL, L_S(STR_PAGE_MSG, S_ID(IDS_MSG_RE_WIN_ST_ER), "restore window status error!"));
|
||||
MsgBox::Show(NULL, L_S(STR_PAGE_MSG, S_ID(IDS_MSG_RESTORE_WINDOW_ERROR), "restore window status error!"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1933,9 +1933,19 @@ namespace pv
|
||||
}
|
||||
break;
|
||||
|
||||
case DSV_MSG_END_DEVICE_OPTIONS:
|
||||
if(_device_agent->is_demo() &&_device_agent->get_work_mode() == LOGIC)
|
||||
{
|
||||
case DSV_MSG_BEGIN_DEVICE_OPTIONS:
|
||||
if(_device_agent->is_demo()){
|
||||
GVariant *gvar = _device_agent->get_config(NULL,NULL,SR_CONF_PATTERN_MODE);
|
||||
if(gvar != NULL)
|
||||
{
|
||||
_pattern_mode = g_variant_get_string(gvar,NULL);
|
||||
g_variant_unref(gvar);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case DSV_MSG_END_DEVICE_OPTIONS:
|
||||
if(_device_agent->is_demo() &&_device_agent->get_work_mode() == LOGIC){
|
||||
GVariant *gvar = _device_agent->get_config(NULL,NULL,SR_CONF_PATTERN_MODE);
|
||||
if(gvar != NULL)
|
||||
{
|
||||
@@ -1964,18 +1974,7 @@ namespace pv
|
||||
}
|
||||
}
|
||||
calc_min_height();
|
||||
break;
|
||||
|
||||
case DSV_MSG_BEGIN_DEVICE_OPTIONS:
|
||||
if(_device_agent->is_demo())
|
||||
{
|
||||
GVariant *gvar = _device_agent->get_config(NULL,NULL,SR_CONF_PATTERN_MODE);
|
||||
if(gvar != NULL)
|
||||
{
|
||||
_pattern_mode = g_variant_get_string(gvar,NULL);
|
||||
g_variant_unref(gvar);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -190,8 +190,8 @@ void FileBar::on_actionDefault_triggered()
|
||||
{
|
||||
QDir dir(GetResourceDir());
|
||||
if (!dir.exists()) {
|
||||
MsgBox::Show(NULL, L_S(STR_PAGE_MSG, S_ID(IDS_MSG_SAVE_CANFIND_SESSIONFILE),
|
||||
"Cannot find default session file for this device!"), this);
|
||||
MsgBox::Show(NULL, L_S(STR_PAGE_MSG, S_ID(IDS_MSG_NOT_FOND_DEFAULT_PROFILE),
|
||||
"Cannot find default profile for this device!"), this);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -890,7 +890,7 @@ namespace pv
|
||||
if (zero)
|
||||
{
|
||||
dialogs::DSMessageBox msg(this);
|
||||
msg.mBox()->setText(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_A_CAL), "Auto Calibration"));
|
||||
msg.mBox()->setText(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_AUTO_CALIB), "Auto Calibration"));
|
||||
msg.mBox()->setInformativeText(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_ADJUST_SAVE), "Please adjust zero skew and save the result"));
|
||||
// msg.setStandardButtons(QMessageBox::Ok);
|
||||
msg.mBox()->addButton(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_OK), "Ok"), QMessageBox::AcceptRole);
|
||||
@@ -961,8 +961,8 @@ namespace pv
|
||||
if (zero)
|
||||
{
|
||||
dialogs::DSMessageBox msg(this);
|
||||
msg.mBox()->setText(L_S(STR_PAGE_MSG,S_ID(IDS_MSG_A_CAL), "Auto Calibration"));
|
||||
msg.mBox()->setInformativeText(L_S(STR_PAGE_MSG,S_ID(IDS_MSG_A_CAL_START), "Auto Calibration program will be started. Don't connect any probes. It can take a while!"));
|
||||
msg.mBox()->setText(L_S(STR_PAGE_MSG,S_ID(IDS_MSG_AUTO_CALIB), "Auto Calibration"));
|
||||
msg.mBox()->setInformativeText(L_S(STR_PAGE_MSG,S_ID(IDS_MSG_AUTO_CALIB_START), "Auto Calibration program will be started. Don't connect any probes. It can take a while!"));
|
||||
|
||||
msg.mBox()->addButton(L_S(STR_PAGE_MSG,S_ID(IDS_MSG_OK), "Ok"), QMessageBox::AcceptRole);
|
||||
msg.mBox()->addButton(L_S(STR_PAGE_MSG,S_ID(IDS_MSG_SKIP), "Skip"), QMessageBox::RejectRole);
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
},
|
||||
{
|
||||
"id": "IDS_DLG_PROTOCOL_DOCK_TITLE",
|
||||
"text": "协议"
|
||||
"text": "解码协议"
|
||||
},
|
||||
{
|
||||
"id": "IDS_DLG_MEASURE_DOCK_TITLE",
|
||||
@@ -388,8 +388,8 @@
|
||||
"text": "通道 0 | 1"
|
||||
},
|
||||
{
|
||||
"id": "IDS_DLG_KEYWORD_LINEEID",
|
||||
"text": "协议搜索"
|
||||
"id": "IDS_DLG_KEY_DECODER_SEARCH",
|
||||
"text": "解码器搜索"
|
||||
},
|
||||
{
|
||||
"id": "IDS_DLG_TIME_SAMPLES",
|
||||
|
||||
@@ -31,10 +31,6 @@
|
||||
"id": "Pre-trigger capture ratio",
|
||||
"text": "触发前采样比例"
|
||||
},
|
||||
{
|
||||
"id": "Pattern mode",
|
||||
"text": "信号模式"
|
||||
},
|
||||
{
|
||||
"id": "Run Length Encoding",
|
||||
"text": "RLE编码"
|
||||
|
||||
@@ -27,11 +27,11 @@
|
||||
"text": "继续"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_A_CAL_START",
|
||||
"text": "自动校准程序将启动。不要连接任何探头。这可能需要一段时间!"
|
||||
"id": "IDS_MSG_AUTO_CALIB_START",
|
||||
"text": "自动校准程序将启动。不要连接任何探针。这可能需要一段时间!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_A_CAL",
|
||||
"id": "IDS_MSG_AUTO_CALIB",
|
||||
"text": "自动校准"
|
||||
},
|
||||
{
|
||||
@@ -40,59 +40,59 @@
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_SAVE_CAPDATE",
|
||||
"text": "保存捕获的数据?"
|
||||
"text": "保存采集到的数据?"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_SAVE_CANFIND_SESSIONFILE",
|
||||
"text": "找不到此设备的默认会话文件!"
|
||||
"id": "IDS_MSG_NOT_FOND_DEFAULT_PROFILE",
|
||||
"text": "找不到此设备的默认配置文件!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_OPEN_FILE_ERROR",
|
||||
"text": "打开文件错误!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_NOT_COMPATIBLE",
|
||||
"text": "会话文件与当前设备或模式不兼容!"
|
||||
"id": "IDS_MSG_PROFILE_NOT_COMPATIBLE",
|
||||
"text": "配置文件与当前设备或模式不兼容!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_RE_WIN_ST_ER",
|
||||
"id": "IDS_MSG_RESTORE_WINDOW_ERROR",
|
||||
"text": "还原窗口状态错误!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_INVAILD_CURSOR",
|
||||
"text": "样本范围的游标索引无效!"
|
||||
"id": "IDS_MSG_DECODE_INVAILD_CURSOR",
|
||||
"text": "用于指定采样范围的光标无效!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_SEL_FILENAME",
|
||||
"text": "您需要选择文件名"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_PROTOCOL_REPEAT",
|
||||
"text": "存在重复id或名字的协议:"
|
||||
"id": "IDS_MSG_DECODER_REPEAT",
|
||||
"text": "存在重复id或名字的解码器:"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_NO_PROTOCOL",
|
||||
"text": "协议列表为空!"
|
||||
"id": "IDS_MSG_DECODER_LIST_EMPTY",
|
||||
"text": "解码器列表为空!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_NO_SEL_PROTOCOL",
|
||||
"text": "请选择一个协议!"
|
||||
"id": "IDS_MSG_NO_SEL_DECODER",
|
||||
"text": "请选择一个解码器!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_FIND_BASE_PROTOCOL_ERROR",
|
||||
"text": "查找基本协议错误!"
|
||||
"id": "IDS_MSG_FIND_BASE_DECODER_ERROR",
|
||||
"text": "查找基础解码器错误!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_NO_PROTOCOL_DEL",
|
||||
"text": "没有要删除的协议分析器!"
|
||||
"id": "IDS_MSG_NO_DECODER_DEL",
|
||||
"text": "没有可移除的解码器!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_PROTOCOL_COMFRIEM_DEL_ALL",
|
||||
"text": "是否确定要删除所有协议分析器?"
|
||||
"id": "IDS_MSG_DECODER_CONFIRM_DEL_ALL",
|
||||
"text": "是否确定要移除所有解码器?"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_PROTOCOL_COMFRIEM_DEL",
|
||||
"text": "是否确定要删除这个协议分析器?"
|
||||
"id": "IDS_MSG_DECODER_CONFIRM_DEL",
|
||||
"text": "是否确定要移除这个解码器?"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_CLOSE_DEVICE",
|
||||
@@ -156,11 +156,11 @@
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_PATTERN_NOT_FOUND",
|
||||
"text": "找不到样式!"
|
||||
"text": "找不到匹配模式!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_SEARCH_AT_END",
|
||||
"text": "在结束位置搜索光标!"
|
||||
"text": "搜索光标处于结束位置!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_TRIGGER",
|
||||
@@ -198,7 +198,6 @@
|
||||
"id": "IDS_MSG_FAIL_TO_LOAD",
|
||||
"text": "加载失败"
|
||||
},
|
||||
|
||||
{
|
||||
"id": "IDS_MSG_HARDWARE_ERROR",
|
||||
"text": "硬件操作失败"
|
||||
@@ -215,25 +214,13 @@
|
||||
"id": "IDS_MSG_MALLOC_ERROR_DET",
|
||||
"text": "内存不足,无法容纳此样本!\n请降低采样深度!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_DATA_ERROR",
|
||||
"text": "数据错误"
|
||||
},
|
||||
{
|
||||
"id": "IDS_DATA_ERROR_DET1",
|
||||
"text": "接收的数据与预定义的测试数据不一致!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_DATA_ERROR_DET2",
|
||||
"text": "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_PACKET_ERROR",
|
||||
"text": "数据包错误"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_PACKET_ERROR_DET",
|
||||
"text": "接收到的数据包的内容不是预期的 !"
|
||||
"text": "接收到的数据包的内容不是预期的!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_DATA_OVERFLOW",
|
||||
@@ -241,7 +228,7 @@
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_DATA_OVERFLOW_DET",
|
||||
"text": "USB带宽无法支持当前采样率 ! \n请降低采样深度!"
|
||||
"text": "USB带宽无法支持当前采样率!\n请降低采样深度!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_UNDEFINED_ERROR",
|
||||
@@ -281,11 +268,11 @@
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_STORESESS_SAVEPROC_ERROR1",
|
||||
"text": "无法创建zip文件.内存分配错误."
|
||||
"text": "无法创建zip文件,内存分配错误."
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_STORESESS_SAVEPROC_ERROR2",
|
||||
"text": "无法创建zip文件.请检查此路径的写入权限."
|
||||
"text": "无法创建zip文件,请检查此路径的写入权限."
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_STORESESS_EXPORTSTART_ERROR1",
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
},
|
||||
{
|
||||
"id": "IDS_DLG_PROTOCOL_DOCK_TITLE",
|
||||
"text": "Protocol"
|
||||
"text": "Decode Protocol"
|
||||
},
|
||||
{
|
||||
"id": "IDS_DLG_MEASURE_DOCK_TITLE",
|
||||
@@ -388,8 +388,8 @@
|
||||
"text": "Channel 0 | 1"
|
||||
},
|
||||
{
|
||||
"id": "IDS_DLG_KEYWORD_LINEEID",
|
||||
"text": "Protocol search..."
|
||||
"id": "IDS_DLG_KEY_DECODER_SEARCH",
|
||||
"text": "Decoder search..."
|
||||
},
|
||||
{
|
||||
"id": "IDS_DLG_TIME_SAMPLES",
|
||||
|
||||
@@ -28,11 +28,11 @@
|
||||
"text": "Continue"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_A_CAL_START",
|
||||
"id": "IDS_MSG_AUTO_CALIB_START",
|
||||
"text": "Auto Calibration program will be started. Don't connect any probes. It can take a while!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_A_CAL",
|
||||
"id": "IDS_MSG_AUTO_CALIB",
|
||||
"text": "Auto Calibration"
|
||||
},
|
||||
{
|
||||
@@ -44,23 +44,23 @@
|
||||
"text": "Save captured data?"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_SAVE_CANFIND_SESSIONFILE",
|
||||
"text": "Cannot find default session file for this device!"
|
||||
"id": "IDS_MSG_NOT_FOND_DEFAULT_PROFILE",
|
||||
"text": "Cannot find default profile for this device!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_OPEN_FILE_ERROR",
|
||||
"text": "Open file error!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_NOT_COMPATIBLE",
|
||||
"text": "Session File is not compatible with current device or mode!"
|
||||
"id": "IDS_MSG_PROFILE_NOT_COMPATIBLE",
|
||||
"text": "Profile is not compatible with current device or mode!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_RE_WIN_ST_ER",
|
||||
"text": "restore window status error!"
|
||||
"id": "IDS_MSG_RESTORE_WINDOW_ERROR",
|
||||
"text": "Restore window status error!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_INVAILD_CURSOR",
|
||||
"id": "IDS_MSG_DECODE_INVAILD_CURSOR",
|
||||
"text": "Invalid cursor index for sample range!"
|
||||
},
|
||||
{
|
||||
@@ -68,32 +68,32 @@
|
||||
"text": "You need to select a file name."
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_PROTOCOL_REPEAT",
|
||||
"text": "Any protocol have repeated id or name:"
|
||||
"id": "IDS_MSG_DECODER_REPEAT",
|
||||
"text": "Any decoder have repeated id or name:"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_NO_PROTOCOL",
|
||||
"text": "Protocol list is empty!"
|
||||
"id": "IDS_MSG_DECODER_LIST_EMPTY",
|
||||
"text": "Decoder list is empty!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_NO_SEL_PROTOCOL",
|
||||
"text": "Please select a protocol!"
|
||||
"id": "IDS_MSG_NO_SEL_DECODER",
|
||||
"text": "Please select a decoder!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_FIND_BASE_PROTOCOL_ERROR",
|
||||
"text": "find the base protocol error!"
|
||||
"id": "IDS_MSG_FIND_BASE_DECODER_ERROR",
|
||||
"text": "find the base decoder error!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_NO_PROTOCOL_DEL",
|
||||
"text": "No Protocol Analyzer to delete!"
|
||||
"id": "IDS_MSG_NO_DECODER_DEL",
|
||||
"text": "Have no decoder to remove!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_PROTOCOL_COMFRIEM_DEL_ALL",
|
||||
"text": "Are you sure to remove all protocol analyzer?"
|
||||
"id": "IDS_MSG_DECODER_CONFIRM_DEL_ALL",
|
||||
"text": "Are you sure to remove all decoder?"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_PROTOCOL_COMFRIEM_DEL",
|
||||
"text": "Are you sure to remove this protocol analyzer?"
|
||||
"id": "IDS_MSG_DECODER_CONFIRM_DEL",
|
||||
"text": "Are you sure to remove this decoder?"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_CLOSE_DEVICE",
|
||||
@@ -197,9 +197,8 @@
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_FAIL_TO_LOAD",
|
||||
"text": "Failed to load "
|
||||
"text": "Failed to load"
|
||||
},
|
||||
|
||||
{
|
||||
"id": "IDS_MSG_HARDWARE_ERROR",
|
||||
"text": "Hardware Operation Failed"
|
||||
@@ -216,18 +215,6 @@
|
||||
"id": "IDS_MSG_MALLOC_ERROR_DET",
|
||||
"text": "Memory is not enough for this sample!\nPlease reduce the sample depth!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_DATA_ERROR",
|
||||
"text": "Data Error"
|
||||
},
|
||||
{
|
||||
"id": "IDS_DATA_ERROR_DET1",
|
||||
"text": "the received data are not consist with pre-defined test data!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_DATA_ERROR_DET2",
|
||||
"text": "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_PACKET_ERROR",
|
||||
"text": "Packet Error"
|
||||
@@ -242,7 +229,7 @@
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_DATA_OVERFLOW_DET",
|
||||
"text": "USB bandwidth can not support current sample rate! \nPlease reduce the sample rate!"
|
||||
"text": "USB bandwidth can not support current sample rate!\nPlease reduce the sample rate!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_UNDEFINED_ERROR",
|
||||
@@ -282,11 +269,11 @@
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_STORESESS_SAVEPROC_ERROR1",
|
||||
"text": "Failed to create zip file. Malloc error."
|
||||
"text": "Failed to create zip file,malloc error."
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_STORESESS_SAVEPROC_ERROR2",
|
||||
"text": "Failed to create zip file. Please check write permission of this path."
|
||||
"text": "Failed to create zip file,please check write permission of this path."
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_STORESESS_EXPORTSTART_ERROR1",
|
||||
|
||||
@@ -53,7 +53,7 @@ static struct sr_config_info sr_config_info_data[] = {
|
||||
{SR_CONF_CLOCK_TYPE, SR_T_BOOL,"Using External Clock"},
|
||||
{SR_CONF_CLOCK_EDGE, SR_T_BOOL, "Using Clock Negedge"},
|
||||
{SR_CONF_CAPTURE_RATIO, SR_T_UINT64,"Pre-trigger capture ratio"},
|
||||
{SR_CONF_PATTERN_MODE, SR_T_CHAR,"Pattern mode"},
|
||||
{SR_CONF_PATTERN_MODE, SR_T_CHAR,"Operation Mode"},
|
||||
{SR_CONF_RLE, SR_T_BOOL,"Run Length Encoding"},
|
||||
{SR_CONF_WAIT_UPLOAD, SR_T_BOOL,"Wait Buffer Upload"},
|
||||
{SR_CONF_TRIGGER_SLOPE, SR_T_UINT8,"Trigger slope"},
|
||||
@@ -177,12 +177,13 @@ SR_PRIV void sr_hw_cleanup_all(void)
|
||||
SR_PRIV struct sr_config *sr_config_new(int key, GVariant *data)
|
||||
{
|
||||
struct sr_config *src;
|
||||
assert(data);
|
||||
|
||||
if (!(src = g_try_malloc(sizeof(struct sr_config))))
|
||||
return NULL;
|
||||
|
||||
src->key = key;
|
||||
src->data = g_variant_ref_sink(data);
|
||||
|
||||
return src;
|
||||
}
|
||||
|
||||
@@ -235,6 +236,7 @@ SR_PRIV int sr_config_get(const struct sr_dev_driver *driver,
|
||||
if ((ret = driver->config_get(key, data, sdi, ch, cg)) == SR_OK) {
|
||||
/* Got a floating reference from the driver. Sink it here,
|
||||
* caller will need to unref when done with it. */
|
||||
assert(*data);
|
||||
g_variant_ref_sink(*data);
|
||||
}
|
||||
|
||||
@@ -262,14 +264,18 @@ SR_PRIV int sr_config_set(struct sr_dev_inst *sdi,
|
||||
{
|
||||
int ret;
|
||||
|
||||
assert(data);
|
||||
g_variant_ref_sink(data);
|
||||
|
||||
if (!sdi || !sdi->driver || !data)
|
||||
if (!sdi || !sdi->driver || !data){
|
||||
ret = SR_ERR;
|
||||
else if (!sdi->driver->config_set)
|
||||
}
|
||||
else if (!sdi->driver->config_set){
|
||||
ret = SR_ERR_ARG;
|
||||
else
|
||||
}
|
||||
else {
|
||||
ret = sdi->driver->config_set(key, data, sdi, ch, cg);
|
||||
}
|
||||
|
||||
g_variant_unref(data);
|
||||
|
||||
@@ -301,12 +307,16 @@ SR_PRIV int sr_config_list(const struct sr_dev_driver *driver,
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (!driver || !data)
|
||||
if (!driver || !data){
|
||||
ret = SR_ERR;
|
||||
else if (!driver->config_list)
|
||||
}
|
||||
else if (!driver->config_list){
|
||||
ret = SR_ERR_ARG;
|
||||
else if ((ret = driver->config_list(key, data, sdi, cg)) == SR_OK)
|
||||
}
|
||||
else if ((ret = driver->config_list(key, data, sdi, cg)) == SR_OK){
|
||||
assert(*data);
|
||||
g_variant_ref_sink(*data);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user