From 150902fe1ff9df005f07be155f29114098723092 Mon Sep 17 00:00:00 2001 From: zhaohe Date: Sat, 6 Jul 2024 14:35:06 +0800 Subject: [PATCH] update --- a8000_protocol | 2 +- src/tab/plate_code_scaner_tab.cpp | 34 ++++++++++++++++------------------ src/version.h | 4 ++-- 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/a8000_protocol b/a8000_protocol index 17dfc0a..e1bab29 160000 --- a/a8000_protocol +++ b/a8000_protocol @@ -1 +1 @@ -Subproject commit 17dfc0ae187c70241017a7e7d64f19c78859b712 +Subproject commit e1bab29823705e2518e61de9e2dc3d8535a5eaa6 diff --git a/src/tab/plate_code_scaner_tab.cpp b/src/tab/plate_code_scaner_tab.cpp index de6de88..dcff4fe 100644 --- a/src/tab/plate_code_scaner_tab.cpp +++ b/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); diff --git a/src/version.h b/src/version.h index 6682bee..99bbe61 100644 --- a/src/version.h +++ b/src/version.h @@ -1,4 +1,4 @@ #pragma once -#define VERSION "VERSION_13" -#define MAUFACTURER "iflytop" \ No newline at end of file +#define VERSION "VERSION_15" +#define MAUFACTURER "iflytop"