diff --git a/.gitignore b/.gitignore index 7f96686..f9259fe 100644 --- a/.gitignore +++ b/.gitignore @@ -70,4 +70,5 @@ Thumbs.db # -------- *.dll -build \ No newline at end of file +build +CMakeLists.txt.user diff --git a/CMakeLists.txt b/CMakeLists.txt index 19a3ae3..08dc119 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.5) -project(zfpga_pc VERSION 0.1 LANGUAGES CXX) +project(IflyLogic VERSION 0.1 LANGUAGES CXX) set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -37,19 +37,19 @@ set(PROJECT_SOURCES app.rc ) -add_executable(zfpga_pc WIN32 +add_executable(IflyLogic WIN32 ${PROJECT_SOURCES} ) -target_link_options(zfpga_pc PRIVATE -static -static-libgcc -static-libstdc++) +target_link_options(IflyLogic PRIVATE -static -static-libgcc -static-libstdc++) -target_link_libraries(zfpga_pc PRIVATE Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::SerialPort Qt${QT_VERSION_MAJOR}::Charts Qt${QT_VERSION_MAJOR}::Concurrent wsock32) +target_link_libraries(IflyLogic PRIVATE Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::SerialPort Qt${QT_VERSION_MAJOR}::Charts Qt${QT_VERSION_MAJOR}::Concurrent wsock32) -set_target_properties(zfpga_pc PROPERTIES +set_target_properties(IflyLogic PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION} MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} ) if(QT_VERSION_MAJOR EQUAL 6) - qt_finalize_executable(zfpga_pc) + qt_finalize_executable(IflyLogic) endif() diff --git a/CMakeLists.txt.user b/CMakeLists.txt.user deleted file mode 100644 index 2cb9ce5..0000000 --- a/CMakeLists.txt.user +++ /dev/null @@ -1,320 +0,0 @@ - - - - - - EnvironmentId - {4b1b8946-9605-410f-846a-42fb19af5924} - - - ProjectExplorer.Project.ActiveTarget - 0 - - - ProjectExplorer.Project.EditorSettings - - true - false - true - - Cpp - - CppGlobal - - - - QmlJS - - QmlJSGlobal - - - 2 - UTF-8 - false - 4 - false - 80 - true - true - 1 - false - true - false - 0 - true - true - 0 - 8 - true - false - 1 - true - true - true - *.md, *.MD, Makefile - false - true - - - - ProjectExplorer.Project.PluginSettings - - - true - false - true - true - true - true - - - 0 - true - - -fno-delayed-template-parsing - - true - Builtin.BuildSystem - - true - true - Builtin.DefaultTidyAndClazy - 10 - - - - true - - - - - ProjectExplorer.Project.Target.0 - - Desktop - Desktop Qt 5.12.12 MinGW 64-bit - Desktop Qt 5.12.12 MinGW 64-bit - qt.qt5.51212.win64_mingw73_kit - 0 - 0 - 0 - - Debug - -GMinGW Makefiles --DCMAKE_BUILD_TYPE:STRING=Debug --DCMAKE_PROJECT_INCLUDE_BEFORE:PATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake --DQT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable} --DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX} --DCMAKE_C_COMPILER:STRING=%{Compiler:Executable:C} --DCMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx} - D:\zfpge_workspace\build-zfpga_pc-Desktop_Qt_5_12_12_MinGW_64_bit-Debug - - - - all - - true - Build - CMakeProjectManager.MakeStep - - 1 - Build - Build - ProjectExplorer.BuildSteps.Build - - - - - clean - - true - Build - CMakeProjectManager.MakeStep - - 1 - Clean - Clean - ProjectExplorer.BuildSteps.Clean - - 2 - false - - - Debug - CMakeProjectManager.CMakeBuildConfiguration - - - Release - -GMinGW Makefiles --DCMAKE_BUILD_TYPE:STRING=Release --DCMAKE_PROJECT_INCLUDE_BEFORE:PATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake --DQT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable} --DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX} --DCMAKE_C_COMPILER:STRING=%{Compiler:Executable:C} --DCMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx} - D:\zfpge_workspace\build-zfpga_pc-Desktop_Qt_5_12_12_MinGW_64_bit-Release - - - - all - - true - CMakeProjectManager.MakeStep - - 1 - Build - Build - ProjectExplorer.BuildSteps.Build - - - - - clean - - true - CMakeProjectManager.MakeStep - - 1 - Clean - Clean - ProjectExplorer.BuildSteps.Clean - - 2 - false - - - Release - CMakeProjectManager.CMakeBuildConfiguration - - - RelWithDebInfo - -GMinGW Makefiles --DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo --DCMAKE_PROJECT_INCLUDE_BEFORE:PATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake --DQT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable} --DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX} --DCMAKE_C_COMPILER:STRING=%{Compiler:Executable:C} --DCMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx} - D:\zfpge_workspace\build-zfpga_pc-Desktop_Qt_5_12_12_MinGW_64_bit-RelWithDebInfo - - - - all - - true - CMakeProjectManager.MakeStep - - 1 - Build - Build - ProjectExplorer.BuildSteps.Build - - - - - clean - - true - CMakeProjectManager.MakeStep - - 1 - Clean - Clean - ProjectExplorer.BuildSteps.Clean - - 2 - false - - - Release with Debug Information - CMakeProjectManager.CMakeBuildConfiguration - - - MinSizeRel - -GMinGW Makefiles --DCMAKE_BUILD_TYPE:STRING=MinSizeRel --DCMAKE_PROJECT_INCLUDE_BEFORE:PATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake --DQT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable} --DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX} --DCMAKE_C_COMPILER:STRING=%{Compiler:Executable:C} --DCMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx} - D:\zfpge_workspace\build-zfpga_pc-Desktop_Qt_5_12_12_MinGW_64_bit-MinSizeRel - - - - all - - true - CMakeProjectManager.MakeStep - - 1 - Build - Build - ProjectExplorer.BuildSteps.Build - - - - - clean - - true - CMakeProjectManager.MakeStep - - 1 - Clean - Clean - ProjectExplorer.BuildSteps.Clean - - 2 - false - - - Minimum Size Release - CMakeProjectManager.CMakeBuildConfiguration - - 4 - - - 0 - Deploy - Deploy - ProjectExplorer.BuildSteps.Deploy - - 1 - - false - ProjectExplorer.DefaultDeployConfiguration - - 1 - - true - true - true - - 2 - - zfpga_pc - CMakeProjectManager.CMakeRunConfiguration.zfpga_pc - zfpga_pc - false - true - true - false - true - D:/zfpge_workspace/build-zfpga_pc-Desktop_Qt_5_12_12_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.TargetCount - 1 - - - ProjectExplorer.Project.Updater.FileVersion - 22 - - - Version - 22 - - diff --git a/app.rc b/app.rc index c309aa1..ced6430 100644 --- a/app.rc +++ b/app.rc @@ -1 +1,2 @@ -IDI_ICON1 ICON "logo.ico" \ No newline at end of file +IDI_ICON1 ICON "logo.ico" +IDI_ICON2 ICON "logo128x128.ico" \ No newline at end of file diff --git a/logo.ico b/logo.ico index c7b5197..e878c5c 100644 Binary files a/logo.ico and b/logo.ico differ diff --git a/logo.png b/logo.png new file mode 100644 index 0000000..299d6fe Binary files /dev/null and b/logo.png differ diff --git a/logo.svg b/logo.svg new file mode 100644 index 0000000..8599f8d --- /dev/null +++ b/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/logo128x128.ico b/logo128x128.ico new file mode 100644 index 0000000..d00cafe Binary files /dev/null and b/logo128x128.ico differ diff --git a/logores/1/logo.ico b/logores/1/logo.ico new file mode 100644 index 0000000..0ea6ba4 Binary files /dev/null and b/logores/1/logo.ico differ diff --git a/logores/1/logo128x128.ico b/logores/1/logo128x128.ico new file mode 100644 index 0000000..7f8c8e0 Binary files /dev/null and b/logores/1/logo128x128.ico differ diff --git a/p_lusterinc_xsync - 快捷方式.lnk b/p_lusterinc_xsync - 快捷方式.lnk deleted file mode 100644 index 99d751c..0000000 Binary files a/p_lusterinc_xsync - 快捷方式.lnk and /dev/null differ diff --git a/src/app/syncbox16ch/syncbox16ch.cpp b/src/app/syncbox16ch/syncbox16ch.cpp index 4eaa29f..a0c1ed6 100644 --- a/src/app/syncbox16ch/syncbox16ch.cpp +++ b/src/app/syncbox16ch/syncbox16ch.cpp @@ -41,7 +41,7 @@ SyncBox16CH::SyncBox16CH(QWidget *parent) : QWidget(parent), ui(new Ui::SyncBox1 { // ui->OutputModeVal->addItems(QStringListValueOf(WorkModeStrList())); - ui->OutputPluseWidthVal->setText("1"); + ui->OutputPluseWidthVal->setText("10"); ui->OutputPluseNumVal->setText("1"); ui->OutputPluseFreqVal->setText("1000"); } @@ -119,10 +119,10 @@ void SyncBox16CH::on_SendButton_clicked() { ICLEAR(); try { - WorkMode_t outputMode = syncbox16chsdk::WorkModeValueOf(ui->OutputModeVal->currentText()); - uint32_t outputPluseWidthUs = zstr2int(ui->OutputPluseWidthVal->text()); - uint32_t outputPluseNum = zstr2int(ui->OutputPluseNumVal->text()); - uint32_t outputPluseFreq = zstr2int(ui->OutputPluseFreqVal->text()); + WorkMode_t outputMode = syncbox16chsdk::WorkModeValueOf(ui->OutputModeVal->currentText()); + uint32_t outputPluseWidth100ns = zstr2int(ui->OutputPluseWidthVal->text()); + uint32_t outputPluseNum = zstr2int(ui->OutputPluseNumVal->text()); + uint32_t outputPluseFreq = zstr2int(ui->OutputPluseFreqVal->text()); // void SyncBox16ChSDK::setPlusePeriod(uint32_t us) { cmder()->writeReg(kreg_app_trigger_mode_pluse_period, US2CNT(us)); } // void SyncBox16ChSDK::manualTrigger() { @@ -131,8 +131,8 @@ void SyncBox16CH::on_SendButton_clicked() { SDK->setPluseGeneratorMode(outputMode); if (outputMode == kWorkMode_manualTriMode) { SDK->setPluseNum(outputPluseNum); - SDK->setPluseWidth(outputPluseWidthUs); - SDK->setPlusePeriod(1.0 / outputPluseFreq * 1000 * 1000); + SDK->setPluseWidth(outputPluseWidth100ns * 10); + SDK->setPlusePeriod(1.0 / outputPluseFreq * 1000 * 1000 * 100); SDK->manualTrigger(); } } catch (const std::exception &e) { diff --git a/src/app/syncbox16ch/syncbox16ch.ui b/src/app/syncbox16ch/syncbox16ch.ui index 990b398..309f361 100644 --- a/src/app/syncbox16ch/syncbox16ch.ui +++ b/src/app/syncbox16ch/syncbox16ch.ui @@ -152,7 +152,7 @@ - 脉冲宽度(us) + 脉冲宽度(0.1us) diff --git a/src/app/syncbox16ch/syncbox16ch_sdk.cpp b/src/app/syncbox16ch/syncbox16ch_sdk.cpp index b5ba66f..d7a4fcb 100644 --- a/src/app/syncbox16ch/syncbox16ch_sdk.cpp +++ b/src/app/syncbox16ch/syncbox16ch_sdk.cpp @@ -31,11 +31,11 @@ using namespace iflytop; using namespace syncbox16chsdk; void SyncBox16ChSDK::initialize() { ZFPGACommander::ins()->initialize(); } -#define US2CNT(us) (us * 100) -#define CNT2US(cnt) (cnt * 10 / 1000.0) +// #define US2CNT(us) (uint32_t)(us * 100) +// #define CNT2US(cnt) (cnt * 10 / 1000.0) -void SyncBox16ChSDK::setPluseWidth(uint32_t us) { cmder()->writeReg(kreg_app_trigger_mode_pluse_width, US2CNT(us)); } -void SyncBox16ChSDK::setPlusePeriod(uint32_t us) { cmder()->writeReg(kreg_app_trigger_mode_pluse_period, US2CNT(us)); } +void SyncBox16ChSDK::setPluseWidth(uint32_t _10ns) { cmder()->writeReg(kreg_app_trigger_mode_pluse_width, _10ns); } +void SyncBox16ChSDK::setPlusePeriod(uint32_t _10ns) { cmder()->writeReg(kreg_app_trigger_mode_pluse_period, _10ns); } void SyncBox16ChSDK::setPluseNum(uint32_t npluse) { cmder()->writeReg(kreg_app_trigger_mode_pluse_num, npluse); } void SyncBox16ChSDK::setPluseGeneratorMode(WorkMode_t mode) { cmder()->writeReg(kreg_app_mode, (uint32_t)mode); } void SyncBox16ChSDK::manualTrigger() { diff --git a/src/app/syncbox16ch/syncbox16ch_sdk.hpp b/src/app/syncbox16ch/syncbox16ch_sdk.hpp index f577a17..15bfd17 100644 --- a/src/app/syncbox16ch/syncbox16ch_sdk.hpp +++ b/src/app/syncbox16ch/syncbox16ch_sdk.hpp @@ -74,8 +74,8 @@ class SyncBox16ChSDK { public: void initialize(); - void setPluseWidth(uint32_t us); - void setPlusePeriod(uint32_t us); + void setPluseWidth(uint32_t _10ns); + void setPlusePeriod(uint32_t _10ns); void setPluseNum(uint32_t npluse); void setPluseGeneratorMode(WorkMode_t mode); void manualTrigger(); diff --git a/src/app_version.hpp b/src/app_version.hpp index 5cb0ea4..d4d0289 100644 --- a/src/app_version.hpp +++ b/src/app_version.hpp @@ -1,7 +1,7 @@ #pragma once #include "zfpga_basic_protocol\zaf_protocol.h" -#define APP_VERSION VERSION(1, 0, 0) +#define APP_VERSION VERSION(1, 0, 1) #define APP_VERSION_MAIN VERSION_MAIN(APP_VERSION) #define APP_VERSION_SUB VERSION_SUB(APP_VERSION)