Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cd4f11bfa4 | ||
|
|
067a785450 | ||
|
|
b9ec78ee73 |
46
SP713.pro
Executable file → Normal file
46
SP713.pro
Executable file → Normal file
@ -1,3 +1,48 @@
|
||||
<<<<<<< HEAD
|
||||
QT += core gui
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
CONFIG += c++17
|
||||
|
||||
# You can make your code fail to compile if it uses deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
RC_ICONS = sp713.ico
|
||||
|
||||
SOURCES += \
|
||||
apps/crc16/crc.cpp \
|
||||
apps/icd/app_icd.cpp \
|
||||
drivers/log/logHandler.cpp \
|
||||
drivers/spi/drv_spi.cpp \
|
||||
drivers/uart/drv_uart.cpp \
|
||||
main.cpp \
|
||||
mainwindow.cpp
|
||||
|
||||
HEADERS += \
|
||||
apps/crc16/crc.h \
|
||||
apps/icd/app_icd.h \
|
||||
drivers/log/logHandler.h \
|
||||
drivers/spi/drv_spi.h \
|
||||
drivers/uart/drv_uart.h \
|
||||
libs/CH347DLL.H \
|
||||
libs/Common.h \
|
||||
mainwindow.h
|
||||
|
||||
FORMS += \
|
||||
mainwindow.ui
|
||||
|
||||
#add libs
|
||||
LIBS += -L$$PWD/libs -lCH347DLLA64
|
||||
INCLUDEPATH += $$PWD/libs
|
||||
win32:LIBS += $$PWD/libs/CH347DLLA64.LIB
|
||||
|
||||
# Default rules for deployment.
|
||||
qnx: target.path = /tmp/$${TARGET}/bin
|
||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||
!isEmpty(target.path): INSTALLS += target
|
||||
=======
|
||||
QT += core gui
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
@ -46,3 +91,4 @@ win32:LIBS += $$PWD/libs/CH347Handler.lib
|
||||
qnx: target.path = /tmp/$${TARGET}/bin
|
||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||
!isEmpty(target.path): INSTALLS += target
|
||||
>>>>>>> 799590bc1dd9b9faee90d554f54d6ad46e8b8ddd
|
||||
|
||||
437
SP713.pro.user
Normal file
437
SP713.pro.user
Normal file
@ -0,0 +1,437 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 14.0.2, 2025-07-22T18:12:13. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{419a6a79-1f23-4f22-bf0d-154c3f92f51c}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="qlonglong">0</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||
<value type="QString" key="language">Cpp</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||
<value type="QString" key="language">QmlJS</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||
<value type="int" key="EditorConfiguration.PreferAfterWhitespaceComments">0</value>
|
||||
<value type="bool" key="EditorConfiguration.PreferSingleLineComments">false</value>
|
||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">2</value>
|
||||
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||
<value type="bool" key="EditorConfiguration.UseIndenter">false</value>
|
||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||
<value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md, *.MD, Makefile</value>
|
||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||
<value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
|
||||
<value type="bool" key="EditorConfiguration.tintMarginArea">true</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks">
|
||||
<value type="bool" key="AutoTest.Framework.Boost">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.CTest">false</value>
|
||||
<value type="bool" key="AutoTest.Framework.Catch">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.GTest">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.QtQuickTest">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.QtTest">true</value>
|
||||
</valuemap>
|
||||
<value type="bool" key="AutoTest.ApplyFilter">false</value>
|
||||
<valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
|
||||
<valuelist type="QVariantList" key="AutoTest.PathFilters"/>
|
||||
<value type="int" key="AutoTest.RunAfterBuild">0</value>
|
||||
<value type="bool" key="AutoTest.UseGlobal">true</value>
|
||||
<valuemap type="QVariantMap" key="ClangTools">
|
||||
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
|
||||
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
|
||||
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
|
||||
<value type="int" key="ClangTools.ParallelJobs">10</value>
|
||||
<value type="bool" key="ClangTools.PreferConfigFile">true</value>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
|
||||
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="DeviceType">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.15.2 MinGW 64-bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.15.2 MinGW 64-bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5152.win64_mingw81_kit</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\23_SP713\02_CODE\SP713\build\Desktop_Qt_5_15_2_MinGW_64_bit-Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/23_SP713/02_CODE/SP713/build/Desktop_Qt_5_15_2_MinGW_64_bit-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\23_SP713\02_CODE\SP713\build\Desktop_Qt_5_15_2_MinGW_64_bit-Release</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/23_SP713/02_CODE/SP713/build/Desktop_Qt_5_15_2_MinGW_64_bit-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="int" key="QtQuickCompiler">0</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\23_SP713\02_CODE\SP713\build\Desktop_Qt_5_15_2_MinGW_64_bit-Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/23_SP713/02_CODE/SP713/build/Desktop_Qt_5_15_2_MinGW_64_bit-Profile</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="int" key="QtQuickCompiler">0</value>
|
||||
<value type="int" key="SeparateDebugInfo">0</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">部署</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">部署</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
|
||||
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||
<value type="int" key="Analyzer.Valgrind.Callgrind.CostFormat">0</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="bool" key="PE.EnvironmentAspect.PrintOnRun">false</value>
|
||||
<value type="QString" key="PerfRecordArgsId">-e cpu-cycles --call-graph "dwarf,4096" -F 250</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:D:/23_SP713/02_CODE/SP713/SP713.pro</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">D:/23_SP713/02_CODE/SP713/SP713.pro</value>
|
||||
<value type="bool" key="ProjectExplorer.RunConfiguration.Customized">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/23_SP713/02_CODE/SP713/build/Desktop_Qt_5_15_2_MinGW_64_bit-Release</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.1</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="DeviceType">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.15.2 MSVC2019 64bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.15.2 MSVC2019 64bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5152.win64_msvc2019_64_kit</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\23_SP713\02_CODE\SP713\build\Desktop_Qt_5_15_2_MSVC2019_64bit-Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/23_SP713/02_CODE/SP713/build/Desktop_Qt_5_15_2_MSVC2019_64bit-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\23_SP713\02_CODE\SP713\build\Desktop_Qt_5_15_2_MSVC2019_64bit-Release</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/23_SP713/02_CODE/SP713/build/Desktop_Qt_5_15_2_MSVC2019_64bit-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="int" key="QtQuickCompiler">0</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\23_SP713\02_CODE\SP713\build\Desktop_Qt_5_15_2_MSVC2019_64bit-Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/23_SP713/02_CODE/SP713/build/Desktop_Qt_5_15_2_MSVC2019_64bit-Profile</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="int" key="QtQuickCompiler">0</value>
|
||||
<value type="int" key="SeparateDebugInfo">0</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">部署</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">部署</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
|
||||
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||
<value type="int" key="Analyzer.Valgrind.Callgrind.CostFormat">0</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="bool" key="PE.EnvironmentAspect.PrintOnRun">false</value>
|
||||
<value type="QString" key="PerfRecordArgsId">-e cpu-cycles --call-graph "dwarf,4096" -F 250</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:D:/23_SP713/02_CODE/SP713/SP713.pro</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">D:/23_SP713/02_CODE/SP713/SP713.pro</value>
|
||||
<value type="bool" key="ProjectExplorer.RunConfiguration.Customized">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="qlonglong">2</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Version</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
</qtcreator>
|
||||
0
apps/crc16/crc.cpp
Executable file → Normal file
0
apps/crc16/crc.cpp
Executable file → Normal file
0
apps/crc16/crc.h
Executable file → Normal file
0
apps/crc16/crc.h
Executable file → Normal file
475
apps/icd/app_icd.cpp
Executable file → Normal file
475
apps/icd/app_icd.cpp
Executable file → Normal file
@ -1,3 +1,477 @@
|
||||
<<<<<<< HEAD
|
||||
#include "app_icd.h"
|
||||
#include <QDebug> // 用于调试输出
|
||||
#include "apps/crc16/crc.h"
|
||||
#include <QDateTime>
|
||||
#include <QFile>
|
||||
#include <algorithm>
|
||||
|
||||
APP_Icd::APP_Icd(QObject *parent) : QObject(parent)
|
||||
{
|
||||
// 创建驱动实例
|
||||
this->m_spiDriver = new DRV_Spi(this);
|
||||
this->m_uartDriver = new DRV_Uart(this);
|
||||
// 初始化协议帧相关参数的大小
|
||||
this->ICD_ctrlPara.resize(11);
|
||||
this->ICD_volValuePara.resize(320);
|
||||
this->ICD_allData.resize(340);
|
||||
// 初始化协议帧相关参数的初值
|
||||
this->ICD_allData.fill(0x00);
|
||||
this->ICD_ctrlPara.fill(0x00);
|
||||
this->ICD_volValuePara.fill(0x00);
|
||||
// 设置包头
|
||||
this->ICD_allData[0] = 0x9F;
|
||||
this->ICD_allData[1] = 0xE4;
|
||||
}
|
||||
|
||||
APP_Icd::~APP_Icd()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool APP_Icd::ICD_init()
|
||||
{
|
||||
if(!ICD_initSpi()) {
|
||||
qWarning() << "SPI initialization failed";
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!ICD_initUart()) {
|
||||
qWarning() << "UART initialization failed";
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool APP_Icd::ICD_initSpi()
|
||||
{
|
||||
// 这里添加SPI初始化逻辑
|
||||
return true;
|
||||
}
|
||||
|
||||
bool APP_Icd::ICD_initUart()
|
||||
{
|
||||
// //枚举当前的uart设备号
|
||||
// this->m_uartDriver->Uart_enumDevice();
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 计算QByteArray的累加和校验
|
||||
* @param data 输入数据
|
||||
* @param endPos 截止位置(-1表示计算到末尾)
|
||||
* @return 累加和(溢出自动截断为8位)
|
||||
*/
|
||||
quint8 APP_Icd::ICD_calcChecksum(const QByteArray &data, int endPos)
|
||||
{
|
||||
quint8 sum = 0;
|
||||
if (data.isEmpty()) return sum;
|
||||
|
||||
// 计算有效长度
|
||||
int length = (endPos < 0 || endPos >= data.size()) ?
|
||||
data.size() : endPos + 1;
|
||||
|
||||
// 累加计算
|
||||
for (int i = 0; i < length; ++i) {
|
||||
sum += static_cast<quint8>(data.at(i)); // 自动处理溢出
|
||||
}
|
||||
|
||||
return sum;
|
||||
}
|
||||
|
||||
// 电压命令编码
|
||||
bool APP_Icd::ICD_volCMDProtoEncode(uint8_t CMD, uint8_t group, uint8_t subGroup)
|
||||
{
|
||||
//判断值是否超出范围
|
||||
if((CMD > 0x03) || (group > 0xAA) || (subGroup > 0xAA))
|
||||
return false;
|
||||
|
||||
// 设置控制字参数
|
||||
this->ICD_ctrlPara[0] = group;
|
||||
this->ICD_ctrlPara[1] = subGroup;
|
||||
|
||||
// 调用主协议编码函数
|
||||
return this->ICD_sumProtoEncode(CMD, this->ICD_ctrlPara);
|
||||
}
|
||||
|
||||
// 写寄存器命令编码
|
||||
bool APP_Icd::ICD_regWCMDProtoEncode(uint8_t dacID, uint8_t dacCH, uint8_t funcEN, uint8_t adcCurrConfig)
|
||||
{
|
||||
//判断值是否超出范围
|
||||
// if((funcEN > 0x0F))
|
||||
// return false;
|
||||
|
||||
// 填充默认值0
|
||||
this->ICD_ctrlPara.fill(0x00);
|
||||
|
||||
// 设置控制字参数
|
||||
this->ICD_ctrlPara[0] = dacID;
|
||||
this->ICD_ctrlPara[1] = dacCH;
|
||||
this->ICD_ctrlPara[2] = funcEN;
|
||||
this->ICD_ctrlPara[3] = adcCurrConfig;
|
||||
|
||||
// 调用主协议编码函数
|
||||
return this->ICD_sumProtoEncode(SP_CMD_REG_WR, this->ICD_ctrlPara);
|
||||
}
|
||||
|
||||
// 写寄存器命令编码
|
||||
bool APP_Icd::ICD_regRCMDProtoEncode(uint8_t dacID)
|
||||
{
|
||||
//判断值是否超出范围
|
||||
if((dacID > 0x14))
|
||||
return false;
|
||||
|
||||
// 填充默认值0
|
||||
this->ICD_ctrlPara.fill(0x00);
|
||||
|
||||
// 设置控制字参数
|
||||
this->ICD_ctrlPara[0] = dacID;
|
||||
|
||||
// 调用主协议编码函数
|
||||
return this->ICD_sumProtoEncode(SP_CMD_REG_RD, this->ICD_ctrlPara);
|
||||
}
|
||||
|
||||
bool APP_Icd::ICD_sumProtoEncode(uint8_t CMD, const QByteArray &ctrl_data)
|
||||
{
|
||||
// this->ICD_allData.resize(338);
|
||||
// 设置控制字指令
|
||||
this->ICD_allData[2] = CMD;
|
||||
// 将控制字参数添加到主协议帧上
|
||||
this->ICD_allData.replace(3, ctrl_data.size(), ctrl_data);
|
||||
// 设置帧计数
|
||||
this->ICD_allData[14] = this->ICD_allData[14] + 1;
|
||||
// 设置校验和
|
||||
this->ICD_allData[15] = this->ICD_calcChecksum(this->ICD_allData, 14);
|
||||
// 设置电压类型:同值为0x01,异值为0x02
|
||||
if((CMD == SP_CMD_SAME_VALUE) || (CMD == SP_CMD_DIF_VALUE)){
|
||||
this->ICD_allData[16] = CMD - 1;
|
||||
}else{
|
||||
this->ICD_allData[16] = 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/**************自推导320字节序***************/
|
||||
// 将256通道的值按四个为单位,调换值的顺序
|
||||
this->ICD_swapArrayElements(this->DAC256_10bit_data, this->DAC256_10bit_data_resv);
|
||||
// 将256个10bit数据转化为320个字节的数据
|
||||
this->ICD_pack10BitData(this->DAC256_10bit_data_resv);
|
||||
// 将ICD_volValuePara中的数据按5个字节为单位,依次调换字节中的值,byte1<->byte5,byte2<->byte4
|
||||
this->ICD_volValuePara = this->ICD_reverseSwapEvery5Bytes(this->ICD_volValuePara);
|
||||
#endif
|
||||
/**************万基提供的字节序***************/
|
||||
this->ICD_dataTransfer(this->DAC256_10bit_data, this->ICD_volValuePara);
|
||||
|
||||
// 将电压参数赋值到allData中
|
||||
this->ICD_allData.replace(17, ICD_volValuePara.size(), ICD_volValuePara);
|
||||
// 计算320个字节的CRC16校验和
|
||||
QByteArray crc16Result = crc16Reverse(this->ICD_volValuePara);
|
||||
// 将CRC16校验和添加到ICD_allData中
|
||||
this->ICD_allData.replace(337, crc16Result.size(), crc16Result);
|
||||
// 设置校验和
|
||||
this->ICD_allData[339] = this->ICD_calcChecksum(this->ICD_allData, 338);
|
||||
// 调用串口/SPI发送函数
|
||||
if(this->m_uartDriver->m_DRV_Uart_Infors.devIsOpened){
|
||||
// 串口发送数据
|
||||
this->m_uartDriver->Uart_Write(this->ICD_allData);
|
||||
// 记录数据
|
||||
this->ICD_addContextToDataRecordingFile(true, this->ICD_allData);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// 设置DAC256 10Bit参数
|
||||
bool APP_Icd::ICD_setDAC256Data10bit(int row, int col, int value)
|
||||
{
|
||||
if((row > 15) || (col > 15) || (value > 1023))
|
||||
return false;
|
||||
this->DAC256_10bit_data[row][col] = value;
|
||||
return true;
|
||||
}
|
||||
|
||||
// 将256个10bit的数据转化为320个8bit数据
|
||||
QByteArray APP_Icd::ICD_pack10BitData(int data[16][16]) {
|
||||
|
||||
quint32 bitBuffer = 0; // 32位缓冲区
|
||||
int bitsInBuffer = 0; // 缓冲区中当前位数
|
||||
|
||||
this->ICD_volValuePara.clear();
|
||||
|
||||
for (int row = 0; row < 16; ++row) {
|
||||
for (int col = 0; col < 16; ++col) {
|
||||
// 确保数据是10位 (0-1023)
|
||||
quint32 value = static_cast<quint32>(data[row][col]) & 0x3FF;
|
||||
|
||||
// 将10位值添加到缓冲区
|
||||
bitBuffer = (bitBuffer << 10) | value;
|
||||
bitsInBuffer += 10;
|
||||
|
||||
// 每当缓冲区有至少8位时,提取一个字节
|
||||
while (bitsInBuffer >= 8) {
|
||||
bitsInBuffer -= 8;
|
||||
quint8 byte = static_cast<quint8>((bitBuffer >> bitsInBuffer) & 0xFF);
|
||||
this->ICD_volValuePara.append(byte);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 处理缓冲区中剩余的位(如果有)
|
||||
if (bitsInBuffer > 0) {
|
||||
quint8 lastByte = static_cast<quint8>((bitBuffer << (8 - bitsInBuffer)) & 0xFF);
|
||||
this->ICD_volValuePara.append(lastByte);
|
||||
}
|
||||
|
||||
// 确保输出正好是320字节(不足补零)
|
||||
while (this->ICD_volValuePara.size() < 320) {
|
||||
this->ICD_volValuePara.append('\0');
|
||||
}
|
||||
|
||||
return this->ICD_volValuePara;
|
||||
}
|
||||
|
||||
// 将256个10bit的数据转化为320个8bit数据
|
||||
// void APP_Icd::datatransfer(uint16_t *data_in, uint8_t *data_out) {
|
||||
|
||||
// uint16_t i;
|
||||
// for(i = 0; i < 64; i++)
|
||||
// {
|
||||
// data_out[i*5] = data_in[i*4];
|
||||
// data_out[i*5+1] = data_in[i*4+1]<<2 | data_in[i*4]>>8;
|
||||
// data_out[i*5+2] = data_in[i*4+2]<<4 | data_in[i*4+1]>>6;
|
||||
// data_out[i*5+3] = data_in[i*4+3]<<6 | data_in[i*4+2]>>4;
|
||||
// data_out[i*5+4] = data_in[i*4+3]>>2;
|
||||
// }
|
||||
// }
|
||||
void APP_Icd::ICD_dataTransfer(const int DAC256_10bit_data[16][16], QByteArray &ICD_volValuePara)
|
||||
{
|
||||
// 1. 将int[16][16]转换为uint16_t数组
|
||||
uint16_t data_in[256]; // 16x16=256个元素
|
||||
for(int i = 0; i < 16; i++) {
|
||||
for(int j = 0; j < 16; j++) {
|
||||
// 确保10bit数据在0-1023范围内
|
||||
data_in[i*16 + j] = static_cast<uint16_t>(DAC256_10bit_data[i][j] & 0x3FF);
|
||||
}
|
||||
}
|
||||
|
||||
// 2. 准备输出缓冲区
|
||||
QByteArray data_out;
|
||||
data_out.resize(320); // 64*5=320字节
|
||||
|
||||
// 3. 执行原始的数据转换
|
||||
for(uint16_t i = 0; i < 64; i++) {
|
||||
data_out[i*5] = static_cast<char>(data_in[i*4] & 0xFF);
|
||||
data_out[i*5+1] = static_cast<char>((data_in[i*4+1] << 2) | (data_in[i*4] >> 8));
|
||||
data_out[i*5+2] = static_cast<char>((data_in[i*4+2] << 4) | (data_in[i*4+1] >> 6));
|
||||
data_out[i*5+3] = static_cast<char>((data_in[i*4+3] << 6) | (data_in[i*4+2] >> 4));
|
||||
data_out[i*5+4] = static_cast<char>(data_in[i*4+3] >> 2);
|
||||
}
|
||||
|
||||
// 4. 将结果赋给输出参数
|
||||
ICD_volValuePara = data_out;
|
||||
}
|
||||
|
||||
// 函数定义
|
||||
// 参数说明:
|
||||
// inputArray - 输入的16x16二维数组
|
||||
// outputArray - 输出的16x16二维数组,用于存储交换后的结果
|
||||
void APP_Icd::ICD_swapArrayElements(int inputArray[16][16], int outputArray[16][16])
|
||||
{
|
||||
// 首先复制原始数组
|
||||
for(int i = 0; i < 16; i++) {
|
||||
for(int j = 0; j < 16; j++) {
|
||||
outputArray[i][j] = inputArray[i][j];
|
||||
}
|
||||
}
|
||||
|
||||
// 交换元素值:每4个元素为一组
|
||||
// 交换规则:第一个<->第四个,第二个<->第三个
|
||||
for(int i = 0; i < 16; i++) {
|
||||
for(int j = 0; j < 16; j += 4) {
|
||||
// 确保有足够的元素可以交换
|
||||
if(j + 3 < 16) {
|
||||
// 交换第一个和第四个元素
|
||||
int temp = outputArray[i][j];
|
||||
outputArray[i][j] = outputArray[i][j+3];
|
||||
outputArray[i][j+3] = temp;
|
||||
|
||||
// 交换第二个和第三个元素
|
||||
temp = outputArray[i][j+1];
|
||||
outputArray[i][j+1] = outputArray[i][j+2];
|
||||
outputArray[i][j+2] = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QByteArray APP_Icd::ICD_reverseSwapEvery5Bytes(const QByteArray &input) {
|
||||
QByteArray output = input; // 复制输入数据,避免修改原数据
|
||||
int length = output.size();
|
||||
|
||||
// 检查数据长度是否是5的倍数(如果不是,可能会遗漏最后几个字节)
|
||||
if (length % 5 != 0) {
|
||||
return input;
|
||||
}
|
||||
|
||||
// 每5个字节一组,进行交换
|
||||
char *data = output.data();
|
||||
|
||||
for (int i = 0; i < length; i += 5) {
|
||||
if (i + 4 >= length) break;
|
||||
|
||||
std::swap(data[i], data[i + 4]);
|
||||
std::swap(data[i + 1], data[i + 3]);
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
|
||||
// 创建串口数据记录文件
|
||||
bool APP_Icd::ICD_newDataRecordingFile(void)
|
||||
{
|
||||
// 生成带时间戳的文件名
|
||||
QString timestamp = QDateTime::currentDateTime().toString("yyyyMMdd_hhmmss");
|
||||
QString fileName = QString("%1_%2.txt").arg("SP713_UART_SPI_Data_Recording").arg(timestamp);
|
||||
|
||||
// 创建文件并检查是否成功
|
||||
QFile file(fileName);
|
||||
if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// 关闭文件
|
||||
file.close();
|
||||
// 设置数据记录文件名
|
||||
this->dataRecordingFile = fileName;
|
||||
return true;
|
||||
}
|
||||
|
||||
// 创建电压数据记录文件
|
||||
bool APP_Icd::ICD_newVolRecordingFile(uint8_t DAC_number)
|
||||
{
|
||||
// 生成带时间戳的文件名
|
||||
QString timestamp = QDateTime::currentDateTime().toString("yyyyMMdd_hhmmss");
|
||||
QString fileName = QString("%1_DAC%2_%3.txt").arg("SP713_Vol_Recording").arg(DAC_number).arg(timestamp);
|
||||
|
||||
// 创建文件并检查是否成功
|
||||
QFile file(fileName);
|
||||
if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// 关闭文件
|
||||
file.close();
|
||||
// 设置数据记录文件名
|
||||
this->volRecordingFile = fileName;
|
||||
return true;
|
||||
}
|
||||
|
||||
// 添加记录至txt文件
|
||||
bool APP_Icd::ICD_addContextToDataRecordingFile(bool isWrite, QByteArray &Data)
|
||||
{
|
||||
if (this->dataRecordingFile.isEmpty())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// 打开文件(追加模式)
|
||||
QFile file(this->dataRecordingFile);
|
||||
if (!file.open(QIODevice::Append | QIODevice::Text))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
QTextStream out(&file);
|
||||
|
||||
// 写入时间戳和特定字符串
|
||||
QString timestamp = QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss");
|
||||
if(isWrite){
|
||||
out << timestamp << " tx data: "; // 时间戳和特定字符串
|
||||
}else{
|
||||
out << timestamp << " rx data: "; // 时间戳和特定字符串
|
||||
}
|
||||
|
||||
// 将QByteArray转换为16进制字符串,用空格分隔
|
||||
QString hexData = Data.toHex(' ').toUpper();
|
||||
out << hexData << "\n"; // 写入16进制数据并换行
|
||||
|
||||
file.close();
|
||||
return true;
|
||||
}
|
||||
|
||||
// 添加记录至电压记录文件
|
||||
bool APP_Icd::ICD_addContextToVolRecordingFile(uint8_t EOC, uint16_t ch_value, uint16_t vol)
|
||||
{
|
||||
uint8_t vol_right = 0;
|
||||
|
||||
if (this->volRecordingFile.isEmpty())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// 打开文件(追加模式)
|
||||
QFile file(this->volRecordingFile);
|
||||
if (!file.open(QIODevice::Append | QIODevice::Text))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
QTextStream out(&file);
|
||||
|
||||
if(abs(vol - this->DAC256_10bit_data[(ch_value-1)/16][(ch_value-1)%16]) <= 50)
|
||||
vol_right = 1;
|
||||
// 将QByteArray转换为16进制字符串,用空格分隔
|
||||
out << "CH" << ch_value <<",EOC" << EOC << ",VOL" << vol << ",right" << vol_right <<"\r\n"; // 写入16进制数据并换行
|
||||
|
||||
file.close();
|
||||
return true;
|
||||
}
|
||||
|
||||
// 解析函数
|
||||
ParsedData APP_Icd::ICD_parseRegisterData(const QByteArray &revData) {
|
||||
ParsedData result = {};
|
||||
|
||||
// 检查数据长度 (至少需要7个字节: REG7-REG1)
|
||||
if(revData.size() < 7) {
|
||||
qWarning() << "Invalid data length, expected at least 7 bytes";
|
||||
return result;
|
||||
}
|
||||
|
||||
// 从REG7到REG1解析 (数据顺序是REG7在前)
|
||||
const uchar *data = reinterpret_cast<const uchar*>(revData.constData());
|
||||
|
||||
// REG2 (索引5,因为数据顺序是REG7(0),REG6(1),...,REG1(6))
|
||||
result.EN_TADC = (data[5] >> 7) & 0x01;
|
||||
result.N_CLKDIV18 = ((data[5] >> 5) & 0x03); // 取B6和B5
|
||||
result.VCON = ((data[5] >> 2) & 0x03); // 取B4和B3
|
||||
result.CH_TEST = ((data[5] >> 1) & 0x01) << 8; // CH_TEST[8]
|
||||
result.FBK_EN = (data[5]) & 0x01;
|
||||
|
||||
// REG3 (索引4)
|
||||
result.TEMPTEST_EN = (data[4] >> 7) & 0x01;
|
||||
result.TRIG_TADC = (data[4] >> 6) & 0x01;
|
||||
result.TEST_TADC = (data[4] >> 5) & 0x01;
|
||||
result.ICON18 = (data[4]) & 0x0F; // 取B4-B1
|
||||
|
||||
// REG4 (索引3)
|
||||
result.CH_TEST |= data[3]; // CH_TEST[7:0]
|
||||
|
||||
// REG5 (索引2)
|
||||
result.ADC_OUT = data[2]; // ADC_OUT[7:0]
|
||||
|
||||
// REG6 (索引1)
|
||||
result.EOC = (data[1] >> 7) & 0x01;
|
||||
result.ADC_OUT |= ((data[1] & 0x03) << 8); // ADC_OUT[9:8]
|
||||
|
||||
result.D_FB = ((data[1] >> 2) & 0x03); // D_FB[9:8]
|
||||
|
||||
// REG7 (索引0)
|
||||
result.D_FB = (result.D_FB << 8) | data[0]; // D_FB[7:0]
|
||||
|
||||
return result;
|
||||
}
|
||||
=======
|
||||
#include "app_icd.h"
|
||||
#include <QDebug> // 用于调试输出
|
||||
#include "apps/crc16/crc.h"
|
||||
@ -313,3 +787,4 @@ ParsedData APP_Icd::ICD_parseRegisterData(const QByteArray &revData) {
|
||||
|
||||
return result;
|
||||
}
|
||||
>>>>>>> 799590bc1dd9b9faee90d554f54d6ad46e8b8ddd
|
||||
|
||||
154
apps/icd/app_icd.h
Executable file → Normal file
154
apps/icd/app_icd.h
Executable file → Normal file
@ -1,3 +1,156 @@
|
||||
<<<<<<< HEAD
|
||||
#ifndef _APP_ICD_H__
|
||||
#define _APP_ICD_H__
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QMap>
|
||||
#include <QStringList>
|
||||
#include <QObject>
|
||||
|
||||
#include "drivers/spi/drv_spi.h"
|
||||
#include "drivers/uart/drv_uart.h"
|
||||
|
||||
// typedef struct _USB_DEVICE_DESCRIPTOR {
|
||||
// UCHAR bLength;
|
||||
// UCHAR bDescriptorType;
|
||||
// USHORT bcdUSB;
|
||||
// UCHAR bDeviceClass;
|
||||
// UCHAR bDeviceSubClass;
|
||||
// UCHAR bDeviceProtocol;
|
||||
// UCHAR bMaxPacketSize0;
|
||||
// USHORT idVendor;
|
||||
// USHORT idProduct;
|
||||
// USHORT bcdDevice;
|
||||
// UCHAR iManufacturer;
|
||||
// UCHAR iProduct;
|
||||
// UCHAR iSerialNumber;
|
||||
// UCHAR bNumConfigurations;
|
||||
// } USB_DEVICE_DESCRIPTOR, *PUSB_DEVICE_DESCRIPTOR;
|
||||
|
||||
// typedef struct _DRV_SPI_INFO
|
||||
// {
|
||||
// CHAR bDeviceName[256]; //设备名称
|
||||
// mDeviceInforS SpiI2cDevInfor[16]; //spiI2c设备信息
|
||||
// ULONG ulDevCnt; //设备数量
|
||||
// BOOL devIsOpened; //设备开启标志位
|
||||
// ULONG opendDevIndex; //当前设备索引号
|
||||
// }mDRV_Spi_Infors;
|
||||
|
||||
// 使用结构体存储更复杂的数据
|
||||
// struct ComboBoxSubGroupItem {
|
||||
// QString displayText;
|
||||
// int value;
|
||||
// };
|
||||
|
||||
// 解析结果结构体
|
||||
struct ParsedData {
|
||||
quint8 EN_TADC;
|
||||
quint8 N_CLKDIV18; // 2位组合值
|
||||
quint8 VCON; // 2位组合值
|
||||
quint16 CH_TEST; // 9位组合值 (CH_TEST[8:0])
|
||||
quint8 FBK_EN;
|
||||
quint8 TEMPTEST_EN;
|
||||
quint8 TRIG_TADC;
|
||||
quint8 TEST_TADC;
|
||||
quint8 ICON18; // 4位组合值
|
||||
quint16 ADC_OUT; // 10位组合值 (ADC_OUT[9:0])
|
||||
quint8 EOC;
|
||||
quint16 D_FB; // 10位组合值 (D_FB[9:0])
|
||||
};
|
||||
|
||||
// 命令枚举值
|
||||
enum {
|
||||
SP_CMD_NA = 0x00, // 无效命令
|
||||
SP_CMD_ZERO = 0x01, // 参数归零命令
|
||||
SP_CMD_SAME_VALUE = 0x02, // 同值配置命令
|
||||
SP_CMD_DIF_VALUE = 0x03, // 异值配置命令
|
||||
SP_CMD_REG_WR = 0x04, // 寄存器配置命令
|
||||
SP_CMD_REG_RD = 0x05, // 寄存器读取命令
|
||||
};
|
||||
|
||||
class APP_Icd : public QObject
|
||||
{
|
||||
Q_OBJECT // 如果需要使用QT的信号槽机制
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief 构造函数
|
||||
* @param parent 父对象指针
|
||||
*/
|
||||
explicit APP_Icd(QObject *parent = nullptr);
|
||||
|
||||
/**
|
||||
* @brief 析构函数
|
||||
*/
|
||||
virtual ~APP_Icd();
|
||||
|
||||
/*************函数定义*************/
|
||||
bool ICD_init(); // ICD初始化
|
||||
bool ICD_setDAC256Data10bit(int row, int col, int value); // 设置DAC256 10bit数组的值大小
|
||||
bool ICD_volCMDProtoEncode(uint8_t CMD, uint8_t group, uint8_t subGroup);
|
||||
quint8 ICD_calcChecksum(const QByteArray &data, int endPos);
|
||||
bool ICD_sumProtoEncode(uint8_t CMD, const QByteArray &ctrl_data);
|
||||
QByteArray ICD_pack10BitData(int data[16][16]);
|
||||
QByteArray ICD_reverseSwapEvery5Bytes(const QByteArray &input);
|
||||
bool ICD_regWCMDProtoEncode(uint8_t dacID, uint8_t dacCH, uint8_t funcEN, uint8_t adcCurrConfig);
|
||||
bool ICD_regRCMDProtoEncode(uint8_t dacID);
|
||||
bool ICD_newDataRecordingFile(void);
|
||||
bool ICD_addContextToDataRecordingFile(bool isWrite, QByteArray &Data);
|
||||
ParsedData ICD_parseRegisterData(const QByteArray &revData);
|
||||
bool ICD_newVolRecordingFile(uint8_t DAC_number);
|
||||
bool ICD_addContextToVolRecordingFile(uint8_t EOC, uint16_t ch_value, uint16_t vol);
|
||||
void ICD_swapArrayElements(int inputArray[16][16], int outputArray[16][16]);
|
||||
// void datatransfer(uint16_t *data_in, uint8_t *data_out);
|
||||
void ICD_dataTransfer(const int DAC256_10bit_data[16][16], QByteArray &ICD_volValuePara);
|
||||
|
||||
/*************变量定义*************/
|
||||
// mDRV_Spi_Infors m_DRV_Spi_Infors; //Spi驱动相关信息
|
||||
DRV_Spi *m_spiDriver; // SPI驱动实例
|
||||
DRV_Uart *m_uartDriver; // UART驱动实例
|
||||
|
||||
// 定义子分组的所有名称数据集
|
||||
QMap<int, QStringList> comboBox_subGroupInfo = {
|
||||
{0, {"所有DAC"}}, // 对应选项1
|
||||
{1, {"A分组所有DAC", "B分组所有DAC"}}, // 对应选项2
|
||||
{2, {"OPA分组0", "OPA分组1", "OPA分组2", "OPA分组3", "OPA分组4"}}, // 对应选项3
|
||||
{3, {"编号1", "编号2", "编号3", "编号4", "编号5", // 对应选项3
|
||||
"编号6", "编号7", "编号8", "编号9", "编号10",
|
||||
"编号11", "编号12", "编号13", "编号14", "编号15",
|
||||
"编号16", "编号17", "编号18", "编号19", "编号20"
|
||||
}
|
||||
}
|
||||
};
|
||||
// 256个10bit数据
|
||||
int DAC256_10bit_data[16][16] = {{0}};
|
||||
// 256个10bit数据_四通道为单位调换顺序
|
||||
int DAC256_10bit_data_resv[16][16] = {{0}};
|
||||
// 控制字参数
|
||||
QByteArray ICD_ctrlPara;
|
||||
// 电压值参数
|
||||
QByteArray ICD_volValuePara;
|
||||
// 整体帧
|
||||
QByteArray ICD_allData;
|
||||
QString dataRecordingFile;
|
||||
QString volRecordingFile;
|
||||
|
||||
signals:
|
||||
// 可以添加DAC特定的信号
|
||||
// void outputChanged(int channel, double value);
|
||||
|
||||
private:
|
||||
// 私有成员变量
|
||||
// double m_currentValues[]; // 当前各通道输出值(假设有多个通道)
|
||||
|
||||
// 私有方法
|
||||
bool ICD_initSpi();
|
||||
bool ICD_initUart();
|
||||
|
||||
// 私有方法
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
=======
|
||||
#ifndef _APP_ICD_H__
|
||||
#define _APP_ICD_H__
|
||||
|
||||
@ -140,3 +293,4 @@ private:
|
||||
};
|
||||
|
||||
#endif
|
||||
>>>>>>> 799590bc1dd9b9faee90d554f54d6ad46e8b8ddd
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user