Browse Source

update

master
zhaohe 1 year ago
parent
commit
150902fe1f
  1. 2
      a8000_protocol
  2. 34
      src/tab/plate_code_scaner_tab.cpp
  3. 4
      src/version.h

2
a8000_protocol

@ -1 +1 @@
Subproject commit 17dfc0ae187c70241017a7e7d64f19c78859b712
Subproject commit e1bab29823705e2518e61de9e2dc3d8535a5eaa6

34
src/tab/plate_code_scaner_tab.cpp

@ -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);

4
src/version.h

@ -1,4 +1,4 @@
#pragma once
#define VERSION "VERSION_13"
#define MAUFACTURER "iflytop"
#define VERSION "VERSION_15"
#define MAUFACTURER "iflytop"
Loading…
Cancel
Save