生产工具和配置文件生成工具增加获取电机板版本号对比功能
This commit is contained in:
parent
74ce35f964
commit
fd0770b0f8
Binary file not shown.
|
@ -147,6 +147,11 @@
|
|||
<source>Lock device:</source>
|
||||
<translation>是否锁定:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.ui" line="339"/>
|
||||
<source>Motor version:</source>
|
||||
<translation>电机板版本号:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Test item:</source>
|
||||
<oldsource>Test Id:</oldsource>
|
||||
|
|
|
@ -58,7 +58,8 @@ AnalysisJson::json_global AnalysisJson::GetGlobal()
|
|||
obj["disk-size"].toInt(),
|
||||
obj["lock-device"].toBool(),
|
||||
obj["device-model"].toString(),
|
||||
obj["firmware-version"].toString()
|
||||
obj["firmware-version"].toString(),
|
||||
obj["motor-version"].toString()
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ public:
|
|||
bool lock_device;
|
||||
QString device_model;
|
||||
QString firmware_version;
|
||||
QString motor_version;
|
||||
};
|
||||
|
||||
AnalysisJson() = delete ;
|
||||
|
|
|
@ -355,6 +355,7 @@ void MainWindow::on_pushButton_generate_clicked()
|
|||
deviceInfo.deviceType = ui->comboBox_deviceType->currentText();
|
||||
deviceInfo.deviceModel = ui->lineEdit_deviceModel->text();
|
||||
deviceInfo.fwVersion = ui->lineEdit_fwVersion->text();
|
||||
deviceInfo.motorVersion = ui->lineEdit_motorVersion->text();
|
||||
deviceInfo.vid = ui->lineEdit_vid->text();
|
||||
deviceInfo.pid = ui->lineEdit_pid->text();
|
||||
deviceInfo.sleepTime = ui->comboBox_sleepTime->currentText();
|
||||
|
@ -381,6 +382,8 @@ void MainWindow::on_pushButton_generate_clicked()
|
|||
globalObject.insert("device-model", ui->lineEdit_deviceModel->text());
|
||||
if (!ui->lineEdit_fwVersion->text().isEmpty())
|
||||
globalObject.insert("firmware-version", ui->lineEdit_fwVersion->text());
|
||||
if (!ui->lineEdit_motorVersion->text().isEmpty())
|
||||
globalObject.insert("motor-version", ui->lineEdit_motorVersion->text());
|
||||
|
||||
QJsonObject json;
|
||||
json.insert("global", QJsonValue(globalObject));
|
||||
|
|
|
@ -31,6 +31,7 @@ struct DeviceInfo
|
|||
QString deviceType;
|
||||
QString deviceModel;
|
||||
QString fwVersion;
|
||||
QString motorVersion;
|
||||
QString vid;
|
||||
QString pid;
|
||||
QString sleepTime;
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1008</width>
|
||||
<height>753</height>
|
||||
<width>1013</width>
|
||||
<height>738</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -17,9 +17,9 @@
|
|||
<widget class="QLineEdit" name="lineEdit_pid">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>740</x>
|
||||
<y>40</y>
|
||||
<width>161</width>
|
||||
<x>840</x>
|
||||
<y>20</y>
|
||||
<width>131</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -29,7 +29,7 @@
|
|||
<rect>
|
||||
<x>130</x>
|
||||
<y>20</y>
|
||||
<width>161</width>
|
||||
<width>131</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -37,8 +37,8 @@
|
|||
<widget class="QLabel" name="label_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>680</x>
|
||||
<y>40</y>
|
||||
<x>780</x>
|
||||
<y>20</y>
|
||||
<width>41</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
|
@ -50,9 +50,9 @@
|
|||
<widget class="QLineEdit" name="lineEdit_fwVersion">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>440</x>
|
||||
<x>380</x>
|
||||
<y>90</y>
|
||||
<width>161</width>
|
||||
<width>131</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -73,9 +73,9 @@
|
|||
<widget class="QLineEdit" name="lineEdit_vid">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>740</x>
|
||||
<y>10</y>
|
||||
<width>161</width>
|
||||
<x>610</x>
|
||||
<y>20</y>
|
||||
<width>131</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -83,7 +83,7 @@
|
|||
<widget class="QLabel" name="label_15">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>330</x>
|
||||
<x>270</x>
|
||||
<y>90</y>
|
||||
<width>101</width>
|
||||
<height>21</height>
|
||||
|
@ -96,8 +96,8 @@
|
|||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>680</x>
|
||||
<y>10</y>
|
||||
<x>550</x>
|
||||
<y>20</y>
|
||||
<width>41</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
|
@ -109,8 +109,8 @@
|
|||
<widget class="QPushButton" name="pushButton_generate">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>430</x>
|
||||
<y>640</y>
|
||||
<x>450</x>
|
||||
<y>620</y>
|
||||
<width>131</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
|
@ -124,7 +124,7 @@
|
|||
<rect>
|
||||
<x>130</x>
|
||||
<y>90</y>
|
||||
<width>161</width>
|
||||
<width>131</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -145,8 +145,8 @@
|
|||
<widget class="QLabel" name="label_7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>650</x>
|
||||
<y>110</y>
|
||||
<x>750</x>
|
||||
<y>90</y>
|
||||
<width>91</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
|
@ -158,9 +158,9 @@
|
|||
<widget class="QLineEdit" name="lineEdit_cpuSize">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>740</x>
|
||||
<y>80</y>
|
||||
<width>161</width>
|
||||
<x>610</x>
|
||||
<y>90</y>
|
||||
<width>131</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -168,7 +168,7 @@
|
|||
<widget class="QLabel" name="label_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<x>280</x>
|
||||
<y>160</y>
|
||||
<width>101</width>
|
||||
<height>21</height>
|
||||
|
@ -181,9 +181,9 @@
|
|||
<widget class="QComboBox" name="comboBox_speedMode">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>130</x>
|
||||
<x>380</x>
|
||||
<y>160</y>
|
||||
<width>161</width>
|
||||
<width>131</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -191,7 +191,7 @@
|
|||
<widget class="QLabel" name="label_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>360</x>
|
||||
<x>530</x>
|
||||
<y>160</y>
|
||||
<width>71</width>
|
||||
<height>21</height>
|
||||
|
@ -204,9 +204,9 @@
|
|||
<widget class="QComboBox" name="comboBox_lockDevice">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>740</x>
|
||||
<x>840</x>
|
||||
<y>160</y>
|
||||
<width>161</width>
|
||||
<width>131</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -214,8 +214,8 @@
|
|||
<widget class="QLabel" name="label_8">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>650</x>
|
||||
<y>80</y>
|
||||
<x>520</x>
|
||||
<y>90</y>
|
||||
<width>91</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
|
@ -227,9 +227,9 @@
|
|||
<widget class="QLineEdit" name="lineEdit_diskSize">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>740</x>
|
||||
<y>110</y>
|
||||
<width>161</width>
|
||||
<x>840</x>
|
||||
<y>90</y>
|
||||
<width>131</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -237,9 +237,9 @@
|
|||
<widget class="QComboBox" name="comboBox_sleepTime">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>440</x>
|
||||
<x>610</x>
|
||||
<y>160</y>
|
||||
<width>161</width>
|
||||
<width>131</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -247,7 +247,7 @@
|
|||
<widget class="QLabel" name="label_9">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>650</x>
|
||||
<x>750</x>
|
||||
<y>160</y>
|
||||
<width>71</width>
|
||||
<height>21</height>
|
||||
|
@ -261,7 +261,7 @@
|
|||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>280</y>
|
||||
<y>260</y>
|
||||
<width>621</width>
|
||||
<height>291</height>
|
||||
</rect>
|
||||
|
@ -270,9 +270,9 @@
|
|||
<widget class="QComboBox" name="comboBox_deviceType">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>440</x>
|
||||
<x>380</x>
|
||||
<y>20</y>
|
||||
<width>161</width>
|
||||
<width>131</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -280,7 +280,7 @@
|
|||
<widget class="QLabel" name="label_16">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>360</x>
|
||||
<x>300</x>
|
||||
<y>20</y>
|
||||
<width>71</width>
|
||||
<height>20</height>
|
||||
|
@ -294,7 +294,7 @@
|
|||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>230</y>
|
||||
<y>220</y>
|
||||
<width>971</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
|
@ -307,7 +307,7 @@
|
|||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>590</y>
|
||||
<y>580</y>
|
||||
<width>77</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
|
@ -320,19 +320,42 @@
|
|||
<property name="geometry">
|
||||
<rect>
|
||||
<x>650</x>
|
||||
<y>280</y>
|
||||
<y>260</y>
|
||||
<width>341</width>
|
||||
<height>291</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>160</y>
|
||||
<width>91</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Motor version:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_motorVersion">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>130</x>
|
||||
<y>160</y>
|
||||
<width>131</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1008</width>
|
||||
<width>1013</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
|
Binary file not shown.
|
@ -130,40 +130,45 @@
|
|||
<translation type="vanished">取消</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="568"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="575"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="584"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="591"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="616"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="623"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="632"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="639"/>
|
||||
<source>tips</source>
|
||||
<translation>提示</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="516"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="564"/>
|
||||
<source>Speed mode</source>
|
||||
<translation>速度模式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="454"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="489"/>
|
||||
<source>Failed!</source>
|
||||
<translation>失败!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="461"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="496"/>
|
||||
<source>Succeed!</source>
|
||||
<translation>成功!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="509"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="545"/>
|
||||
<source>Inconsistent firmware detected, please burn the correct firmware, and check again</source>
|
||||
<translation>检测到固件版本不一致,请烧录正确的固件并重新检查</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="526"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="557"/>
|
||||
<source>Inconsistent motor version detected, please exchange the correct motor, and check again</source>
|
||||
<translation>检测到电机版本不一致,请更换正确的电机并重新检查</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="574"/>
|
||||
<source>Sleep time</source>
|
||||
<translation>休眠时间</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="535"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="583"/>
|
||||
<source>Vid and Pid</source>
|
||||
<translation>Vid和Pid</translation>
|
||||
</message>
|
||||
|
@ -176,32 +181,32 @@
|
|||
<translation type="vanished">检测到配置%1不一致,已重新配置,请再次检查</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="554"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="602"/>
|
||||
<source>Consistent configuration</source>
|
||||
<translation>配置一致!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="568"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="616"/>
|
||||
<source>device is lost</source>
|
||||
<translation>设备已丢失</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="575"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="623"/>
|
||||
<source>Serial num is empty</source>
|
||||
<translation>序列号为空</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="584"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="632"/>
|
||||
<source>sn is illegal</source>
|
||||
<translation>序列号不合法</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="591"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="639"/>
|
||||
<source>The device is testing</source>
|
||||
<translation>该设备正在进行测试</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="455"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="490"/>
|
||||
<source>set sn failed</source>
|
||||
<translation>设置序列号失败</translation>
|
||||
</message>
|
||||
|
@ -211,7 +216,7 @@
|
|||
<translation>设备名: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="308"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="331"/>
|
||||
<source>Target Configration:</source>
|
||||
<oldsource>Target Configration:
|
||||
</oldsource>
|
||||
|
@ -219,16 +224,16 @@
|
|||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="125"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="316"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="364"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="630"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="342"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="399"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="678"/>
|
||||
<source>Speep mode: %1PPM</source>
|
||||
<oldsource>Speep mode: %1PPM
|
||||
</oldsource>
|
||||
<translation>速度模式: %1PPM</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="430"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="465"/>
|
||||
<source>Pass</source>
|
||||
<translation>Pass</translation>
|
||||
</message>
|
||||
|
@ -242,9 +247,9 @@
|
|||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="142"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="317"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="365"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="631"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="343"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="400"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="679"/>
|
||||
<source>Sleep time: %1minute</source>
|
||||
<oldsource>Sleep time: %1minute
|
||||
</oldsource>
|
||||
|
@ -252,7 +257,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="166"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="632"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="680"/>
|
||||
<source>Vid: %1 Pid: %2</source>
|
||||
<oldsource>Vid: %1 Pid: %2
|
||||
</oldsource>
|
||||
|
@ -260,45 +265,51 @@
|
|||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="182"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="311"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="359"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="628"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="334"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="391"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="676"/>
|
||||
<source>Device model: %1</source>
|
||||
<translation>设备型号: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="314"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="362"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="337"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="394"/>
|
||||
<source>Firmware version: %1</source>
|
||||
<translation>固件版本:%1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="318"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="366"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="340"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="397"/>
|
||||
<source>Motor version: %1</source>
|
||||
<translation>电机板版本号:%1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="344"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="401"/>
|
||||
<source>Vid: %1
|
||||
Pid: %2</source>
|
||||
<translation>Vid: %1
|
||||
Pid: %2</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="356"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="388"/>
|
||||
<source>Current Configration of device:</source>
|
||||
<translation>当前设备配置:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="435"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="470"/>
|
||||
<source>Fail</source>
|
||||
<translation>Fail</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="450"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="454"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="461"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="485"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="489"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="496"/>
|
||||
<source>Set serial number: %1 </source>
|
||||
<translation>设置序列号: %1 </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="493"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="529"/>
|
||||
<source>Device model</source>
|
||||
<translation>设备型号</translation>
|
||||
</message>
|
||||
|
@ -311,14 +322,14 @@ Pid: %2</translation>
|
|||
<translation type="vanished">检测到%1不一致,请烧录正确的固件并重新检查</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="546"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="642"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="594"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="690"/>
|
||||
<source>Detected that the current device's vid-pid and device object are not consistent. </source>
|
||||
<translation>检测到当前设备的vid-pid和设备对象不一致. </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="547"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="643"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="595"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="691"/>
|
||||
<source>Please reboot device to update. </source>
|
||||
<translation>请重启设备刷新. </translation>
|
||||
</message>
|
||||
|
@ -339,24 +350,24 @@ Pid: %2</translation>
|
|||
<translation type="vanished">测试结果:成功!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="497"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="520"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="529"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="533"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="568"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="577"/>
|
||||
<source>Inconsistent configuration %1detected, please reconfigure, and check again</source>
|
||||
<translation>检测到配置 %1不一致,请重新配置后再次检查</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="538"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="586"/>
|
||||
<source>Inconsistent configuration %1detected, please reboot and reconfigure, and check again</source>
|
||||
<translation>检测到配置 %1不一致,请重启后再次检查</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="634"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="682"/>
|
||||
<source>Set configuration to device </source>
|
||||
<translation>将目标配置设置到设备 </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="635"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="683"/>
|
||||
<source>Test content: </source>
|
||||
<translation>测试内容: </translation>
|
||||
</message>
|
||||
|
@ -366,20 +377,20 @@ Pid: %2</translation>
|
|||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="142"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="317"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="365"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="631"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="343"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="400"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="679"/>
|
||||
<source>Sleep time: Not sleeping</source>
|
||||
<translation>休眠时间: 不休眠</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="450"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="634"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="485"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="682"/>
|
||||
<source>Tester: %1, Test item: %2</source>
|
||||
<translation>测试员: %1, 测试项: %2</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="462"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="497"/>
|
||||
<source>set sn succeed</source>
|
||||
<translation>设置序列号成功</translation>
|
||||
</message>
|
||||
|
@ -564,12 +575,12 @@ Pid: %2</translation>
|
|||
<translation>英文</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_userinput.cpp" line="98"/>
|
||||
<location filename="dialog_userinput.cpp" line="104"/>
|
||||
<source>tips</source>
|
||||
<translation>提示</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_userinput.cpp" line="98"/>
|
||||
<location filename="dialog_userinput.cpp" line="104"/>
|
||||
<source>please input valid contents</source>
|
||||
<translation>请输入有效内容</translation>
|
||||
</message>
|
||||
|
@ -1436,7 +1447,7 @@ Pid: %2</translation>
|
|||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="271"/>
|
||||
<location filename="form_maininterface.cpp" line="641"/>
|
||||
<location filename="form_maininterface.cpp" line="649"/>
|
||||
<source>Not sleeping</source>
|
||||
<translation>不休眠</translation>
|
||||
</message>
|
||||
|
@ -1463,16 +1474,16 @@ Pid: %2</translation>
|
|||
<translation type="vanished">设备序列号: %1, 测试项: %2, 测试结果: 通过!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="808"/>
|
||||
<location filename="form_maininterface.cpp" line="879"/>
|
||||
<location filename="form_maininterface.cpp" line="832"/>
|
||||
<location filename="form_maininterface.cpp" line="936"/>
|
||||
<source>device history scan count:</source>
|
||||
<translation>设备历史扫描张数:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="700"/>
|
||||
<location filename="form_maininterface.cpp" line="704"/>
|
||||
<location filename="form_maininterface.cpp" line="708"/>
|
||||
<location filename="form_maininterface.cpp" line="712"/>
|
||||
<location filename="form_maininterface.cpp" line="716"/>
|
||||
<location filename="form_maininterface.cpp" line="720"/>
|
||||
<source>Prompt</source>
|
||||
<translation>提示</translation>
|
||||
</message>
|
||||
|
@ -1504,22 +1515,22 @@ Pid: %2</translation>
|
|||
<translation>测试员: %1, 测试项: %2, 测试结果: 通过!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="700"/>
|
||||
<location filename="form_maininterface.cpp" line="708"/>
|
||||
<source>No paper</source>
|
||||
<translation>无纸</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="704"/>
|
||||
<location filename="form_maininterface.cpp" line="712"/>
|
||||
<source>Device is sleeping</source>
|
||||
<translation>设备处于休眠模式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="708"/>
|
||||
<location filename="form_maininterface.cpp" line="716"/>
|
||||
<source>Counting mode</source>
|
||||
<translation>设备处于计数模式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="712"/>
|
||||
<location filename="form_maininterface.cpp" line="720"/>
|
||||
<source>Other error</source>
|
||||
<translation>其他错误</translation>
|
||||
</message>
|
||||
|
@ -1621,8 +1632,8 @@ Pid: %2</translation>
|
|||
<translation type="vanished">Pid:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="802"/>
|
||||
<location filename="form_maininterface.cpp" line="873"/>
|
||||
<location filename="form_maininterface.cpp" line="826"/>
|
||||
<location filename="form_maininterface.cpp" line="930"/>
|
||||
<source>device roller count:</source>
|
||||
<translation>设备滚轴张数:</translation>
|
||||
</message>
|
||||
|
@ -1674,7 +1685,7 @@ Pid: %2</translation>
|
|||
<translation>实际硬盘容量:%1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="643"/>
|
||||
<location filename="form_maininterface.cpp" line="651"/>
|
||||
<source> minute</source>
|
||||
<translation> 分钟</translation>
|
||||
</message>
|
||||
|
@ -1930,19 +1941,19 @@ Pid: %2</translation>
|
|||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="hgscanner.cpp" line="168"/>
|
||||
<location filename="hgscanner.cpp" line="172"/>
|
||||
<source>success: </source>
|
||||
<oldsource>success</oldsource>
|
||||
<translation>成功: </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="hgscanner.cpp" line="112"/>
|
||||
<location filename="hgscanner.cpp" line="170"/>
|
||||
<location filename="hgscanner.cpp" line="116"/>
|
||||
<location filename="hgscanner.cpp" line="174"/>
|
||||
<source>failed: </source>
|
||||
<translation>失败: </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="hgscanner.cpp" line="96"/>
|
||||
<location filename="hgscanner.cpp" line="100"/>
|
||||
<source>Not find test item</source>
|
||||
<translation>没有找到该测试项</translation>
|
||||
</message>
|
||||
|
|
|
@ -59,7 +59,8 @@ AnalysisJson::json_global AnalysisJson::GetGlobal()
|
|||
obj["device-model"].toString(),
|
||||
obj["cpu-size"].toDouble(),
|
||||
obj["disk-size"].toDouble(),
|
||||
obj["firmware-version"].toString()};
|
||||
obj["firmware-version"].toString(),
|
||||
obj["motor-version"].toString()};
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ public:
|
|||
double cpu_size;
|
||||
double disk_size;
|
||||
QString firmware_version;
|
||||
QString motor_version;
|
||||
};
|
||||
|
||||
AnalysisJson() = delete ;
|
||||
|
|
|
@ -292,6 +292,20 @@ QString Dialog_InputSerialNum::getDeviceFwVersion()
|
|||
return QString::fromStdString(firmwareVersion).left(10);
|
||||
}
|
||||
|
||||
QString Dialog_InputSerialNum::getDeviceMotorVersion()
|
||||
{
|
||||
std::string motorVersion;
|
||||
unsigned int motorVersionLen = 0;
|
||||
|
||||
SANE_Status ret = sane_io_control(m_handle, IO_CTRL_CODE_GET_MOTOR_VERSION, &motorVersion[0], &motorVersionLen);
|
||||
if(SANE_STATUS_NO_MEM == ret)
|
||||
{
|
||||
motorVersion.resize(motorVersionLen);
|
||||
ret = sane_io_control(m_handle, IO_CTRL_CODE_GET_MOTOR_VERSION, &motorVersion[0], &motorVersionLen);
|
||||
}
|
||||
return QString::fromStdString(motorVersion.c_str());
|
||||
}
|
||||
|
||||
void Dialog_InputSerialNum::updateTargetCfg()
|
||||
{
|
||||
ui->textBrowser_target->clear();
|
||||
|
@ -305,6 +319,7 @@ void Dialog_InputSerialNum::updateTargetCfg()
|
|||
int pid_to = jsonGlobal.pid_to;
|
||||
QString devideModel = jsonGlobal.device_model;
|
||||
QString fwVersion = jsonGlobal.firmware_version;
|
||||
QString motorVersion = jsonGlobal.motor_version;
|
||||
|
||||
char buf[10];
|
||||
sprintf(buf, "%x", vid_to);
|
||||
|
@ -321,6 +336,9 @@ void Dialog_InputSerialNum::updateTargetCfg()
|
|||
if (!fwVersion.isEmpty())
|
||||
content.append(tr("Firmware version: %1").arg(fwVersion) + "\n");
|
||||
|
||||
if (!motorVersion.isEmpty())
|
||||
content.append(tr("Motor version: %1").arg(motorVersion) + "\n");
|
||||
|
||||
content.append(tr("Speep mode: %1PPM").arg(QString::number(speedMode)) + "\n");
|
||||
content.append((sleepTime > 0 ? tr("Sleep time: %1minute").arg(QString::number(sleepTime)) : tr("Sleep time: Not sleeping")) + "\n");
|
||||
content.append(tr("Vid: %1\nPid: %2").arg(QString::fromStdString(buf)).arg(QString::fromStdString(buf2)) + "\n");
|
||||
|
@ -354,6 +372,12 @@ void Dialog_InputSerialNum::updateCurDeviceCfg()
|
|||
fwVersion = getDeviceFwVersion();
|
||||
}
|
||||
|
||||
QString motorVersion("");
|
||||
if (!jsonGlobal.motor_version.isEmpty())
|
||||
{
|
||||
motorVersion = getDeviceMotorVersion();
|
||||
}
|
||||
|
||||
char buf[10];
|
||||
sprintf(buf, "%x", vid_to);
|
||||
|
||||
|
@ -369,6 +393,9 @@ void Dialog_InputSerialNum::updateCurDeviceCfg()
|
|||
if (!fwVersion.isEmpty())
|
||||
content.append(tr("Firmware version: %1").arg(fwVersion) + "\n");
|
||||
|
||||
if (!motorVersion.isEmpty())
|
||||
content.append(tr("Motor version: %1").arg(motorVersion) + "\n");
|
||||
|
||||
content.append(tr("Speep mode: %1PPM").arg(QString::number(speedMode)) + "\n");
|
||||
content.append(sleepTime > 0 ? tr("Sleep time: %1minute").arg(QString::number(sleepTime)) + "\n" : tr("Sleep time: Not sleeping") + "\n");
|
||||
content.append(tr("Vid: %1\nPid: %2").arg(QString::fromStdString(buf)).arg(QString::fromStdString(buf2)) + "\n");
|
||||
|
@ -483,6 +510,7 @@ void Dialog_InputSerialNum::on_pbtn_checkConfig_clicked()
|
|||
int pid_to = jsonGlobal.pid_to;
|
||||
QString deviceModel_to = jsonGlobal.device_model;
|
||||
QString firmwareVersion_to = jsonGlobal.firmware_version;
|
||||
QString motorVersion_to = jsonGlobal.motor_version;
|
||||
|
||||
int speedMode = getSpeedMode();
|
||||
int sleepTime = getSleepTime();
|
||||
|
@ -519,6 +547,18 @@ void Dialog_InputSerialNum::on_pbtn_checkConfig_clicked()
|
|||
}
|
||||
}
|
||||
|
||||
if (!motorVersion_to.isEmpty())
|
||||
{
|
||||
QString motorVersion = getDeviceMotorVersion();
|
||||
if (motorVersion_to != motorVersion)
|
||||
{
|
||||
right = false;
|
||||
|
||||
QString info = tr("Inconsistent motor version detected, please exchange the correct motor, and check again");
|
||||
addInteractInfo(info, false);
|
||||
}
|
||||
}
|
||||
|
||||
if (speedMode_to != speedMode)
|
||||
{
|
||||
item.append(tr("Speed mode"));
|
||||
|
|
|
@ -36,6 +36,7 @@ public:
|
|||
int getDevPid();
|
||||
QString getDeviceModel();
|
||||
QString getDeviceFwVersion();
|
||||
QString getDeviceMotorVersion();
|
||||
|
||||
private:
|
||||
void updateTargetCfg();
|
||||
|
|
|
@ -507,6 +507,7 @@ public:
|
|||
{
|
||||
if ( wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_CIS_ORIGINAL_IMAGE) == 0
|
||||
||wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_COLOR_QUALITY) == 0
|
||||
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_SKEW_DETECTION) == 0
|
||||
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_GRAY_QUALITY) == 0
|
||||
||wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_GET_DISTORTION_VAL) == 0
|
||||
||wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_CONFIRM_DISTORTION_VAL) == 0
|
||||
|
@ -835,7 +836,7 @@ public:
|
|||
if (ret != SCANNER_ERR_OK)
|
||||
return ret;
|
||||
|
||||
ret = helper_->io_control(IO_CTRL_CODE_TEST_SINGLE, NULL, NULL);
|
||||
ret = helper_->io_control(IO_CTRL_CODE_GET_IMAGE, NULL, NULL);
|
||||
return ret;
|
||||
}
|
||||
/* 分纸电机检测 */
|
||||
|
|
Loading…
Reference in New Issue