|
|
@ -74,24 +74,24 @@ void PlateCodeScanerTab::construct(QTabWidget *fathertab) { |
|
|
|
|
|
|
|
ZQUI::ins()->ishow("pointNum:%d", rawcode.len / 2); |
|
|
|
|
|
|
|
// DoInUi([this, rawcode]() {
|
|
|
|
// WidgetPlot2D *plot2d = new WidgetPlot2D();
|
|
|
|
// QStringList lines;
|
|
|
|
// lines.push_back("line1");
|
|
|
|
// plot2d->initGraphName(lines);
|
|
|
|
DoInUi([this, rawcode]() { |
|
|
|
WidgetPlot2D *plot2d = new WidgetPlot2D(); |
|
|
|
QStringList lines; |
|
|
|
lines.push_back("line1"); |
|
|
|
plot2d->initGraphName(lines); |
|
|
|
|
|
|
|
// int16_t *point_table = (int16_t *)rawcode.buf;
|
|
|
|
int16_t *point_table = (int16_t *)rawcode.buf; |
|
|
|
|
|
|
|
// for (int i = 0; i < rawcode.len / 2; i++) {
|
|
|
|
// plot2d->addData("line1", point_table[i]);
|
|
|
|
// }
|
|
|
|
for (int i = 0; i < rawcode.len / 2; i++) { |
|
|
|
plot2d->addData("line1", point_table[i]); |
|
|
|
} |
|
|
|
|
|
|
|
// for (int i = 0; i < 15; i++) {
|
|
|
|
// plot2d->addRefLine(i * 12 + 6);
|
|
|
|
// }
|
|
|
|
for (int i = 0; i < 15; i++) { |
|
|
|
plot2d->addRefLine(i * 12 + 6); |
|
|
|
} |
|
|
|
|
|
|
|
// plot2d->show();
|
|
|
|
// });
|
|
|
|
plot2d->show(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
box->newFunc("读取条码", {}, [this](int argn, const char **args) { |
|
|
@ -118,8 +118,8 @@ void PlateCodeScanerTab::construct(QTabWidget *fathertab) { |
|
|
|
box->newSubButton("打开激光", [this](int argn, const char **args) { ICM->callcmd0(getDeviceId(), kplate_code_scaner_open_laser); }); |
|
|
|
box->newSubButton("关闭激光", [this](int argn, const char **args) { ICM->callcmd0(getDeviceId(), kplate_code_scaner_close_laser); }); |
|
|
|
|
|
|
|
box->newFunc("设置激光发射功率", {"0...100"}, [this](int argn, const char **args) { ICM->writereg(getDeviceId(), kreg_plate_code_scaner_laster_intensity, atoi(args[0])); }); |
|
|
|
box->newFunc("设置扫描增益", {"0...20"}, [this](int argn, const char **args) { ICM->writereg(getDeviceId(), kreg_plate_code_scaner_scan_gain, atof(args[0]) * 10); }); |
|
|
|
box->newFunc("设置激光发射功率(0\\%,100\\%)", {"0...100"}, [this](int argn, const char **args) { ICM->writereg(getDeviceId(), kreg_plate_code_scaner_laster_intensity, atoi(args[0])); }); |
|
|
|
// box->newFunc("设置扫描增益倍(0-20)", {"0...20"}, [this](int argn, const char **args) { ICM->writereg(getDeviceId(), kreg_plate_code_scaner_scan_gain, atof(args[0]) * 10); });
|
|
|
|
} |
|
|
|
|
|
|
|
tab->addSpacer(); |
|
|
@ -136,8 +136,6 @@ void PlateCodeScanerTab::construct(QTabWidget *fathertab) { |
|
|
|
return true; |
|
|
|
}); |
|
|
|
|
|
|
|
tableBox->addReg("laster_intensity", kreg_plate_code_scaner_laster_intensity, ZRegItem::krw | ZRegItem::kdec); |
|
|
|
tableBox->addReg("scan_gain", kreg_plate_code_scaner_scan_gain, ZRegItem::krw | ZRegItem::kdec); |
|
|
|
|
|
|
|
tableBox->addReg("laster_intensity", kreg_plate_code_scaner_laster_intensity, ZRegItem::krw | ZRegItem::kdec); |
|
|
|
tableBox->addReg("scan_gain", kreg_plate_code_scaner_scan_gain, ZRegItem::krw | ZRegItem::kdec); |
|
|
|