diff --git a/README.md b/README.md index 286c85e..7dafcac 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,6 @@ V14: V18: 添加信号延迟配置功能 -V19: +V19,20: 修复信号延迟配置功能的BUG ``` \ No newline at end of file diff --git a/mainwindow.cpp b/mainwindow.cpp index f5c4d19..e86fbd1 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -402,7 +402,7 @@ zaf_error_code_t MainWindow::refreshPage() { ui->LightSrcX_TriSrc_##index->setCurrentText(QString::fromStdString(src.toString())); \ ui->LightSrcX_TriggerModePluseWidth_##index->setText(QString::number(width)); \ ui->LightSrcX_TriggerModeFirstPluseOffset_##index->setText(QString::number(offset)); \ - ui->LightSrcX_TriggerModePluseDelay_##index->setText(QString::number(delay)); \ + ui->LightSrcX_TriggerModePluseDelay_##index->setText(QString::number(5)); \ ui->LightSrcX_LightIntensityDuty_##index->setText(QString::number(duty, 'f', 3)); \ ui->LightSrcX_LightDriverFreq_##index->setText(QString::number(freq, 'f', 2)); diff --git a/release/IFlytopLTC_v20.exe b/release/IFlytopLTC_v20.exe new file mode 100644 index 0000000..111deb0 Binary files /dev/null and b/release/IFlytopLTC_v20.exe differ diff --git a/src/camera_light_src_timing_controller/clst_controler.cpp b/src/camera_light_src_timing_controller/clst_controler.cpp index dd66a51..e1c6ff6 100644 --- a/src/camera_light_src_timing_controller/clst_controler.cpp +++ b/src/camera_light_src_timing_controller/clst_controler.cpp @@ -593,9 +593,9 @@ zaf_error_code_t CLSTControler::LightSrcX_setTriggerModePluseWidth(int32_t index return reg_write(kreg_light_ctrol_module1_trigger_mode_pluse_width + (index - 1) * 32, width * 10); // 0.1us } -zaf_error_code_t CLSTControler::LightSrcX_setTriggerModePluseDelay(int32_t index, uint32_t width) { // +zaf_error_code_t CLSTControler::LightSrcX_setTriggerModePluseDelay(int32_t index, uint32_t delay) { // if (index < 1 || index > 4) return kaf_ec_param_error; - return reg_write(kreg_light_ctrol_module1_trigger_mode_pluse_delay + (index - 1) * 32, width); // 0.1us + return reg_write(kreg_light_ctrol_module1_trigger_mode_pluse_delay + (index - 1) * 32, delay); // 0.1us } zaf_error_code_t CLSTControler::LightSrcX_setTriggerModeFirstPluseOffset(int32_t index, uint32_t offset) { // @@ -653,10 +653,11 @@ zaf_error_code_t CLSTControler::LightSrcX_getTriggerModeFirstPluseOffset(int32_t offset = val / 10; return kaf_ec_success; } -zaf_error_code_t CLSTControler::LightSrcX_getTriggerModePluseDelay(int32_t index, uint32_t &offset) { // +zaf_error_code_t CLSTControler::LightSrcX_getTriggerModePluseDelay(int32_t index, uint32_t &delay) { // if (index < 1 || index > 4) return kaf_ec_param_error; uint32_t val; DO_CMD(reg_read(kreg_light_ctrol_module1_trigger_mode_pluse_delay + (index - 1) * 32, val)); + delay = val; return kaf_ec_success; } zaf_error_code_t CLSTControler::LightSrcX_getLightIntensityDuty(int32_t index, float &duty) { // diff --git a/src/camera_light_src_timing_controller/clst_controler.hpp b/src/camera_light_src_timing_controller/clst_controler.hpp index 88ac01e..13a090d 100644 --- a/src/camera_light_src_timing_controller/clst_controler.hpp +++ b/src/camera_light_src_timing_controller/clst_controler.hpp @@ -143,14 +143,14 @@ class CLSTControler { * 光源控制 * *******************************************************************************/ zaf_error_code_t LightSrcX_setTriSrc(int32_t index, InternalSig src); - zaf_error_code_t LightSrcX_setTriggerModePluseDelay(int32_t index, uint32_t width); + zaf_error_code_t LightSrcX_setTriggerModePluseDelay(int32_t index, uint32_t delay); zaf_error_code_t LightSrcX_setTriggerModePluseWidth(int32_t index, uint32_t width); zaf_error_code_t LightSrcX_setTriggerModeFirstPluseOffset(int32_t index, uint32_t offset); zaf_error_code_t LightSrcX_setLightIntensityDuty(int32_t index, float duty); zaf_error_code_t LightSrcX_setLightDriverFreq(int32_t index, float freq); zaf_error_code_t LightSrcX_getTriSrc(int32_t index, InternalSig &src); - zaf_error_code_t LightSrcX_getTriggerModePluseDelay(int32_t index, uint32_t &width); + zaf_error_code_t LightSrcX_getTriggerModePluseDelay(int32_t index, uint32_t &delay); zaf_error_code_t LightSrcX_getTriggerModePluseWidth(int32_t index, uint32_t &width); zaf_error_code_t LightSrcX_getTriggerModeFirstPluseOffset(int32_t index, uint32_t &offset); zaf_error_code_t LightSrcX_getLightIntensityDuty(int32_t index, float &duty); diff --git a/src/version.h b/src/version.h index 04e2db8..167c8d8 100644 --- a/src/version.h +++ b/src/version.h @@ -1,4 +1,4 @@ #pragma once -#define VERSION 19 +#define VERSION 20 #define MAUFACTURER "iflytop" \ No newline at end of file