First commit.
This commit is contained in:
468
.qtcreator/BionxControl.pro.user
Normal file
468
.qtcreator/BionxControl.pro.user
Normal file
@@ -0,0 +1,468 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 18.0.1, 2025-12-15T18:54:47. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{350f6538-4791-42f9-b43d-6ea1a7b22b7b}</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.AutoDetect">true</value>
|
||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</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.LineEndingBehavior">0</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">16</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>
|
||||
<value type="int" key="RcSync">0</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="DeviceType">Desktop</value>
|
||||
<value type="bool" key="HasPerBcDcs">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 6.10.1 llvm-mingw 64-bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 6.10.1 llvm-mingw 64-bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt6.6101.win64_llvm_mingw_kit</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</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">C:\syncMePlease\projects.now\BionxControl\build\Desktop_Qt_6_10_1_llvm_mingw_64_bit-Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">C:/syncMePlease/projects.now/BionxControl/build/Desktop_Qt_6_10_1_llvm_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">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</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">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</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="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</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">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</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:</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">C:/syncMePlease/projects.now/BionxControl/BionxControl.pro</value>
|
||||
<value type="bool" key="ProjectExplorer.RunConfiguration.Customized">false</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.UniqueId"></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">%{RunConfig:Executable:Path}</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">1</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">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</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:</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">C:/syncMePlease/projects.now/BionxControl/BionxControl.pro</value>
|
||||
<value type="bool" key="ProjectExplorer.RunConfiguration.Customized">false</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.UniqueId"></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">%{RunConfig:Executable:Path}</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="bool" key="HasPerBcDcs">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 6.10.1 MinGW 64-bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 6.10.1 MinGW 64-bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt6.6101.win64_mingw_kit</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</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">C:\syncMePlease\projects.now\BionxControl\build\Desktop_Qt_6_10_1_MinGW_64_bit-Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">C:/syncMePlease/projects.now/BionxControl/build/Desktop_Qt_6_10_1_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">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</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">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</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="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</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">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</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">ProjectExplorer.CustomExecutableRunConfiguration</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
|
||||
<value type="bool" key="ProjectExplorer.RunConfiguration.Customized">false</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.UniqueId"></value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">%{RunConfig:Executable:Path}</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">1</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">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</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">ProjectExplorer.CustomExecutableRunConfiguration</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
|
||||
<value type="bool" key="ProjectExplorer.RunConfiguration.Customized">false</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.UniqueId"></value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">%{RunConfig:Executable:Path}</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.2</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="DeviceType">Desktop</value>
|
||||
<value type="bool" key="HasPerBcDcs">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 6.10.1 MSVC2022 64bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 6.10.1 MSVC2022 64bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt6.6101.win64_msvc2022_64_kit</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</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">C:\syncMePlease\projects.now\BionxControl\build\Desktop_Qt_6_10_1_MSVC2022_64bit-Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">C:/syncMePlease/projects.now/BionxControl/build/Desktop_Qt_6_10_1_MSVC2022_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">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</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">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</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="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</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">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</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">ProjectExplorer.CustomExecutableRunConfiguration</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
|
||||
<value type="bool" key="ProjectExplorer.RunConfiguration.Customized">false</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.UniqueId"></value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">%{RunConfig:Executable:Path}</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">1</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">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</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">ProjectExplorer.CustomExecutableRunConfiguration</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
|
||||
<value type="bool" key="ProjectExplorer.RunConfiguration.Customized">false</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.UniqueId"></value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">%{RunConfig:Executable:Path}</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="qlonglong">3</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Version</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
</qtcreator>
|
||||
54
BionxControl.pro
Normal file
54
BionxControl.pro
Normal file
@@ -0,0 +1,54 @@
|
||||
QT += core gui
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
CONFIG += c++20
|
||||
|
||||
# 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
|
||||
|
||||
INCLUDEPATH += . static lib
|
||||
|
||||
linux {
|
||||
#LIBS += -lpigpio -lpigpiod_if2 -lrt
|
||||
# FIXME SOURCES +=
|
||||
}
|
||||
|
||||
windows
|
||||
{
|
||||
LIBS += -L$$PWD/can_api -lmhstcan -lAdvapi32
|
||||
}
|
||||
|
||||
# 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
|
||||
|
||||
SOURCES += \
|
||||
bccommand.cpp \
|
||||
bccommandmanager.cpp \
|
||||
bccommandrunner.cpp \
|
||||
bcvalue.cpp \
|
||||
bcvaluemanager.cpp \
|
||||
main.cpp \
|
||||
bcmainwindow.cpp
|
||||
|
||||
HEADERS += \
|
||||
bc.h \
|
||||
bccommand.h \
|
||||
bccommandmanager.h \
|
||||
bccommandrunner.h \
|
||||
bcmainwindow.h \
|
||||
bcvalue.h \
|
||||
bcvaluemanager.h
|
||||
|
||||
FORMS += \
|
||||
bcmainwindow.ui
|
||||
|
||||
# Default rules for deployment.
|
||||
qnx: target.path = /tmp/$${TARGET}/bin
|
||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||
!isEmpty(target.path): INSTALLS += target
|
||||
|
||||
RESOURCES += \
|
||||
BionxControl.qrc
|
||||
5
BionxControl.qrc
Normal file
5
BionxControl.qrc
Normal file
@@ -0,0 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file alias="bikeinfo.xml">data/bikeinfo.xml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
732
bc.h
Normal file
732
bc.h
Normal file
@@ -0,0 +1,732 @@
|
||||
/***************************************************************************
|
||||
|
||||
BionxControl
|
||||
Copyright © 2025 christoph holzheuer
|
||||
christoph.holzheuer@gmail.com
|
||||
|
||||
Using:
|
||||
|
||||
BigXionFlasher USB V 0.2.4 rev. 97
|
||||
© 2011-2013 by Thomas Koenig <info@bigxionflasher.org>
|
||||
@see www.bigxionflasher.org
|
||||
|
||||
Bionx Bike Info
|
||||
© 2018 Thorsten Schmidt (tschmidt@ts-soft.de)
|
||||
@see www.ts-soft.de
|
||||
|
||||
mhs_can_drv.c 3.00
|
||||
© 2011 - 2015 by MHS-Elektronik GmbH & Co. KG, Germany
|
||||
Demlehner Klaus, info@mhs-elektronik.de
|
||||
@see www.mhs-elektronik.de
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
@see https://github.com/bikemike/bionx-bikeinfo
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef BC_H
|
||||
#define BC_H
|
||||
|
||||
#include <cstdint>
|
||||
#include <QDebug>
|
||||
#include <QObject> // Nötig für Q_GADGET/Q_ENUM Makros
|
||||
|
||||
namespace cbc
|
||||
{
|
||||
[[maybe_unused]] constexpr static double UNLIMITED_SPEED_VALUE = 70; // Km/h
|
||||
// UNLIMITED_MIN_SPEED_VALUE = 30; // Km/h
|
||||
[[maybe_unused]] constexpr static double UNLIMITED_THROTTLE_SPEED_VALUE = 70; // Km/h
|
||||
|
||||
[[maybe_unused]] constexpr static double SPEED_FACTOR = 0.1;
|
||||
[[maybe_unused]] constexpr static double DISTANCE_FACTOR = 0.1;
|
||||
[[maybe_unused]] constexpr static double SENESORGAIN_FACTOR = 0.1;
|
||||
[[maybe_unused]] constexpr static double ASSIST_FACTOR = 1.5625;
|
||||
[[maybe_unused]] constexpr static double VOLTAGE_FACTOR = 0.001;
|
||||
[[maybe_unused]] constexpr static double CURRENT_FACTOR = 0.001;
|
||||
[[maybe_unused]] constexpr static double NORMALIZED_VOLTAGE_OFFSET = 20.8333;
|
||||
[[maybe_unused]] constexpr static double NORMALIZED_VOLTAGE_FAKTOR = 0.416667;
|
||||
|
||||
} // namespace cbc
|
||||
|
||||
// abbreviations:
|
||||
// SOC = State Of Charge
|
||||
// LMD = Last Measured Discharge
|
||||
// NIP = ?
|
||||
|
||||
/*
|
||||
|
||||
Needed ?
|
||||
#include <type_traits>
|
||||
|
||||
template <typename E>
|
||||
constexpr auto to_u(E e) noexcept {
|
||||
return static_cast<std::underlying_type_t<E>>(e);
|
||||
}
|
||||
*/
|
||||
|
||||
struct BC
|
||||
{
|
||||
Q_GADGET // Aktiviert das Meta-System für diese Klasse ohne QObject-Overhead
|
||||
|
||||
public:
|
||||
|
||||
enum class ID : uint8_t
|
||||
{
|
||||
//{%Region Console}
|
||||
|
||||
Invalid = 0x0,
|
||||
|
||||
ID_Console_Master = 0x08, // (Can Id In Master Mode)
|
||||
ID_Console_Slave = 0x48, // (Can Id In Slave Mode)
|
||||
// ID_Console_Response = 0x58,
|
||||
ID_Bib = 0x58,
|
||||
|
||||
// Reg 0..79 Unused
|
||||
|
||||
Cons_Stat_Dist_Hi = 0x50, // [Factor:0.1]
|
||||
Cons_Stat_Dist_Lo = 0x51,
|
||||
Cons_Stat_Avgspeed_Hi = 0x52, // [Factor:0.1]
|
||||
Cons_Stat_Avgspeed_Lo = 0x53,
|
||||
|
||||
// Reg 84..99 Unused
|
||||
|
||||
Cons_Stat_Odo_Hihi = 0x64, // Odometer [Unit:Km, Faktor:0.1]
|
||||
Cons_Stat_Odo_Hilo = 0x65, // !!! Reverse Byte Order On Writing !!!
|
||||
Cons_Stat_Odomoter_Lohi = 0x66,
|
||||
Cons_Stat_Odo_Lolo = 0x67,
|
||||
|
||||
Cons_Preference_Nip_Hihi = 0x68, // -
|
||||
Cons_Preference_Nip_Hilo = 0x69,
|
||||
Cons_Preference_Nip_Lohi = 0x6a,
|
||||
Cons_Preference_Nip_Lolo = 0x6b,
|
||||
Cons_Throttle_Calibrated = 0x6c, // Throttle Calibration Performed
|
||||
Cons_Stat_Chrono_Second = 0x6d, // Trip Time Seconds
|
||||
Cons_Stat_Chrono_Minute = 0x6e, // Trip Time Minutes
|
||||
Cons_Stat_Chrono_Hour = 0x6f, // Trip Time Hours
|
||||
Cons_Preference_Lcd_Contrast = 0x70, // Lcd Contrast
|
||||
Cons_Sn_Location = 0x71, // Location
|
||||
Cons_Sn_Year = 0x72, // Mfd Year
|
||||
Cons_Sn_Month = 0x73, // Mfd Month
|
||||
Cons_Sn_Day = 0x74, // Mfd Day
|
||||
|
||||
Cons_Sn_Pn_Hi = 0x75, // Product Number
|
||||
Cons_Sn_Pn_Lo = 0x76,
|
||||
Cons_Sn_Item_Hi = 0x77, // Serial Number
|
||||
Cons_Sn_Item_Lo = 0x78,
|
||||
|
||||
// Reg 121 Unused
|
||||
|
||||
Cons_Assist_Gauge_Joint = 0x7a, // Gauge Joint [Range:0..11]
|
||||
Cons_Throttle_Min_Hi = 0x7b, // Throttle Min Actor Value
|
||||
Cons_Throttle_Min_Lo = 0x7c,
|
||||
Cons_Throttle_Max_Hi = 0x7d, // Throttle Max Actor Value
|
||||
Cons_Throttle_Max_Lo = 0x7e,
|
||||
|
||||
// Reg 127 Unused
|
||||
|
||||
Cons_Preference_Light_On_At_Start = 0x80, // Lightonatstart Indicate If The Accessory Shall Be Enabled When Turning The Bike On. 0-No, 1-Yes
|
||||
|
||||
Cons_Geometry_Circ_Hi = 0x81, // Circumference Of The Rear Wheel [Mm]
|
||||
Cons_Geometry_Circ_Lo = 0x82,
|
||||
|
||||
Cons_Assist_Maxspeed_Flag = 0x83, // Indicates That There Is An Upper Speed Limit Where The Motor Is Allowed To Assist
|
||||
Cons_Assist_Maxspeed_Hi = 0x84, // Maximum Speed For Which The Motor Can Assist. This Is Irrelevant If Maxspeedflag Is Not Set [Unit:Km/H, Range:1..??, Factor:0.1] (Code 3773)
|
||||
Cons_Assist_Maxspeed_Lo = 0x85,
|
||||
|
||||
Cons_Throttle_Maxspeed_Flag = 0x86, // Throttle Max Speed Flag
|
||||
Cons_Throttle_Maxspeed_Hi = 0x87, // Throttle Max Speed Msb [Unit:Km/H, Factor:0.1] Code 3775
|
||||
Cons_Throttle_Maxspeed_Lo = 0x88,
|
||||
Cons_Assist_Minspeed_Flag = 0x89, // Min Speed Flag
|
||||
Cons_Assist_Minspeed = 0x8a, // Min Speed Code 3776
|
||||
|
||||
Cons_Assist_Brake_Level = 0x8b, // Brake Rekuperation Level [Unit:%, Range:0..64, Factor:1.5625] Code 2002
|
||||
Cons_Preference_Trip_To_Empty_Flag = 0x8c, // 0:Hide, 1:Show Remaining Time/Dist Pc2003 (No Effect Anymore?)
|
||||
Cons_Preference_Display_Units = 0x8d, // Indicates Unit System To Use When Displaying Units. 0-English, 1-Metric
|
||||
Cons_Throttle_Enable_Onstrain = 0x8e, // Allow Throttle Over Maxspeed If Strain Gauge Signal Detected
|
||||
|
||||
// Reg 143..159 Unused
|
||||
|
||||
Cons_Assist_Brake_Flag = 0xa0, // Brage Sensor Enable, 0: Brake Sensor Off, 1: Sensor On Code 2006
|
||||
Cons_Assist_Brake_Polarity = 0xa1, // Brake Sensor Type: 0: No (Normal Open), 1: Nc (Normal Closed), 2:0-5 (Analog 0..5v), 3:5-0 (Analog 5..0v) Code 2006
|
||||
Cons_Assist_Gauge_Filter = 0xa2, // Torque Sensor Speed [Range:0..8 (1..4 Recommended)] Code 1234
|
||||
|
||||
Cons_Rev_Sw = 0xa3, // Software Version
|
||||
|
||||
Cons_Assist_Gauge_Gain = 0xa4, // Sensor Gain [Range:0.1..4.0, Factor:0.1] Code 0007
|
||||
Cons_Assist_Gain_A = 0xa5, // Torque Sensor Extra Gain [Range:0.1..4.0, Factor:0.1] Code 0008a
|
||||
Cons_Assist_Gain_B = 0xa6, // Torque Sensor Extra Gain Max Speed [Unit:Km/H, Range:0.0..25.0, Factor:0.1] Code 0008b
|
||||
Cons_Sn_Type = 0xa7, // Type Of Console: 0-Eps, 1-Ride+, 2-Boost.
|
||||
Cons_Preference_Region = 0xa8, // Region
|
||||
Cons_Preference_Configbit_0 = 0xa9, // Configbit0
|
||||
Cons_Throttle_Enable_Boost_Display = 0xaa, // Display The "Boost" Message Or Pictogram When It Activates
|
||||
Cons_Assist_Autoregen_Flag = 0xab, // Autoregen Flag
|
||||
|
||||
// Reg 172 Unused // Regenenabled, Yet Unused
|
||||
|
||||
Cons_Rev_Sub = 0xad, // Software Subversion
|
||||
Cons_Preference_Light_Button_Mode = 0xae, // Indicate The Operation Of Console Button "Light/Power". 0-Click Turns Bike Off, Hold Toggles Accessory, 1-Click Toggle Accessory, Hold Turns Bike Off
|
||||
Cons_Preference_Expertmode = 0xaf, // Expertmode Add New Display Mode For Expert Mode (Unitl Hw 15)
|
||||
|
||||
Cons_Assist_Level_1 = 0xb0, // Assist Level 1 [Unit:%, Factor:1,5625]
|
||||
Cons_Assist_Level_2 = 0xb1, // Assist Level 2 [Unit:%, Factor:1,5625]
|
||||
Cons_Assist_Level_3 = 0xb2, // Assist Level 3 [Unit:%, Factor:1,5625]
|
||||
Cons_Assist_Level_4 = 0xb3, // Assist Level 4 [Unit:%, Factor:1,5625]
|
||||
Cons_Assist_Initlevel = 0xb4, // Initial Assist Level [Range:0..4]
|
||||
|
||||
Cons_Preference_Codes_Hihi = 0xb5, // Codes Lsb 0-(3771, 2005)Wheel Circumference, 1-(3772)Diagnostic Mode, 2-(3773)Max Speed, 3-(3774)Overvoltage Protection, 4-(3775)Max Throttle Speed, 5-(3776)Minimum Assist Speed, 6-(1976)Motor Direction, 7-(5000)Deprecated, 8-(2001)Metric Vs Imperial, 9-(2002)Regen Value, 10-(2003)Remaining Distance, 11-(2004)Clock Time, 12-(2006)Brake Switch Config, 13-(2007)Throttle Polarity, 14-(2008)Accessory Voltage, 15-(0041)Slave Console, 16-(1234)Filter, 17-(1970)Light Sensor, 18-(0007)Gauge Gain, 19-(0008)Assistance Gain, 20-(0009)Gauge Joint, 21-(0911)Deprecated, 22-(0001)Console Info, 23-(0002)Battery Info, 24-(0003)Motor Info, 25-(6000)Battery Statistics, 26-(0006)Speed Gain, 27-Alarm, 28-Time
|
||||
Cons_Preference_Codes_Hilo = 0xb6,
|
||||
Cons_Preference_Codes_Lohi = 0xb7,
|
||||
Cons_Preference_Codes_Lolo = 0xb8,
|
||||
Cons_Preference_Codesrw_Hihi = 0xb9, // Codesrw Lsb Same Bit As Console.Preference.Codes Except For: 28-Mountain Mode
|
||||
Cons_Preference_Codesrw_Hilo = 0xba,
|
||||
Cons_Preference_Codesrw_Lohi = 0xbb,
|
||||
Cons_Preference_Codesrw_Lolo = 0xbc,
|
||||
Cons_Sn_Oem_Hi = 0xbd, // Oem
|
||||
Cons_Sn_Oem_Lo = 0xbe,
|
||||
Cons_Preference_Throttle_Mode = 0xbf, // Throttlemode Configure The Throttle For The Menu Change Mode (Until Hw 15)
|
||||
Cons_Assist_Speedgain = 0xc0, // [ Factor:0,1 ]
|
||||
Cons_Sn_Product_Hi = 0xc1, // Product
|
||||
Cons_Sn_Product_Lo = 0xc2,
|
||||
Cons_Throttle_Boost_Triggerlevel = 0xc3, // Boost Trigger Level [Unit:%, Range:1.5..50, Factor:1.5625] Code 3779
|
||||
Cons_Preference_Flip_Side = 0xc4, // Indicates On What Side Of The Handlebar Is Located The Console. 0-Right, 1-Left Code 2009
|
||||
Cons_Config_Testmode = 0xc5, // Writing A 1 To This Register Allows Setting The Console In Test Mode To Test The Lcd And Buttons
|
||||
Cons_Config_Testmode_Hw14 = 0xc3, // Reg C3 With Hw14
|
||||
|
||||
Cons_Assist_Mountain_Cap = 0xc6, // Maximum Set Point To Send To Motor When In Mountain Mode. 0-Disabled [Unit:%, Range:0..100, Faktor:1.5625]
|
||||
Cons_Config_Last_Mode = 0xc7, // Writing 255 Will Disable The Last Mode On Display Power On, 0 Will Enable The Last Mode On Display Power On
|
||||
|
||||
Console_Config_Last_Mode_On = 0x00,
|
||||
Console_Config_Last_Mode_Off = 0xff,
|
||||
|
||||
// Reg 200..207 Unused
|
||||
|
||||
Cons_Rev_Hw = 0xd0, // Hardware Version
|
||||
Cons_Status_Slave = 0xd1, // Writing A 1 To This Register Allows Going Imemdiatly In Slave Mode, Cannot Be Set To 0
|
||||
|
||||
Cons_Throttle_Raw_Hi = 0xd2, // Throttle Raw Position
|
||||
Cons_Throttle_Raw_Lo = 0xd3,
|
||||
Cons_Throttle_Position = 0xd4, // Throttle Position [Factor:1.5625]
|
||||
|
||||
// Reg 213 Unused // Outdated, Formerly Used By Pref. Language
|
||||
// Reg 214 Unused // And Boat Related. Now No Data From Regs.
|
||||
|
||||
Cons_Assist_Level_Rekuperation_3 = 0xd7, // 215 Reku Level 3 [Unit:%, Factor:1,5625]
|
||||
Cons_Assist_Level_Rekuperation_4 = 0xd8, // 216 Reku Level 4 [Unit:%, Factor:1,5625]
|
||||
Cons_Config_Service_Timestamp_Hi = 0xd9, // Day, In Battery-Relative Value, From Which Console Displays "Service". 0 To Disable The Feature
|
||||
Cons_Config_Service_Zimestamp_Lo = 0xda,
|
||||
Cons_Config_Service_Distance_Hi = 0xdb, // Odometer Value, From Which Console Displays "Service". 0 To Disable The Feature
|
||||
Cons_Config_Service_Distance_Lo = 0xdc,
|
||||
|
||||
// Reg 211 Unused
|
||||
|
||||
Cons_Assist_Level_Rekuperation_1 = 0xde, // Reku Level 1 [Unit:%, Factor:1,5625]
|
||||
Cons_Assist_Level_Rekuperation_2 = 0xdf, // Reku Level 2 [Unit:%, Factor:1,5625]
|
||||
|
||||
// Reg 224..255 Unused
|
||||
|
||||
//{%Endregion Console}
|
||||
|
||||
//{%Region Battery}
|
||||
ID_Battery = 0x10,
|
||||
|
||||
// ID_Battery_Response = 0x08,
|
||||
Reg_Battery_Config_Allow_Buckcharging_On_Bike = 0x12, // Specifies If The Battery Can Recharge In Buck Mode Even On A Bike. Make Sure It Is Impossible To Have An Accessory Output Before Setting This To 1. 0: Disallow, 1: Allow
|
||||
Reg_Battery_Status_Charger_Manager_Status = 0x13, // Gives State Of Charging Mef: 0-Off, 1-Stand-By, 2-Charger, 3-Accessory, 4-Vdcin Sense, 5-Overtemp, 6-Charge Done, 7-Buck Failed
|
||||
Reg_Battery_Config_Wake_On_Powervoltage = 0x14, // Specifies If The Battery Should Wake Up Automatically When A Voltage Is Present On The Vpower. A Value Of 0 Disables The Feature
|
||||
|
||||
Reg_Battery_Config_Sla_Constant_A = 0x15, // ++++ Boat Related (Soc Estimator)
|
||||
Reg_Battery_Config_Sla_Constant_B = 0x16, // ++++ Boat Related (Soc Estimator)
|
||||
Reg_Battery_Config_Sla_Constant_C = 0x15, // ++++ Boat Related (Soc Estimator)
|
||||
|
||||
Reg_Battery_Rev_Sub = 0x18, // Software Subversion
|
||||
|
||||
Reg_Battery_Config_Sla_Constant_D = 0x15, // ++++ Boat Related (Soc Estimator)
|
||||
|
||||
Reg_Battery_Rtc_Last_Valid_Timestamp_Hihi = 0x19, // Indicates Last Valid Battery Time. This Read-Only Register Is Set To Rtc.Time When Written And Then Refresh Each 34 Minutes
|
||||
Reg_Battery_Rtc_Last_Valid_Timestamp_Hilo = 0x1a,
|
||||
Reg_Battery_Rtc_Last_Valid_Timestamp_Lohi = 0x1b,
|
||||
Reg_Battery_Rtc_Last_Valid_Timestamp_Lolo = 0x1c,
|
||||
|
||||
Reg_Battery_Status_Flags_Hi = 0x1d, // Alert Status Bits: 0-Vctrl (Code 20), 1-Precharge (Code 21 And 67), 2-Relay (Code 22), 3-Bms (Code 23), 4-Dcdc (Code 28), 6-Gg Out Of Range Temperature, 7-Battery Pack Out Of Range Temperature, 8-Balancer Overvolt (Code 62), 9-Balancer Undervolt (Code 61), 10-Pack Problem (Code 63), 11-Accessory Overcurrent (Code 60), 12-Electronic Fuse (Code 66), 13-Balancer Plug Not Connected, 14- +5v Short(Lached)
|
||||
|
||||
Reg_Battery_Status_Cellpack_Current_Hi = 0x1e, // Reading Battery Current By A Shunt Resistor. No Delay, No Calibration Compared To Battery.Gg.Ai [Unit:A, Factor:0.001]
|
||||
Reg_Battery_Status_Cellpack_Current_Lo = 0x1f, // !!! Signed !!!
|
||||
|
||||
Reg_Battery_Config_Power_Voltage_Enable = 0x21, // - ??? Enable/Disable Vpower ???
|
||||
|
||||
Reg_Battery_Config_Accessory_Enabled = 0x22, // -
|
||||
|
||||
Reg_Battery_Config_Shutdown = 0x25, // Write 1 To Shutdwon System
|
||||
|
||||
Reg_Battery_Config_Control_Voltage_Enable = 0x26, // Enable/Disable Vcontrol
|
||||
|
||||
Reg_Battery_Config_Accessory_Voltage = 0x28, // - Until Hw 52 [Unit:V, Factor:6]
|
||||
// Since Hw 60 [Unit:V, Factor:0.1]
|
||||
|
||||
Reg_Battery_Config_Cap_Sense_Mode = 0x29, // Controls The Mode Of Operation Of The Soc Level Indicator. 0: Inactive, 1: Touch Detect When The Battery Is Off, 2: Touch Detect When Off And Soc Indication When Battery Is On. 3: Red And Blue Colors . 4: 5levels Soc
|
||||
|
||||
Reg_Battery_Config_Communication_Mode = 0x2a, // Determines How The Battery Communicates. To Change The Value, We Must First Write 0xaa To This Register And Then Write 1 To Switch To I2c Or 2 To Switch To Can
|
||||
Battery_Config_Communication_Mode_Key = 0xaa,
|
||||
|
||||
Reg_Battery_Status_Estimated_Soc = 0x30, // Return An Estimated Value Of Soc Based On Battery Voltage. Only Works With Liion Battery [Unit:%]
|
||||
|
||||
Reg_Battery_Status_Battery_Voltage_Normalized = 0x32, // Battery Voltage Normalized With 3.7v/Cell. Status.Vbattinternal It Used In Rev 104 And Less Otherwise Status.Vbatt [Unit:V, Factor:0.416667, Offset:20.8333]
|
||||
Reg_Battery_Stat_Battery_Avgvoltage_Normalized = 0x33, // Average Battery Voltage Read During 50s Based On Battery.Status.Vbatt, In Percentage Of Its Nominal Voltage [Unit:V, Factor:0.416667, Offset:20.8333]
|
||||
|
||||
Reg_Battery_Config_Shipmode = 0x37, // Determines If The Battery Is To Go In Ship Mode (Only External Power Can Wake It) Upon Its Next Shutdown. We Need To First Write 0xaa And Then The Desired Value To Set The Value. 0-Normal Mode, 1-Ship Mode
|
||||
Battery_Config_Shipmode_Key = 0xaa,
|
||||
|
||||
Reg_Battery_Rev_Hw = 0x3b, // Hardware Version
|
||||
Reg_Battery_Rev_Sw = 0x3c, // Software Version
|
||||
|
||||
Reg_Battery_Config_Type = 0x3d, // -
|
||||
|
||||
Reg_Battery_Rev_Bom = 0x41, // Identification Of Printed Circuit Board Bill Of Material Version. 1: All Smc6.2 And Smc#6.3r1. 8: Smc#6.3r4
|
||||
|
||||
Reg_Battery_Config_Taillamp_Intensity = 0x43, // Controls The Intensity Of The Tail Lamp. 0: Off. 1-100%: On
|
||||
|
||||
Reg_Battery_Config_Accessory_Mounted = 0x44, // -
|
||||
|
||||
Reg_Battery_Config_Battint_Voltage_Enable = 0x45, // Enable/Disable Vbattint
|
||||
|
||||
Reg_Battery_Config_Diag = 0x46, // -
|
||||
|
||||
Reg_Battery_Config_Force_Done = 0x47, // ++++ Setting This Register To 0x45 Will Force Soc To 100%
|
||||
Battery_Config_Force_Done = 0x45,
|
||||
|
||||
Reg_Battery_Stat_Resets_Hi = 0x48, // Reset Counter
|
||||
Reg_Battery_Stat_Resets_Lo = 0x49,
|
||||
|
||||
Reg_Battery_Status_Internal_Battery_Voltage_Hi = 0x4a, // Reading Of Vbattinternal [Unit:V, Factor:0.001]
|
||||
Reg_Battery_Status_Internal_Battery_Voltage_Lo = 0x4b,
|
||||
|
||||
Reg_Battery_Status_Console_Voltage_Hi = 0x4c, // Reading Of Vconsole (Voltage Applied To Console) [Unit:V, Factor:0.001]
|
||||
Reg_Battery_Status_Console_Voltage_Lo = 0x4d,
|
||||
|
||||
Reg_Battery_Status_12v_Voltage_Hi = 0x4e, // Reading Of Internal 12v [Unit:V, Factor:0.001]
|
||||
Reg_Battery_Status_12v_Voltage_Lo = 0x4f,
|
||||
|
||||
Reg_Battery_Config_Nominal_Battery_Voltage = 0x50, // Battery System Nominal Voltage
|
||||
|
||||
Reg_Battery_Timer_Power_Hi = 0x51, // Time Before The Power Output Shuts Down [Unit:S]
|
||||
Reg_Battery_Timer_Power_Lo = 0x52,
|
||||
Reg_Battery_Timer_Accessory_Hi = 0x53, // Time Before The Accessory Voltage Shuts Down [Unit:S]
|
||||
Reg_Battery_Timer_Accessory_Lo = 0x54,
|
||||
Reg_Battery_Timer_Precharge = 0x55, // Time Allowed To Precharge The Motor, Before Enabling Full Power [Unit:S]
|
||||
Reg_Battery_Timer_Shutdown_Hi = 0x56, // Time Of Inactivity Before The System Shuts Down [Unit:S]
|
||||
Reg_Battery_Timer_Shutdown_Lo = 0x57,
|
||||
|
||||
Reg_Battery_Sn_Location = 0x5b, // Location
|
||||
|
||||
Reg_Battery_Status_Accessory_Voltage_Hi = 0x5e, // Reading Of Vaccessory [Unit:V, Factor:0.001]
|
||||
Reg_Battery_Status_Accessory_Voltage_Lo = 0x5f,
|
||||
|
||||
Reg_Battery_Status_Charge_Level = 0x61, // Batterylevel [Unit:%, Factor:6.6667]
|
||||
Reg_Battery_Cellmon_Balancer_Enabled = 0x65, //
|
||||
|
||||
Reg_Battery_Status_Temperature_Sensor_1 = 0x66, // [Unit:C]
|
||||
Reg_Battery_Status_Temperature_Sensor_2 = 0x67, // !!! Signed !!!
|
||||
Reg_Battery_Status_Temperature_Sensor_3 = 0x68,
|
||||
Reg_Battery_Status_Temperature_Sensor_4 = 0x69,
|
||||
|
||||
Reg_Battery_Sn_Cellpack_Hi = 0x6a, // Serial Number Cellpack
|
||||
Reg_Battery_Sn_Cellpack_Lo = 0x6b,
|
||||
|
||||
Reg_Battery_Cellmon_Channel_Address = 0x6c, // Gateway To Cell Monitor, Write Address Here
|
||||
Reg_Battery_Cellmon_Channeldata_Hi = 0x6d, // And Read 16 Bit Voltages Here
|
||||
Reg_Battery_Cellmon_Channeldata_Lo = 0x6e, // And Here
|
||||
|
||||
Reg_Battery_Cellmon_Calibration_Data_Lo = 0x6f, // Cell Calibration Data, Select Cell Via Reg_Battery_Cellmon_Channel Register
|
||||
// Since Hw 60, Sw 103 16 Bit Values Are Provided, See Reg_Battery_Calibration_Data_Hi Below
|
||||
Reg_Battery_Protect_Unlock = 0x71,
|
||||
Battery_Protect_Lock_Key = 0x00,
|
||||
Battery_Protect_Unlock_Key = 0xaa,
|
||||
|
||||
Reg_Battery_Sn_Year = 0x72, // Mfd. Year
|
||||
Reg_Battery_Sn_Month = 0x73, // Mfd. Month
|
||||
Reg_Battery_Sn_Day = 0x74, // Mfd Day
|
||||
|
||||
Reg_Battery_Sn_Pn_Hi = 0x75, // Part Number
|
||||
Reg_Battery_Sn_Pn_Lo = 0x76,
|
||||
Reg_Battery_Sn_Item_Hi = 0x77, // Serial Number
|
||||
Reg_Battery_Sn_Item_Lo = 0x78,
|
||||
|
||||
Reg_Battery_Cellmon_Calibration_Data_Hi = 0x7c, // Refer Reg_Battery_Calibration_Data_Lo Above
|
||||
|
||||
Reg_Battery_Status_Poweron_Reset_Count = 0x7d, // Return How Many Time Main Microcontroller Hardly Reset
|
||||
|
||||
Reg_Battery_Config_Autoswitch_Communication = 0x7e, // ++++ Allow To Switch Communication Mode Without Shutdown. Write 0xaa, Then 0x01. Comm. Mode Switches. Communicate With Desired Comm. Mode Before 5s (100ms Min) To Validate. Write 0 To Desactivate
|
||||
Battery_Config_Autoswitch_Communication_Key = 0xaa,
|
||||
|
||||
Reg_Battery_Brigde_Charger_Addr = 0x85, // Gateway To Charger, Write Address Here (Needs Unlocking)
|
||||
Reg_Battery_Brigde_Charger_Data = 0x86, // And Read Data Here
|
||||
|
||||
Reg_Battery_Status_Leds = 0x87, // -
|
||||
|
||||
Reg_Battery_Stat_Chargetime_Mean_Hi = 0x8a, // -
|
||||
Reg_Battery_Stat_Chargetime_Mean_Lo = 0x8b, // -
|
||||
Reg_Battery_Stat_Chargetime_Worst_Hi = 0x8c, // -
|
||||
Reg_Battery_Stat_Chargetime_Worst_Lo = 0x8d, // -
|
||||
|
||||
Reg_Battery_Stat_Battery_Cycles_Hi = 0x8e, // - Battery Charge Cycles
|
||||
Reg_Battery_Stat_Battery_Cycles_Lo = 0x8f, // -
|
||||
|
||||
Reg_Battery_Stat_Rtc_Resync = 0x90, // -
|
||||
Reg_Battery_Stat_Lmd_Adapt = 0x91, // -
|
||||
|
||||
Reg_Battery_Stat_Battery_Full_Cycles_Hi = 0x92, // - Battery Full Charge Cycles
|
||||
Reg_Battery_Stat_Battery_Full_Cycles_Lo = 0x93, // -
|
||||
|
||||
Reg_Battery_Stat_Power_Cycles_Hi = 0x96, // Power On Cycles
|
||||
Reg_Battery_Stat_Power_Cycles_Lo = 0x97, // -
|
||||
|
||||
Reg_Battery_Stat_Battery_Max_Voltage = 0x98, // Maximum Voltage Ever Seen By The Battery, In Percentage Of Its Nominal Voltage [Unit:%, Factor:0.416667, Offset:20.8333]
|
||||
Reg_Battery_Stat_Battery_Min_Voltage = 0x99, // Minimum Voltage Ever Seen By The Battery, In Percentage Of Its Nominal Voltage [Unit:%, Factor:0.416667, Offset:20.8333]
|
||||
|
||||
Reg_Battery_Status_Dcin_Voltage_Hi = 0x9a, // Reading Of External Power Supply Voltage [Unit:V, Factor:0.001]
|
||||
Reg_Battery_Status_Dcin_Voltage_Lo = 0x9b,
|
||||
|
||||
Reg_Battery_Stat_Temperature_Max = 0x9c, // - !!! Signed !!!
|
||||
Reg_Battery_Stat_Temperature_Min = 0x9d, // - !!! Signed !!!
|
||||
|
||||
Reg_Battery_Stat_Control_Voltage_Shorts = 0x9e, // Until Hw 52, Now Via I2c Bridge
|
||||
|
||||
Reg_Battery_Stat_Watchdog_Reset_Count = 0x9f, // Return How Many Time Watchdog Reset Trigged
|
||||
Reg_Battery_Status_Reset_Wdt = 0x9f, // - Same As Above?
|
||||
|
||||
Reg_Battery_Rtc_Ctrl = 0xa0, // -
|
||||
|
||||
Reg_Battery_Rtc_Time_Hihi = 0xa1, // Indicates Current Battery Time In Seconds. Its Value Is Normally Relative To Assembly Time
|
||||
Reg_Battery_Rtc_Time_Hilo = 0xa2,
|
||||
Reg_Battery_Rtc_Time_Lohi = 0xa3,
|
||||
Reg_Battery_Rtc_Time_Lolo = 0xa4,
|
||||
|
||||
Reg_Battery_Rtc_Status = 0xa5, // Describes The Status Of The Rtc: 0-In Sync, 1-Write Ok, 2-Read Ok, 3-Update Time, 4-Update Ctrl, 5-Osc Ok, 7-Rtc Detected
|
||||
|
||||
Reg_Battery_Status_Battery_Voltage_Hi = 0xa6, // Reading Of Vbatt. Return Same Value As Vcell13 [Unit:V, Factor:0.001]
|
||||
Reg_Battery_Status_Battery_Voltage_Lo = 0xa7,
|
||||
|
||||
Reg_Battery_Status_Power_Voltage_Hi = 0xaa, // Reading Of Vpower ("High" Voltage Applied To Motor) [Unit:V, Factor:0.001]
|
||||
Reg_Battery_Status_Power_Voltage_Lo = 0xab,
|
||||
|
||||
Reg_Battery_Status_Control_Voltage_Hi = 0xac, // Reading Of Vcontrol (Control Voltage Applied To Motor) [Unit:V, Factor:0.001]
|
||||
Reg_Battery_Status_Control_Voltage_Lo = 0xad,
|
||||
|
||||
Reg_Battery_Config_Pack_Serial = 0xae, // No Of Cells In Serial
|
||||
Reg_Battery_Config_Pack_Parallel = 0xaf, // No Of Cells In Parallel
|
||||
|
||||
Reg_Battery_Gasgage_Dmfsd = 0xb5, // Digital Magnitude Filter And Self Discharge Rate
|
||||
|
||||
Reg_Battery_Config_Ilmd = 0xb9, // - [Unit:Ah, Factor:0.54835]
|
||||
|
||||
Reg_Battery_Gasgage_Soc = 0xbc, // - [Unit:%]
|
||||
|
||||
Reg_Battery_Gasgage_Ai_Hi = 0xd3, // - [Unit:A, Factor:0.002141]
|
||||
Reg_Battery_Gasgage_Ai_Lo = 0xd4,
|
||||
|
||||
Reg_Battery_Stat_Lmd_Hi = 0xd5, // - [Unit:Ah, Factor:0.002142]
|
||||
Reg_Battery_Stat_Lmd_Lo = 0xd6,
|
||||
Reg_Battery_Gasgage_Lmd_Hi = 0xd5, // - [Unit:Ah, Factor:0.002142]
|
||||
Reg_Battery_Gasgage_Lmd_Lo = 0xd6,
|
||||
|
||||
Reg_Battery_Config_Nac_Raddr_Hi = 0xdb, // -
|
||||
Reg_Battery_Config_Nac_Raddr_Lo = 0xdc,
|
||||
|
||||
Reg_Battery_Gasgage_Status_Flags = 0xde, // -
|
||||
|
||||
Reg_Battery_Gasgage_Voltage_Hi = 0xdf, // - [Unit:V, Factor:0.008]
|
||||
Reg_Battery_Gasgage_Voltage_Lo = 0xe0,
|
||||
|
||||
Reg_Battery_Gasgage_Temperatur_Hi = 0xe1, // - [Unit:C, Factor:0.25, Offset:-273]
|
||||
Reg_Battery_Gasgage_Temperatur_Lo = 0xe2,
|
||||
|
||||
Reg_Battery_Stat_Ggjr_Calib = 0xec, // -
|
||||
|
||||
Reg_Battery_Gasgage_Voltage_Divider = 0xed, // Gas Gage External Divider Value. Indicates How The Voltage Is Divided Before Reaching The Gg. For Example, If The Battery Voltage Is 30v And This Register Is 10, The Gg Will Have 3v At Its Input [Factor:0.1]
|
||||
|
||||
Reg_Battery_Config_Nac_Hi = 0xe5, // -
|
||||
Reg_Battery_Config_Nac_Lo = 0xe6,
|
||||
|
||||
Reg_Battery_Protect_Mode = 0xe7, // -
|
||||
Reg_Battery_Protect_Control = 0xe8, // -
|
||||
|
||||
Reg_Battery_Status_Flags_Lo = 0xf0, // Alert Status Bits: 0-Vctrl (Code 20), 1-Precharge (Code 21 And 67), 2-Relay (Code 22), 3-Bms (Code 23), 4-Dcdc (Code 28), 6-Gg Out Of Range Temperature, 7-Battery Pack Out Of Range Temperature, 8-Balancer Overvolt (Code 62), 9-Balancer Undervolt (Code 61), 10-Pack Problem (Code 63), 11-Accessory Overcurrent (Code 60), 12-Electronic Fuse (Code 66), 13-Balancer Plug Not Connected, 14- +5v Short(Lached)
|
||||
|
||||
Reg_Battery_Rtc_Last_Charge_Timestamp_Hihi = 0xf2, // Written On Boot-Up And Shutdown, This Register Indicates When Last Minimum 10% Charge Was Completed
|
||||
Reg_Battery_Rtc_Last_Charge_Timestamp_Hilo = 0xf3,
|
||||
Reg_Battery_Rtc_Last_Charge_Timestamp_Lohi = 0xf4,
|
||||
Reg_Battery_Rtc_Last_Charge_Timestamp_Lolo = 0xf5,
|
||||
|
||||
Reg_Battery_Stat_Charge_Times_Channel = 0xf6, // Indicates Which Charge Statistic Should Be Accessed When Accessing Chargedata. Value Can Be Any Value Between 1 And 9, 1 Being For 10% Stat And 9 For 90% Stat
|
||||
Reg_Battery_Stat_Charge_Times_Data_Hi = 0xf7,
|
||||
Reg_Battery_Stat_Charge_Times_Data_Lo = 0xf8,
|
||||
|
||||
Reg_Battery_Config_Max_Charge_Hi = 0xf9, // Maximum Regen. Current On Vpower [Unit:A, Factor:0.001]
|
||||
Reg_Battery_Config_Max_Charge_Lo = 0xfa,
|
||||
|
||||
Reg_Battery_Config_Max_Discharge_Hi = 0xfb, // Maximum Drawn Current On Vpower [Unit:A, Factor:0.001]
|
||||
Reg_Battery_Config_Max_Discharge_Lo = 0xfc,
|
||||
|
||||
Reg_Battery_Config_Cellcapacity_Hi = 0xfd, // - [Unit:Ah, Factor:0.001]
|
||||
Reg_Battery_Config_Cellcapacity_Lo = 0xfe,
|
||||
|
||||
|
||||
Reg_Battery_Bridge_I2c_Regaddr_Device = 0x58, // Gateway To I2c Registers, Write Device (Highbyte) Here,
|
||||
Reg_Battery_Bridge_I2c_Regaddr_Register = 0x70, // Register (Lowbyte) Here
|
||||
Reg_Battery_Bridge_I2c_Register_Data = 0x60, // And Read Data Here
|
||||
|
||||
|
||||
// Battery Cell Monitor Registers
|
||||
Reg_Cellmon_Channel_Voltage_1 = 0x01, // [Unit:V, Factor:0.001]
|
||||
// ...
|
||||
Reg_Cellmon_Channel_Voltage_13 = 0x0d, // [Unit:V, Factor:0.001]
|
||||
|
||||
Reg_Cellmon_Cell_Voltage_1 = 0x81, // [Unit:V, Factor:0.001]
|
||||
// ... // !!! Signed !!!
|
||||
Reg_Cellmon_Cell_Voltage_13 = 0x8d, // [Unit:V, Factor:0.001]
|
||||
|
||||
Reg_Cellmon_Status_Bomid_Voltage = 0xc8, // Raw Voltage Of The Resistor Divider Used To Identify The Revision Of The Bom
|
||||
Reg_Cellmon_Status_Packid_Voltage = 0xc9, // Raw Voltage Of The Resistor Divider Used To Identify The Cell Pack
|
||||
Reg_Cellmon_Status_3v3_Voltage = 0xca, // Internal Voltage Of The 3.3v Derived From The Internal 5v [Unit:V, Factor:0.001]
|
||||
Reg_Cellmon_Status_5v_Voltage = 0xcb, // Internal Voltage Of The 5(5.5)V Derived From The Internal 12v [Unit:V, Factor:0.001]
|
||||
|
||||
Reg_Cellmon_Calibration_1 = 0x01, // [Unit:%, Factor:0.03] !!! Signed !!!
|
||||
// ... // !!! Signed !!!
|
||||
Reg_Cellmon_Calibration_13 = 0x0d, // [Unit:%, Factor:0.03]
|
||||
|
||||
Reg_Charger_Status_Flags_Hi = 0x02, // -
|
||||
Reg_Charger_Status_Flags_Lo = 0x03, // -
|
||||
|
||||
Reg_Charger_Mode = 0x10, // Indicates The Mode Of The On-Board Charger. 0-Low Power, 1-Idle, 2-Charging, 3-Accessory Output, 5-Calibration, 99-Fault
|
||||
|
||||
Reg_Charger_Final_Voltage_Hi = 0x12, // Set Final Charge Voltage [Unit:V, Factor:0.01]
|
||||
Reg_Charger_Final_Voltage_Lo = 0x13,
|
||||
|
||||
Reg_Charger_Current_Hi = 0x14, // Set Charge Current [Unit:A, Factor:0.001]
|
||||
Reg_Charger_Current_Lo = 0x15,
|
||||
|
||||
Reg_Charger_Voltage_Calibration_Hi = 0x42, // Multiplier Applied On Charger Voltage Reading For Its Calibration
|
||||
Reg_Charger_Voltage_Calibration_Lo = 0x43,
|
||||
|
||||
Reg_Charger_Current_Calibration_Hi = 0x46, // Multiplier Applied On Charger Current Reading For Its Calibration
|
||||
Reg_Charger_Current_Calibration_Lo = 0x47,
|
||||
|
||||
Reg_Charger_Rev_Charger = 0x56, // -
|
||||
|
||||
//{%Endregion}
|
||||
|
||||
// {%Region Motor}
|
||||
ID_Motor = 0x20,
|
||||
// ID_Motor_Response = 0x08,
|
||||
Motor_Assist_Level = 0x09, // [Unit:%, Range:-100..100, Factor:1.5625] !!! Signed !!!
|
||||
|
||||
Motor_Assist_Walk_Level = 0x0a, // Top Level When Assisting In Walk Mode [Unit:%, Factor:1.5625]
|
||||
Motor_Assist_Walk_Speed_Decrease_Start = 0x0b, // Speed From Which The Motor Starts Diminishing Its Assistance When Using The "Walk Mode" [Unit:Km/H, Factor:0.1]
|
||||
Motor_Assist_Walk_Speed_Decrease_End = 0x0c, // Speed At Which The Motor Gives No More Assistance When Using The "Walk Mode" [Unit:Km/H, Factor:0.1]
|
||||
Motor_Assist_Walk_Level_Max = 0x0d, // Top Level When Assisting In Walk Mode [Unit:%, Factor:1.5625]
|
||||
|
||||
Motor_Status_Speed = 0x11, // - [Unit:Rpm, Factor:9.091]
|
||||
Motor_Status_Power_Meter = 0x14, // - [Unit:%, Factor:1.5625]
|
||||
|
||||
Motor_Status_Temperature = 0x16, // - [Unit:C]
|
||||
|
||||
Motor_Rev_Hw = 0x19, // Hardware Version
|
||||
Motor_Rev_Sw = 0x20, // Software Version
|
||||
|
||||
Motor_Torque_Gauge_Value = 0x21, // - [Unit:%, Range:0?..100, Factor:1.5625]
|
||||
|
||||
Motor_Rev_Sub = 0x22, // Software Subversion
|
||||
|
||||
Motor_Config_Communication_Mode_Lo = 0x36, // - 8 Bit Until Sw 83
|
||||
|
||||
Motor_Assist_Lowspeed_Ramp_Flag = 0x40, // Enables A Lower Speed Ramp. 0: Ramp Disabled, 1: Ramp Enabled
|
||||
|
||||
Motor_Assist_Direction = 0x42, // -
|
||||
Motor_Sn_Stator_Type = 0x43, // -
|
||||
Motor_Geometry_Circ_Hi = 0x44,
|
||||
Motor_Geometry_Circ_Lo = 0x45,
|
||||
|
||||
Motor_Torque_Gauge_Polarity = 0x46, // -
|
||||
|
||||
Motor_Status_Main = 0x47, // Indicates The Current Main Status Of The Motor. 0-Running, 1-Nocommand, 2-Startup, 3-I2cshutoff, 4-Antibackwardshort, 5-Alarmregen, 6-Alarmshort, 7-Overspeedi, 8-Overspeedv, 9-V12uvp, 10-V12ovp, 11-Vpwruvp, 12-Vpwrovp, 13-Ocprotect, 14-Badstatorpn, 15-Hallerror
|
||||
|
||||
Motor_Sn_Item_Hi = 0x60, // Serial Number
|
||||
Motor_Sn_Item_Lo = 0x61,
|
||||
Motor_Sn_Pn_Hi = 0x62, // Partnumber
|
||||
Motor_Sn_Pn_Lo = 0x63,
|
||||
Motor_Sn_Year = 0x64, // Mfd. Year
|
||||
Motor_Sn_Month = 0x65, // Mfd. Month
|
||||
Motor_Sn_Day = 0x66, // Mfd. Day
|
||||
|
||||
Motor_Sn_Oem_Hi = 0x67, // Oem
|
||||
Motor_Sn_Oem_Lo = 0x68,
|
||||
Motor_Sn_Product_Hi = 0x69, // Product
|
||||
Motor_Sn_Product_Lo = 0x6a,
|
||||
Motor_Sn_Location = 0x6b, // Location
|
||||
|
||||
Motor_Torque_Gauge_Type = 0x6c, // -
|
||||
|
||||
Motor_Assist_Stator_Pn_Hi = 0x6d, // -
|
||||
Motor_Assist_Stator_Pn_Lo = 0x6e, //
|
||||
|
||||
Motor_Status_Power_Voltage_Hi = 0x70, // - [Unit:V, Factor:0.001]
|
||||
Motor_Status_Power_Voltage_Lo = 0x71,
|
||||
|
||||
Motor_Status_12v_Voltage_Hi = 0x72, // - [Unit:V, Factor:0.001]
|
||||
Motor_Status_12v_Voltage_Lo = 0x73,
|
||||
|
||||
Motor_Status_5v_Voltage_Hi = 0x74, // - [Unit:V, Factor:0.001]
|
||||
Motor_Status_5v_Voltage_Lo = 0x75,
|
||||
|
||||
Motor_Stat_Max_Power_Voltage_Hi = 0x80, // - [Unit:V, Factor:0.001]
|
||||
Motor_Stat_Max_Power_Voltage_Lo = 0x81,
|
||||
|
||||
Motor_Stat_Max_Temperature_Hi = 0x82, // -
|
||||
Motor_Stat_Max_Temperature_Lo = 0x83,
|
||||
|
||||
Motor_Stat_Odo_Hi = 0x84, // - [Unit:Km]
|
||||
Motor_Stat_Odo_Lo = 0x85,
|
||||
|
||||
Motor_Stat_Chrono_Hours_Hi = 0x86, // - [Unit:H]
|
||||
Motor_Stat_Chrono_Hours_Lo = 0x87,
|
||||
|
||||
Motor_Stat_Chrono_Seconds_Hi = 0x88, // - [Unit:S]
|
||||
Motor_Stat_Chrono_Seconds_Lo = 0x89,
|
||||
|
||||
Motor_Preference_Region = 0x8a, // -
|
||||
|
||||
Motor_Assist_Maxspeed = 0x8b, // - [Unit:Km/H]
|
||||
Motor_Assist_Dynamic_Flag = 0x8c, // - [Range:0..1]
|
||||
|
||||
Motor_Config_Pwm_Limit_Enable = 0x8d, // -
|
||||
|
||||
Motor_Status_Codes = 0x92, // Indicates Conditions Currently Detected By Motor. Bit 0-Sensor Saturation
|
||||
Motor_Status_Codes_Latch = 0x93, // Indicates Conditions Detected By Motor Since Its Last Power Up. See Bit Description Of Status.Codes
|
||||
|
||||
|
||||
Motor_Protect_Unlock = 0xa5, // Unlock Register, Write Unlock_Key Here Before Setting Protected Registers
|
||||
Motor_Protect_Unlock_Key = 0xaa,
|
||||
Motor_Protect_Lock_Key = 0x00,
|
||||
|
||||
Motor_Stat_Hall_Dchs_Hi = 0xb0, // -
|
||||
Motor_Stat_Hall_Dchs_Lo = 0xb1,
|
||||
|
||||
Motor_Stat_Hall_Trans_Hi = 0xb2, // -
|
||||
Motor_Stat_Hall_Trans_Lo = 0xb3,
|
||||
|
||||
Motor_Stat_Hall_Ring_Hi = 0xb4, // -
|
||||
Motor_Stat_Hall_Ring_Lo = 0xb5,
|
||||
|
||||
Motor_Stat_Hall_Lost_Hi = 0xb6, // -
|
||||
Motor_Stat_Hall_Lost_Lo = 0xb7,
|
||||
|
||||
Motor_Torque_Gauge_Noise_Hi = 0xc4, // - [Unit:%, Range:0..100, Factor:0.0015259]
|
||||
Motor_Torque_Gauge_Noise_Lo = 0xc5,
|
||||
|
||||
Motor_Torque_Gauge_Delay_Hi = 0xc6, // - [Unit:S, Range:0..?, Factor:0.001]
|
||||
Motor_Torque_Gauge_Delay_Lo = 0xc7,
|
||||
|
||||
Motor_Torque_Gauge_Speed = 0xc8, // - [Unit:Rpm, Range:0..?, Factor:9.091]
|
||||
|
||||
Motor_Torque_Gauge_Voltage_Hi = 0xc9, // - [Unit:V, Range:0..5, Factor:0.000076295, Offset:5]
|
||||
Motor_Torque_Gauge_Voltage_Lo = 0xca,
|
||||
|
||||
Motor_Torque_Gauge_Reference_Hi = 0xcb, // - [Unit:V, Range:0..5, Factor:0.000076295, Offset:5]
|
||||
Motor_Torque_Gauge_Reference_Lo = 0xcc,
|
||||
|
||||
Motor_Config_Communication_Mode_Hi = 0xcd, // Sets The Communication Mode. 0 For Can And 0xca01 For I2c
|
||||
|
||||
Motor_Torque_Gauge_Gain = 0xce, // - [Unit:%, Range:0..398, Factor:1.5625]
|
||||
|
||||
Motor_Torque_Gauge_Max_Voltage = 0xe0, // Maximum Voltage Allowed For The Sensor. When The Sensor Detect A Voltage Over This Value For Motor.Torque.Gaugemaxvoltagedelay, It Assumes An Electrical Failure And Cuts Assistance [Unit:V, Range:0..5, Factor:0.019608]
|
||||
Motor_Torque_Gauge_Max_Voltage_Delay = 0xe1, // Time After Which A Voltage Over Motor.Torque.Gaugemaxvoltage Is Assumed To Be An Electrical Failure, Cutting Assistance [Unit:S, Range:0..25.5, Factor:0.1]
|
||||
|
||||
Motor_Assist_Level_Offslope_Hi = 0xd0, // Speed At Which The Assist Level Set In The Motor Decreases When The Console Stops Sending Requests (When It Is Removed For Example) [Unit:%/S, Factor:3.05]
|
||||
Motor_Assist_Level_Offslope_Lo = 0xd1,
|
||||
|
||||
Motor_Assist_Regen_Inflex = 0xd2, // Speed From Which Regen Is Not Attenuated [Unit:Rpm, Range:5..?, Factor:9.091]
|
||||
|
||||
Motor_Assist_Maxspeed_Derate_Delta = 0xd3, // Speed Before Maxspeed To Start Derating [Unit:Rpm, Factor:9.091]
|
||||
//{%Endregion}
|
||||
|
||||
|
||||
//{%Region Sensor}
|
||||
ID_Sensor = 0x68,
|
||||
Reg_Sensor_Config_Gauge_Gain_Hi = 0x10,
|
||||
Reg_Sensor_Config_Gauge_Gain_Lo = 0x11,
|
||||
|
||||
Reg_Sensor_Config_Ramp_Up_Steps_Hi = 0x12,
|
||||
Reg_Sensor_Config_Ramp_Up_Steps_Lo = 0x13,
|
||||
|
||||
Reg_Sensor_Config_Decay_Delay_Hi = 0x14,
|
||||
Reg_Sensor_Config_Decay_Delay_Lo = 0x15,
|
||||
|
||||
Reg_Sensor_Config_Decay_Steps_Hi = 0x16,
|
||||
Reg_Sensor_Config_Decay_Steps_Lo = 0x17,
|
||||
|
||||
Reg_Sensor_Config_Speed_Threshold_Hi = 0x18,
|
||||
Reg_Sensor_Config_Speed_Threshold_Lo = 0x19,
|
||||
|
||||
Reg_Sensor_Config_Ramp_Active_Over_Threshold = 0x1a,
|
||||
|
||||
Reg_Sensor_Status_Torque_Voltage = 0x1b, // Torque Sensor Voltage
|
||||
|
||||
Reg_Sensor_Status_Cadence = 0x1c, // Number Of Turns Per Minutes Made With The Pedals
|
||||
|
||||
Reg_Sensor_Status_Output_Voltage = 0x1d, // Voltage Output To The Motor's Gauge Sensor
|
||||
|
||||
Reg_Sensor_Status_Pulse_Counter = 0x1e, // Pulse Counter. Increases When Back Pedaling And Decreases When Forward Pedaling
|
||||
|
||||
Reg_Sensor_Config_Input_Offset = 0x40, // Permit To Offset The Input Value Of The Torque Sensor From +1.64 To -1.65v
|
||||
|
||||
Reg_Sensor_Sn_Location = 0x71, // Location
|
||||
|
||||
Reg_Sensor_Sn_Year = 0x72, // Mfd. Year
|
||||
Reg_Sensor_Sn_Month = 0x73, // Mfd. Month
|
||||
Reg_Sensor_Sn_Day = 0x74, // Mfd. Day
|
||||
|
||||
Reg_Sensor_Sn_Pn_Hi = 0x75, // Partnumber
|
||||
Reg_Sensor_Sn_Pn_Lo = 0x76,
|
||||
|
||||
Reg_Sensor_Sn_Item_Hi = 0x77, // Serial Number
|
||||
Reg_Sensor_Sn_Item_Lo = 0x78,
|
||||
|
||||
Reg_Sensor_Rev_Hw = 0x80, // Hardware Version
|
||||
Reg_Sensor_Rev_Sw = 0x81, // Software Version
|
||||
|
||||
Reg_Sensor_Config_Mode = 0x82, // 0-Thune, 1-Fag
|
||||
|
||||
Reg_Sensor_Rev_Sub = 0x83 // Software Subversion
|
||||
|
||||
};
|
||||
//const
|
||||
// SECONDS_PER_DAY = SecsPerDay; //60 * 60 * 24;
|
||||
|
||||
Q_ENUM(ID)
|
||||
|
||||
}; // struct BionxID
|
||||
|
||||
struct BCDevice
|
||||
{
|
||||
Q_GADGET
|
||||
|
||||
public:
|
||||
|
||||
enum class ID : uint8_t
|
||||
{
|
||||
Invalid = 0,
|
||||
Console = uint8_t( BC::ID::ID_Console_Slave ),
|
||||
Console_Master = uint8_t( BC::ID::ID_Console_Master),
|
||||
Battery = uint8_t( BC::ID::ID_Battery),
|
||||
Motor = uint8_t( BC::ID::ID_Motor ),
|
||||
BIB = uint8_t( BC::ID::ID_Bib ),
|
||||
Sensor = uint8_t( BC::ID::ID_Sensor )
|
||||
};
|
||||
Q_ENUM(ID)
|
||||
};
|
||||
|
||||
|
||||
#endif // BC_H
|
||||
46
bccommand.cpp
Normal file
46
bccommand.cpp
Normal file
@@ -0,0 +1,46 @@
|
||||
/***************************************************************************
|
||||
|
||||
BionxControl
|
||||
Copyright © 2025 christoph holzheuer
|
||||
christoph.holzheuer@gmail.com
|
||||
|
||||
Using:
|
||||
|
||||
BigXionFlasher USB V 0.2.4 rev. 97
|
||||
© 2011-2013 by Thomas Koenig <info@bigxionflasher.org>
|
||||
@see www.bigxionflasher.org
|
||||
|
||||
Bionx Bike Info
|
||||
© 2018 Thorsten Schmidt (tschmidt@ts-soft.de)
|
||||
@see www.ts-soft.de
|
||||
|
||||
mhs_can_drv.c 3.00
|
||||
© 2011 - 2015 by MHS-Elektronik GmbH & Co. KG, Germany
|
||||
Demlehner Klaus, info@mhs-elektronik.de
|
||||
@see www.mhs-elektronik.de
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
@see https://github.com/bikemike/bionx-bikeinfo
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include <bccommand.h>
|
||||
|
||||
|
||||
BCCommand::BCCommand(BCDevice::ID deviceID_, BC::ID targetID_)
|
||||
: deviceID{deviceID_}, targetID{targetID_}
|
||||
{
|
||||
}
|
||||
|
||||
void BCCommand::setLongValue( uint8_t value)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
uint8_t BCCommand::getLongValue()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
57
bccommand.h
Normal file
57
bccommand.h
Normal file
@@ -0,0 +1,57 @@
|
||||
/***************************************************************************
|
||||
|
||||
BionxControl
|
||||
Copyright © 2025 christoph holzheuer
|
||||
christoph.holzheuer@gmail.com
|
||||
|
||||
Using:
|
||||
|
||||
BigXionFlasher USB V 0.2.4 rev. 97
|
||||
© 2011-2013 by Thomas Koenig <info@bigxionflasher.org>
|
||||
@see www.bigxionflasher.org
|
||||
|
||||
Bionx Bike Info
|
||||
© 2018 Thorsten Schmidt (tschmidt@ts-soft.de)
|
||||
@see www.ts-soft.de
|
||||
|
||||
mhs_can_drv.c 3.00
|
||||
© 2011 - 2015 by MHS-Elektronik GmbH & Co. KG, Germany
|
||||
Demlehner Klaus, info@mhs-elektronik.de
|
||||
@see www.mhs-elektronik.de
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
@see https://github.com/bikemike/bionx-bikeinfo
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef BCCOMMAND_H
|
||||
#define BCCOMMAND_H
|
||||
|
||||
#include <QString>
|
||||
#include <bc.h>
|
||||
|
||||
|
||||
class BCCommandRunner;
|
||||
|
||||
struct BCCommand
|
||||
{
|
||||
|
||||
BCCommand( BCDevice::ID deviceID, BC::ID targetID );
|
||||
|
||||
void setLongValue( uint8_t value);
|
||||
uint8_t getLongValue();
|
||||
|
||||
QString label;
|
||||
BCDevice::ID deviceID{BCDevice::ID::Invalid};
|
||||
BC::ID targetID{BC::ID::Invalid};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // BCCOMMAND_H
|
||||
3
bccommandmanager.cpp
Normal file
3
bccommandmanager.cpp
Normal file
@@ -0,0 +1,3 @@
|
||||
#include <bccommandmanager.h>
|
||||
|
||||
|
||||
5
bccommandmanager.h
Normal file
5
bccommandmanager.h
Normal file
@@ -0,0 +1,5 @@
|
||||
#ifndef BCCOMMANDMANAGER_H
|
||||
#define BCCOMMANDMANAGER_H
|
||||
|
||||
|
||||
#endif // BCCOMMANDMANAGER_H
|
||||
30
bccommandrunner.cpp
Normal file
30
bccommandrunner.cpp
Normal file
@@ -0,0 +1,30 @@
|
||||
/***************************************************************************
|
||||
|
||||
BionxControl
|
||||
Copyright © 2025 christoph holzheuer
|
||||
christoph.holzheuer@gmail.com
|
||||
|
||||
Using:
|
||||
|
||||
BigXionFlasher USB V 0.2.4 rev. 97
|
||||
© 2011-2013 by Thomas Koenig <info@bigxionflasher.org>
|
||||
@see www.bigxionflasher.org
|
||||
|
||||
Bionx Bike Info
|
||||
© 2018 Thorsten Schmidt (tschmidt@ts-soft.de)
|
||||
@see www.ts-soft.de
|
||||
|
||||
mhs_can_drv.c 3.00
|
||||
© 2011 - 2015 by MHS-Elektronik GmbH & Co. KG, Germany
|
||||
Demlehner Klaus, info@mhs-elektronik.de
|
||||
@see www.mhs-elektronik.de
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
@see https://github.com/bikemike/bionx-bikeinfo
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include <bccommandrunner.h>
|
||||
81
bccommandrunner.h
Normal file
81
bccommandrunner.h
Normal file
@@ -0,0 +1,81 @@
|
||||
/***************************************************************************
|
||||
|
||||
BionxControl
|
||||
Copyright © 2025 christoph holzheuer
|
||||
christoph.holzheuer@gmail.com
|
||||
|
||||
Using:
|
||||
|
||||
BigXionFlasher USB V 0.2.4 rev. 97
|
||||
© 2011-2013 by Thomas Koenig <info@bigxionflasher.org>
|
||||
@see www.bigxionflasher.org
|
||||
|
||||
Bionx Bike Info
|
||||
© 2018 Thorsten Schmidt (tschmidt@ts-soft.de)
|
||||
@see www.ts-soft.de
|
||||
|
||||
mhs_can_drv.c 3.00
|
||||
© 2011 - 2015 by MHS-Elektronik GmbH & Co. KG, Germany
|
||||
Demlehner Klaus, info@mhs-elektronik.de
|
||||
@see www.mhs-elektronik.de
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
@see https://github.com/bikemike/bionx-bikeinfo
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#ifndef BCCOMMANDRUNNER_H
|
||||
#define BCCOMMANDRUNNER_H
|
||||
|
||||
#include <QThread>
|
||||
|
||||
|
||||
#include <QObject>
|
||||
#include <QQueue>
|
||||
#include <QMutex>
|
||||
#include <QSemaphore>
|
||||
#include <atomic>
|
||||
#include <QVariant>
|
||||
#include "bccommand.h"
|
||||
|
||||
class Worker : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public slots:
|
||||
|
||||
void doWork(const QString ¶meter)
|
||||
{
|
||||
QString result;
|
||||
/* ... here is the expensive or blocking operation ... */
|
||||
emit resultReady(result);
|
||||
}
|
||||
|
||||
signals:
|
||||
|
||||
void resultReady(const QString &result);
|
||||
};
|
||||
|
||||
/*
|
||||
class BCCommandRunner : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
BCCommandRunner();
|
||||
virtual ~BCCommandRunner() = default;
|
||||
|
||||
protected:
|
||||
};
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // BCCOMMANDRUNNER_H
|
||||
43
bcmainwindow.cpp
Normal file
43
bcmainwindow.cpp
Normal file
@@ -0,0 +1,43 @@
|
||||
/***************************************************************************
|
||||
|
||||
BionxControl
|
||||
Copyright © 2025 christoph holzheuer
|
||||
christoph.holzheuer@gmail.com
|
||||
|
||||
Using:
|
||||
|
||||
BigXionFlasher USB V 0.2.4 rev. 97
|
||||
© 2011-2013 by Thomas Koenig <info@bigxionflasher.org>
|
||||
@see www.bigxionflasher.org
|
||||
|
||||
Bionx Bike Info
|
||||
© 2018 Thorsten Schmidt (tschmidt@ts-soft.de)
|
||||
@see www.ts-soft.de
|
||||
|
||||
mhs_can_drv.c 3.00
|
||||
© 2011 - 2015 by MHS-Elektronik GmbH & Co. KG, Germany
|
||||
Demlehner Klaus, info@mhs-elektronik.de
|
||||
@see www.mhs-elektronik.de
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
@see https://github.com/bikemike/bionx-bikeinfo
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include <bcmainwindow.h>
|
||||
#include <ui_bcmainwindow.h>
|
||||
|
||||
BCMainWindow::BCMainWindow(QWidget *parent)
|
||||
: QMainWindow(parent)
|
||||
, ui(new Ui::BCMainWindow)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
BCMainWindow::~BCMainWindow()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
57
bcmainwindow.h
Normal file
57
bcmainwindow.h
Normal file
@@ -0,0 +1,57 @@
|
||||
/***************************************************************************
|
||||
|
||||
BionxControl
|
||||
Copyright © 2025 christoph holzheuer
|
||||
christoph.holzheuer@gmail.com
|
||||
|
||||
Using:
|
||||
|
||||
BigXionFlasher USB V 0.2.4 rev. 97
|
||||
© 2011-2013 by Thomas Koenig <info@bigxionflasher.org>
|
||||
@see www.bigxionflasher.org
|
||||
|
||||
Bionx Bike Info
|
||||
© 2018 Thorsten Schmidt (tschmidt@ts-soft.de)
|
||||
@see www.ts-soft.de
|
||||
|
||||
mhs_can_drv.c 3.00
|
||||
© 2011 - 2015 by MHS-Elektronik GmbH & Co. KG, Germany
|
||||
Demlehner Klaus, info@mhs-elektronik.de
|
||||
@see www.mhs-elektronik.de
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
@see https://github.com/bikemike/bionx-bikeinfo
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef BCMAINWINDOW_H
|
||||
#define BCMAINWINDOW_H
|
||||
|
||||
#include <QMainWindow>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui
|
||||
{
|
||||
class BCMainWindow;
|
||||
}
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
||||
class BCMainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
BCMainWindow(QWidget *parent = nullptr);
|
||||
~BCMainWindow();
|
||||
|
||||
private:
|
||||
|
||||
Ui::BCMainWindow *ui;
|
||||
};
|
||||
|
||||
#endif // BCMAINWINDOW_H
|
||||
31
bcmainwindow.ui
Normal file
31
bcmainwindow.ui
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>BCMainWindow</class>
|
||||
<widget class="QMainWindow" name="BCMainWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>BCMainWindow</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget"/>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
17
bcvalue.cpp
Normal file
17
bcvalue.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <bcvalue.h>
|
||||
|
||||
|
||||
BCRawValue::BCRawValue(BCDevice::ID deviceID_, BC::ID targetID_)
|
||||
: deviceID{deviceID_}, targetID{targetID_}
|
||||
{
|
||||
}
|
||||
|
||||
void BCRawValue::setLongValue( uint8_t value)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
uint8_t BCRawValue::getLongValue()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
40
bcvalue.h
Normal file
40
bcvalue.h
Normal file
@@ -0,0 +1,40 @@
|
||||
#ifndef BCRawValue_H
|
||||
#define BCRawValue_H
|
||||
|
||||
|
||||
class BCRawValueRunner;
|
||||
|
||||
#include <QString>
|
||||
#include <bc.h>
|
||||
|
||||
struct BCRawValue
|
||||
{
|
||||
|
||||
BCRawValue( BCDevice::ID deviceID, BC::ID targetID );
|
||||
|
||||
void setLongValue( uint8_t value);
|
||||
uint8_t getLongValue();
|
||||
|
||||
QString label;
|
||||
BCDevice::ID deviceID{BCDevice::ID::Invalid};
|
||||
BC::ID targetID{BC::ID::Invalid};
|
||||
|
||||
};
|
||||
|
||||
struct BCUnit
|
||||
{
|
||||
enum class ID
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
class BCValue
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif // BCRawValue_H
|
||||
60
bcvalue.h.autosave
Normal file
60
bcvalue.h.autosave
Normal file
@@ -0,0 +1,60 @@
|
||||
#ifndef BCRawValue_H
|
||||
#define BCRawValue_H
|
||||
|
||||
|
||||
class BCRawValueRunner;
|
||||
|
||||
#include <QString>
|
||||
#include <bc.h>
|
||||
|
||||
struct BCRawValue
|
||||
{
|
||||
|
||||
BCRawValue( BCDevice::ID deviceID, BC::ID targetID );
|
||||
|
||||
void setLongValue( uint8_t value);
|
||||
uint8_t getLongValue();
|
||||
|
||||
QString label;
|
||||
BCDevice::ID deviceID{BCDevice::ID::Invalid};
|
||||
BC::ID targetID{BC::ID::Invalid};
|
||||
|
||||
};
|
||||
|
||||
struct BCUnit
|
||||
{
|
||||
enum class ID
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
class BCValue
|
||||
{
|
||||
public:
|
||||
BCValue( BCDevice::ID deviceID, BC::ID targetID );
|
||||
|
||||
void setLongValue( uint8_t value);
|
||||
uint8_t getLongValue();
|
||||
|
||||
QString label;
|
||||
BCDevice::ID deviceID{BCDevice::ID::Invalid};
|
||||
BC::ID targetID{BC::ID::Invalid};
|
||||
double _value{-1};
|
||||
};
|
||||
|
||||
|
||||
class BCValueShort
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
|
||||
class BCValueLong
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // BCRawValue_H
|
||||
3
bcvaluemanager.cpp
Normal file
3
bcvaluemanager.cpp
Normal file
@@ -0,0 +1,3 @@
|
||||
#include "bcvaluemanager.h"
|
||||
|
||||
BCValueManager::BCValueManager() {}
|
||||
10
bcvaluemanager.h
Normal file
10
bcvaluemanager.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef BCVALUEMANAGER_H
|
||||
#define BCVALUEMANAGER_H
|
||||
|
||||
class BCValueManager
|
||||
{
|
||||
public:
|
||||
BCValueManager();
|
||||
};
|
||||
|
||||
#endif // BCVALUEMANAGER_H
|
||||
BIN
can_api/MhsSlCan.dll
Normal file
BIN
can_api/MhsSlCan.dll
Normal file
Binary file not shown.
283
can_api/can_drv.h
Normal file
283
can_api/can_drv.h
Normal file
@@ -0,0 +1,283 @@
|
||||
#ifndef __CAN_DRV_H__
|
||||
#define __CAN_DRV_H__
|
||||
|
||||
#include "can_drv_config.h"
|
||||
#include "can_types.h"
|
||||
|
||||
#ifdef __WIN32__
|
||||
// ****** Windows
|
||||
#include <windows.h>
|
||||
#define DRV_CALLBACK_TYPE __stdcall
|
||||
#else
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
#define DRV_CALLBACK_TYPE
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/***************************************************************/
|
||||
/* Define Makros */
|
||||
/***************************************************************/
|
||||
|
||||
// CAN <20>bertragungsgeschwindigkeit
|
||||
#define CAN_10K_BIT 10 // 10 kBit/s
|
||||
#define CAN_20K_BIT 20 // 20 kBit/s
|
||||
#define CAN_50K_BIT 50 // 50 kBit/s
|
||||
#define CAN_100K_BIT 100 // 100 kBit/s
|
||||
#define CAN_125K_BIT 125 // 125 kBit/s
|
||||
#define CAN_250K_BIT 250 // 250 kBit/s
|
||||
#define CAN_500K_BIT 500 // 500 kBit/s
|
||||
#define CAN_800K_BIT 800 // 800 kBit/s
|
||||
#define CAN_1M_BIT 1000 // 1 MBit/s
|
||||
#define CAN_1M5_BIT 1500 // 1,5 MBit/s
|
||||
#define CAN_2M_BIT 2000 // 2 MBit/s
|
||||
#define CAN_3M_BIT 3000 // 3 MBit/s
|
||||
#define CAN_4M_BIT 4000 // 4 MBit/s
|
||||
|
||||
// Time Stamp Mode
|
||||
#define TIME_STAMP_OFF 0 // keine Time-Stamps
|
||||
#define TIME_STAMP_SOFT 1 // Software Time-Stamps
|
||||
#define TIME_STAMP_HW_UNIX 2 // Hardware Time-Stamps, UNIX-Format
|
||||
#define TIME_STAMP_HW 3 // Hardware Time-Stamps
|
||||
#define TIME_STAMP_HW_SW_UNIX 4 // Hardware Time-Stamps verwenden wenn verf<72>gbar,
|
||||
// ansonsten Software Time-Stamps
|
||||
// Ab Treiber Version 4.08!
|
||||
|
||||
// CAN Bus Mode
|
||||
#define OP_CAN_NO_CHANGE 0 // Aktuellen Zustand nicht <20>ndern
|
||||
#define OP_CAN_START 1 // Startet den CAN-Bus
|
||||
#define OP_CAN_STOP 2 // Stopt den CAN-Bus
|
||||
#define OP_CAN_RESET 3 // Reset CAN Controller (BusOff l<>schen)
|
||||
#define OP_CAN_START_LOM 4 // Startet den CAN-Bus im Silent Mode (Listen Only Mode)
|
||||
#define OP_CAN_START_NO_RETRANS 5 // Startet den CAN-Bus im Automatic Retransmission disable Mode
|
||||
#define OP_CAN_ECU_FLASH_MODE 6 // Start im ECU Flash Mode
|
||||
|
||||
#define CAN_CMD_NONE 0x0000
|
||||
#define CAN_CMD_RXD_OVERRUN_CLEAR 0x0001
|
||||
#define CAN_CMD_RXD_FIFOS_CLEAR 0x0002
|
||||
#define CAN_CMD_TXD_OVERRUN_CLEAR 0x0004
|
||||
#define CAN_CMD_TXD_FIFOS_CLEAR 0x0008
|
||||
#define CAN_CMD_HW_FILTER_CLEAR 0x0010
|
||||
#define CAN_CMD_SW_FILTER_CLEAR 0x0020
|
||||
#define CAN_CMD_TXD_PUFFERS_CLEAR 0x0040
|
||||
// <*> neu
|
||||
#define CAN_CMD_START_DATA_TRANSFER 0x1000
|
||||
#define CAN_CMD_CANCEL_DATA_TRANSFER 0x2000
|
||||
#define CAN_CMD_START_TEST 0xE000
|
||||
#define CAN_CMD_STOP_TEST 0xF000
|
||||
|
||||
#define CAN_CMD_FIFOS_CLEAR 0x000F
|
||||
#define CAN_CMD_ALL_CLEAR 0x0FFF
|
||||
|
||||
|
||||
// DrvStatus
|
||||
#define DRV_NOT_LOAD 0 // Die Treiber DLL wurde noch nicht geladen
|
||||
#define DRV_STATUS_NOT_INIT 1 // Treiber noch nicht Initialisiert (Funktion "CanInitDrv" noch nicht aufgerufen)
|
||||
#define DRV_STATUS_INIT 2 // Treiber erfolgrich Initialisiert
|
||||
#define DRV_STATUS_PORT_NOT_OPEN 3 // Die Schnittstelle wurde nicht ge<67>ffnet
|
||||
#define DRV_STATUS_PORT_OPEN 4 // Die Schnittstelle wurde ge<67>ffnet
|
||||
#define DRV_STATUS_DEVICE_FOUND 5 // Verbindung zur Hardware wurde Hergestellt
|
||||
#define DRV_STATUS_CAN_OPEN 6 // Device wurde ge<67>ffnet und erfolgreich Initialisiert
|
||||
#define DRV_STATUS_CAN_RUN_TX 7 // CAN Bus RUN nur Transmitter (wird nicht verwendet !)
|
||||
#define DRV_STATUS_CAN_RUN 8 // CAN Bus RUN
|
||||
|
||||
// CanStatus
|
||||
#define CAN_STATUS_OK 0 // CAN-Controller: Ok
|
||||
#define CAN_STATUS_ERROR 1 // CAN-Controller: CAN Error
|
||||
#define CAN_STATUS_WARNING 2 // CAN-Controller: Error warning
|
||||
#define CAN_STATUS_PASSIV 3 // CAN-Controller: Error passiv
|
||||
#define CAN_STATUS_BUS_OFF 4 // CAN-Controller: Bus Off
|
||||
#define CAN_STATUS_UNBEKANNT 5 // CAN-Controller: Status Unbekannt
|
||||
|
||||
// Neu f<>r Low-Speed CAN, TJA1055 Fehler
|
||||
#define BUS_FAILURE 0x10
|
||||
|
||||
// Fifo Status
|
||||
#define FIFO_OK 0 // Fifo-Status: Ok
|
||||
#define FIFO_HW_OVERRUN 1 // Fifo-Status: Hardware Fifo <20>berlauf
|
||||
#define FIFO_SW_OVERRUN 2 // Fifo-Status: Software Fifo <20>berlauf
|
||||
#define FIFO_HW_SW_OVERRUN 3 // Fifo-Status: Hardware & Software Fifo <20>berlauf
|
||||
#define FIFO_STATUS_UNBEKANNT 4 // Fifo-Status: Unbekannt
|
||||
|
||||
// Makros f<>r SetEvent
|
||||
#define EVENT_ENABLE_PNP_CHANGE 0x0001
|
||||
#define EVENT_ENABLE_STATUS_CHANGE 0x0002
|
||||
#define EVENT_ENABLE_RX_FILTER_MESSAGES 0x0004
|
||||
#define EVENT_ENABLE_RX_MESSAGES 0x0008
|
||||
#define EVENT_ENABLE_ALL 0x00FF
|
||||
|
||||
#define EVENT_DISABLE_PNP_CHANGE 0x0100
|
||||
#define EVENT_DISABLE_STATUS_CHANGE 0x0200
|
||||
#define EVENT_DISABLE_RX_FILTER_MESSAGES 0x0400
|
||||
#define EVENT_DISABLE_RX_MESSAGES 0x0800
|
||||
#define EVENT_DISABLE_ALL 0xFF00
|
||||
|
||||
// <*> Neu
|
||||
#define TCAN_LOG_FLAG_MESSAGE 0x00000001
|
||||
#define TCAN_LOG_FLAG_STATUS 0x00000002
|
||||
#define TCAN_LOG_FLAG_RX_MSG 0x00000004
|
||||
#define TCAN_LOG_FLAG_TX_MSG 0x00000008
|
||||
#define TCAN_LOG_FLAG_API_CALL 0x00000010
|
||||
#define TCAN_LOG_API_CALL_RX 0x00000020
|
||||
#define TCAN_LOG_API_CALL_TX 0x00000040
|
||||
#define TCAN_LOG_API_CALL_STATUS 0x00000080
|
||||
#define TCAN_LOG_FLAG_ERROR 0x00000100
|
||||
#define TCAN_LOG_FLAG_WARN 0x00000200
|
||||
#define TCAN_LOG_FLAG_ERR_MSG 0x00000400
|
||||
#define TCAN_LOG_FLAG_OV_MSG 0x00000800
|
||||
#define TCAN_LOG_USB 0x00008000 // <*> neu
|
||||
#define TCAN_LOG_FLAG_DEBUG 0x08000000
|
||||
#define TCAN_LOG_FLAG_WITH_TIME 0x40000000
|
||||
#define TCAN_LOG_FLAG_DISABLE_SYNC 0x80000000
|
||||
|
||||
/***************************************************************/
|
||||
/* Typen */
|
||||
/***************************************************************/
|
||||
|
||||
/******************************************/
|
||||
/* Device Status */
|
||||
/******************************************/
|
||||
#pragma pack(push, 1)
|
||||
struct TDeviceStatus
|
||||
{
|
||||
int32_t DrvStatus; // Treiber Status (Device close / Device open / CAN Bus RUN)
|
||||
unsigned char CanStatus; // Status des CAN Controllers (Ok / ... / Error passiv / Bus off)
|
||||
unsigned char FifoStatus; // Fifo Status (Ok / ... / Hard. u. Soft. FIFO <20>berlauf)
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
||||
#ifdef CAN_API_TRUE_FUNC
|
||||
|
||||
int32_t CanInitDriver(char *options);
|
||||
void CanDownDriver(void);
|
||||
int32_t CanSetOptions(char *options);
|
||||
int32_t CanDeviceOpen(uint32_t index, char *parameter);
|
||||
int32_t CanDeviceClose(uint32_t index);
|
||||
|
||||
int32_t CanSetMode(uint32_t index, unsigned char can_op_mode, uint16_t can_command);
|
||||
|
||||
int32_t CanTransmit(uint32_t index, struct TCanMsg *msg, int32_t count);
|
||||
void CanTransmitClear(uint32_t index);
|
||||
uint32_t CanTransmitGetCount(uint32_t index);
|
||||
int32_t CanTransmitSet(uint32_t index, uint16_t cmd, uint32_t time);
|
||||
int32_t CanReceive(uint32_t index, struct TCanMsg *msg, int32_t count);
|
||||
void CanReceiveClear(uint32_t index);
|
||||
uint32_t CanReceiveGetCount(uint32_t index);
|
||||
|
||||
int32_t CanSetSpeed(uint32_t index, uint16_t speed);
|
||||
int32_t CanSetSpeedUser(uint32_t index, uint32_t value);
|
||||
char *CanDrvInfo(void);
|
||||
char *CanDrvHwInfo(uint32_t index);
|
||||
int32_t CanSetFilter(uint32_t index, struct TMsgFilter *msg_filter);
|
||||
int32_t CanGetDeviceStatus(uint32_t index, struct TDeviceStatus *status);
|
||||
void CanSetPnPEventCallback(void (DRV_CALLBACK_TYPE *event)(uint32_t index, int32_t status));
|
||||
void CanSetStatusEventCallback(void (DRV_CALLBACK_TYPE *event)
|
||||
(uint32_t index, struct TDeviceStatus *device_status));
|
||||
void CanSetRxEventCallback(void (DRV_CALLBACK_TYPE *event)(uint32_t index,
|
||||
struct TCanMsg *msg, int32_t count));
|
||||
|
||||
void CanSetEvents(uint16_t events);
|
||||
uint32_t CanEventStatus(void);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if !(defined(CAN_API_TRUE_FUNC)) || defined(CAN_DRV_INCLUDE)
|
||||
/***************************************************************/
|
||||
/* Funktionstypen */
|
||||
/***************************************************************/
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanInitDriver)(char *options);
|
||||
typedef void (DRV_CALLBACK_TYPE *TCanDownDriver)(void);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanSetOptions)(char *options);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanDeviceOpen)(uint32_t index, char *parameter);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanDeviceClose)(uint32_t index);
|
||||
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanSetMode)(uint32_t index, unsigned char can_op_mode,
|
||||
uint16_t can_command);
|
||||
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanTransmit)(uint32_t index, struct TCanMsg *msg, int32_t count);
|
||||
typedef void (DRV_CALLBACK_TYPE *TCanTransmitClear)(uint32_t index);
|
||||
typedef uint32_t (DRV_CALLBACK_TYPE *TCanTransmitGetCount)(uint32_t index);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanTransmitSet)(uint32_t index, uint16_t cmd, uint32_t time);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanReceive)(uint32_t index, struct TCanMsg *msg, int32_t count);
|
||||
typedef void (DRV_CALLBACK_TYPE *TCanReceiveClear)(uint32_t index);
|
||||
typedef uint32_t (DRV_CALLBACK_TYPE *TCanReceiveGetCount)(uint32_t index);
|
||||
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanSetSpeed)(uint32_t index, uint16_t speed);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanSetSpeedUser)(uint32_t index, uint32_t value);
|
||||
typedef char * (DRV_CALLBACK_TYPE *TCanDrvInfo)(void);
|
||||
typedef char * (DRV_CALLBACK_TYPE *TCanDrvHwInfo)(uint32_t index);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanSetFilter)(uint32_t index, struct TMsgFilter *msg_filter);
|
||||
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanGetDeviceStatus)(uint32_t index, struct TDeviceStatus *status);
|
||||
|
||||
typedef void (DRV_CALLBACK_TYPE *TCanSetPnPEventCallback)(void (DRV_CALLBACK_TYPE *event)
|
||||
(uint32_t index, int32_t status));
|
||||
typedef void (DRV_CALLBACK_TYPE *TCanSetStatusEventCallback)(void (DRV_CALLBACK_TYPE *event)
|
||||
(uint32_t index, struct TDeviceStatus *device_status));
|
||||
typedef void (DRV_CALLBACK_TYPE *TCanSetRxEventCallback)(void (DRV_CALLBACK_TYPE *event)
|
||||
(uint32_t index, struct TCanMsg *msg, int32_t count));
|
||||
|
||||
typedef void (DRV_CALLBACK_TYPE *TCanSetEvents)(uint16_t events);
|
||||
typedef uint32_t (DRV_CALLBACK_TYPE *TCanEventStatus)(void);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef CAN_API_TRUE_FUNC
|
||||
/***************************************************************/
|
||||
/* Tiny-CAN API Funktionen */
|
||||
/***************************************************************/
|
||||
|
||||
extern TCanInitDriver CanInitDriver;
|
||||
extern TCanDownDriver CanDownDriver;
|
||||
extern TCanSetOptions CanSetOptions;
|
||||
extern TCanDeviceOpen CanDeviceOpen;
|
||||
extern TCanDeviceClose CanDeviceClose;
|
||||
|
||||
extern TCanSetMode CanSetMode;
|
||||
|
||||
extern TCanTransmit CanTransmit;
|
||||
extern TCanTransmitClear CanTransmitClear;
|
||||
extern TCanTransmitGetCount CanTransmitGetCount;
|
||||
extern TCanTransmitSet CanTransmitSet;
|
||||
extern TCanReceive CanReceive;
|
||||
extern TCanReceiveClear CanReceiveClear;
|
||||
extern TCanReceiveGetCount CanReceiveGetCount;
|
||||
|
||||
extern TCanSetSpeed CanSetSpeed;
|
||||
extern TCanSetSpeedUser CanSetSpeedUser;
|
||||
|
||||
extern TCanDrvInfo CanDrvInfo;
|
||||
extern TCanDrvHwInfo CanDrvHwInfo;
|
||||
extern TCanSetFilter CanSetFilter;
|
||||
|
||||
extern TCanGetDeviceStatus CanGetDeviceStatus;
|
||||
|
||||
extern TCanSetPnPEventCallback CanSetPnPEventCallback;
|
||||
extern TCanSetStatusEventCallback CanSetStatusEventCallback;
|
||||
extern TCanSetRxEventCallback CanSetRxEventCallback;
|
||||
|
||||
extern TCanSetEvents CanSetEvents;
|
||||
extern TCanEventStatus CanEventStatus;
|
||||
|
||||
#endif
|
||||
|
||||
/***************************************************************/
|
||||
/* Funktionen Treiber laden/entladen */
|
||||
/***************************************************************/
|
||||
int32_t LoadDriver(const char *file_name);
|
||||
void UnloadDriver(void);
|
||||
|
||||
#include "can_drv_ex.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
16
can_api/can_drv_config.h
Normal file
16
can_api/can_drv_config.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef __CAN_DRV_CONFIG_H__
|
||||
#define __CAN_DRV_CONFIG_H__
|
||||
|
||||
#ifndef STRICT_CAN_FD_SUPPORT
|
||||
//#define STRICT_CAN_FD_SUPPORT
|
||||
#endif
|
||||
|
||||
#ifndef CAN_API_TRUE_FUNC
|
||||
#define CAN_API_TRUE_FUNC
|
||||
#endif
|
||||
|
||||
#ifndef DRV_REF_LOCKING
|
||||
#define DRV_REF_LOCKING
|
||||
#endif
|
||||
|
||||
#endif
|
||||
420
can_api/can_drv_ex.h
Normal file
420
can_api/can_drv_ex.h
Normal file
@@ -0,0 +1,420 @@
|
||||
#ifndef __CAN_DRV_EX_H__
|
||||
#define __CAN_DRV_EX_H__
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ERR_NO_CAN_DRIVER_LOAD -1000000
|
||||
|
||||
|
||||
#define DEV_LIST_SHOW_TCAN_ONLY 0x01
|
||||
#define DEV_LIST_SHOW_UNCONNECT 0x02
|
||||
|
||||
/***************************************************************/
|
||||
/* Define Makros */
|
||||
/***************************************************************/
|
||||
#define CAN_FEATURE_LOM 0x0001 // Silent Mode (LOM = Listen only Mode)
|
||||
#define CAN_FEATURE_ARD 0x0002 // Automatic Retransmission disable
|
||||
#define CAN_FEATURE_TX_ACK 0x0004 // TX ACK (Gesendete Nachrichten best<73>tigen)
|
||||
#define CAN_FEATURE_ERROR_MSGS 0x0008 // Error Messages Support
|
||||
#define CAN_FEATURE_FD_HARDWARE 0x0010 // CAN-FD Hardware
|
||||
#define CAN_FEATURE_FIFO_OV_MODE 0x0020 // FIFO OV Mode (Auto Clear, OV CAN Messages)
|
||||
#define CAN_FEATURE_ECU_FLASH 0x0040 // Hardware beschleunigung f<>r ISO-TP ECU-Flash programmierung
|
||||
#define CAN_FEATURE_CAN_TEST 0x4000 // Tiny-CAN Tester Firmware
|
||||
#define CAN_FEATURE_HW_TIMESTAMP 0x8000 // Hardware Time Stamp
|
||||
|
||||
// (V)alue (T)ype
|
||||
#define VT_BYTE 0x01
|
||||
#define VT_UBYTE 0x02
|
||||
#define VT_WORD 0x03
|
||||
#define VT_UWORD 0x04
|
||||
#define VT_LONG 0x05
|
||||
#define VT_ULONG 0x06
|
||||
|
||||
#define VT_BYTE_ARRAY 0x07
|
||||
#define VT_UBYTE_ARRAY 0x08
|
||||
#define VT_WORD_ARRAY 0x09
|
||||
#define VT_UWORD_ARRAY 0x0A
|
||||
#define VT_LONG_ARRAY 0x0B
|
||||
#define VT_ULONG_ARRAY 0x0C
|
||||
|
||||
#define VT_BYTE_RANGE_ARRAY 0x0D
|
||||
#define VT_UBYTE_RANGE_ARRAY 0x0E
|
||||
#define VT_WORD_RANGE_ARRAY 0x0F
|
||||
#define VT_UWORD_RANGE_ARRAY 0x10
|
||||
#define VT_LONG_RANGE_ARRAY 0x11
|
||||
#define VT_ULONG_RANGE_ARRAY 0x12
|
||||
|
||||
#define VT_HBYTE 0x40
|
||||
#define VT_HWORD 0x41
|
||||
#define VT_HLONG 0x42
|
||||
|
||||
#define VT_STREAM 0x80
|
||||
#define VT_STRING 0x81
|
||||
#define VT_POINTER 0x82
|
||||
#define VT_REVISION 0x83
|
||||
#define VT_DATE 0x84
|
||||
|
||||
// MHS (EV)ent (S)ource
|
||||
#define MHS_EVS_STATUS 1
|
||||
#define MHS_EVS_PNP 2
|
||||
#define MHS_EVS_OBJECT 3
|
||||
|
||||
#define MHS_EVS_DIN 4
|
||||
#define MHS_EVS_ENC 5
|
||||
#define MHS_EVS_KEY 6
|
||||
|
||||
|
||||
#define MHS_TERMINATE 0x80000000
|
||||
|
||||
|
||||
// <*> neu
|
||||
#define CAN_DATA_ST_IDLE 0
|
||||
#define CAN_DATA_ST_RUN 1
|
||||
#define CAN_DATA_ST_FINISH 2
|
||||
#define CAN_DATA_ST_ERR_ACK_TIMEOUT -1
|
||||
#define CAN_DATA_ST_ERR_NACK -2
|
||||
#define CAN_DATA_ST_ERR_OVERFLOW -3
|
||||
#define CAN_DATA_ST_ERR_ISOTP -4
|
||||
|
||||
// ISO-TP Flags
|
||||
#define CAN_DATA_ISOTP_29BIT_ID 0x01
|
||||
#define CAN_DATA_ISOTP_EXTEND_ADDR 0x02
|
||||
#define CAN_DATA_ISOTP_TX_PADDING 0x04
|
||||
#define CAN_DATA_ISOTP_LISTEN_MODE 0x08
|
||||
|
||||
|
||||
// <*> neu
|
||||
#define TCAN_INFO_KEY_HW_SNR 0x00000000 // Hardware Snr
|
||||
#define TCAN_INFO_KEY_HW_ID_STR 0x00000001 // Hardware ID String
|
||||
#define TCAN_INFO_KEY_HW_BIOS_STR 0x00000002 // Bios ID String
|
||||
#define TCAN_INFO_KEY_HW_REVISION 0x00000003 // Hardware Revision
|
||||
#define TCAN_INFO_KEY_HW_DATE 0x00000004 // Fertigungsdatum
|
||||
#define TCAN_INFO_KEY_HW_VARIANT_STR 0x00000005 // Hardware Variante
|
||||
|
||||
#define TCAN_INFO_KEY_HW_CAN_COUNT 0x00008000 // Anzahl CAN Interfaces
|
||||
#define TCAN_INFO_KEY_HW_CAN_DRV 0x00008010 // Treiber
|
||||
#define TCAN_INFO_KEY_HW_CAN_OPTO 0x00008020 // Opto
|
||||
#define TCAN_INFO_KEY_HW_CAN_TERM 0x00008030 // Term
|
||||
#define TCAN_INFO_KEY_HW_CAN_HS 0x00008040 // HighSpeed
|
||||
#define TCAN_INFO_KEY_HW_I2C_CNT 0x00008100 // Anzahl I2C Interfaces
|
||||
#define TCAN_INFO_KEY_HW_SPI_CNT 0x00008200 // Anzahl SPI Interfaces
|
||||
|
||||
#define TCAN_INFO_KEY_FW_ID 0x00001000 // ID
|
||||
#define TCAN_INFO_KEY_FW_ID_STR 0x00001001 // ID String
|
||||
#define TCAN_INFO_KEY_FW_VERSION 0x00001002 // Version
|
||||
#define TCAN_INFO_KEY_FW_VERSION_STR 0x00001003 // Version String
|
||||
#define TCAN_INFO_KEY_FW_AUTOR 0x00001004 // Autor
|
||||
#define TCAN_INFO_KEY_FW_OPTIOS 0x00001005 // Optionen
|
||||
#define TCAN_INFO_KEY_FW_SNR 0x00001006 // Snr
|
||||
|
||||
#define TCAN_INFO_KEY_FW_CAN_FLAGS 0x00008001 // CAN Features Flags
|
||||
#define TCAN_INFO_KEY_FW_CAN_FLAGS2 0x00008002 // CAN Features Flags2 // <*>
|
||||
#define TCAN_INFO_KEY_FW_CAN_CLOCK1 0x00008003
|
||||
#define TCAN_INFO_KEY_FW_CAN_CLOCK2 0x00008004
|
||||
#define TCAN_INFO_KEY_FW_CAN_CLOCK3 0x00008005
|
||||
#define TCAN_INFO_KEY_FW_CAN_CLOCK4 0x00008006
|
||||
#define TCAN_INFO_KEY_FW_CAN_CLOCK5 0x00008007
|
||||
#define TCAN_INFO_KEY_FW_CAN_CLOCK6 0x00008008
|
||||
#define TCAN_INFO_KEY_FW_PUFFER_CNT 0x00008050 // Anzahl Interval Puffer
|
||||
#define TCAN_INFO_KEY_FW_FILTER_CNT 0x00008060 // Anzahl Filter
|
||||
|
||||
#define TCAN_INFO_KEY_OPEN_INDEX 0x01000001
|
||||
#define TCAN_INFO_KEY_HARDWARE_ID 0x01000002
|
||||
#define TCAN_INFO_KEY_HARDWARE 0x01000003
|
||||
#define TCAN_INFO_KEY_VENDOR 0x01000004
|
||||
|
||||
#define TCAN_INFO_KEY_DEVICE_NAME 0x01000005
|
||||
#define TCAN_INFO_KEY_SERIAL_NUMBER 0x01000006
|
||||
|
||||
#define TCAN_INFO_KEY_CAN_FEATURES 0x01000007
|
||||
#define TCAN_INFO_KEY_CAN_CHANNELS 0x01000008
|
||||
#define TCAN_INFO_KEY_RX_FILTER_CNT 0x01000009
|
||||
#define TCAN_INFO_KEY_TX_BUFFER_CNT 0x0100000A
|
||||
#define TCAN_INFO_KEY_CAN_CLOCKS 0x0100000B
|
||||
#define TCAN_INFO_KEY_CAN_CLOCK1 0x0100000C
|
||||
#define TCAN_INFO_KEY_CAN_CLOCK2 0x0100000D
|
||||
#define TCAN_INFO_KEY_CAN_CLOCK3 0x0100000E
|
||||
#define TCAN_INFO_KEY_CAN_CLOCK4 0x0100000F
|
||||
#define TCAN_INFO_KEY_CAN_CLOCK5 0x01000010
|
||||
#define TCAN_INFO_KEY_CAN_CLOCK6 0x01000011
|
||||
|
||||
|
||||
#define TCAN_INFO_KEY_API_VERSION 0x02000001
|
||||
#define TCAN_INFO_KEY_DLL 0x02000002
|
||||
#define TCAN_INFO_KEY_CFG_APP 0x02000003
|
||||
|
||||
/***************************************************************/
|
||||
/* Typen */
|
||||
/***************************************************************/
|
||||
#pragma pack(push, 1)
|
||||
struct TModulFeatures
|
||||
{
|
||||
uint32_t CanClock; // Clock-Frequenz des CAN-Controllers, muss nicht mit
|
||||
// der Clock-Frequenz des Mikrocontrollers <20>bereinstimmen
|
||||
uint32_t Flags; // Unterst<73>tzte Features des Moduls:
|
||||
// Bit 0 -> Silent Mode (LOM = Listen only Mode)
|
||||
// 1 -> Automatic Retransmission disable
|
||||
// 2 -> TX ACK (Gesendete Nachrichten best<73>tigen)
|
||||
// 15 -> Hardware Time Stamp
|
||||
uint32_t CanChannelsCount; // Anzahl der CAN Schnittstellen, reserviert f<>r
|
||||
// zuk<75>nftige Module mit mehr als einer Schnittstelle
|
||||
uint32_t HwRxFilterCount; // Anzahl der zur Verf<72>gung stehenden Receive-Filter
|
||||
uint32_t HwTxPufferCount; // Anzahl der zur Verf<72>gung stehenden Transmit Puffer mit Timer
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct TCanDevicesList
|
||||
{
|
||||
uint32_t TCanIdx; // Ist das Device ge<67>ffnet ist der Wert auf dem Device-Index
|
||||
// gesetzt, ansonsten ist der Wert auf "INDEX_INVALID" gesetzt.
|
||||
uint32_t HwId; // Ein 32 Bit Schl<68>ssel der die Hardware eindeutig Identifiziert.
|
||||
// Manche Module m<>ssen erst ge<67>ffnet werden damit dieser Wert
|
||||
// gesetzt wird
|
||||
char DeviceName[255]; // Nur Linux: entspricht den Device Namen des USB-Devices,
|
||||
// z.B. /dev/ttyUSB0
|
||||
char SerialNumber[16]; // Seriennummer des Moduls
|
||||
char Description[64]; // Modul Bezeichnung, z.B. "Tiny-CAN IV-XL",
|
||||
// muss in den USB-Controller programmiert sein,
|
||||
// was zur Zeit nur bei den Modulen Tiny-CAN II-XL,
|
||||
// IV-XL u. M1 der Fall ist.
|
||||
struct TModulFeatures ModulFeatures; // Unterst<73>tzte Features des Moduls, nur g<>ltig
|
||||
// wenn HwId > 0
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct TCanDeviceInfo
|
||||
{
|
||||
uint32_t HwId; // Ein 32 Bit Schl<68>ssel der die Hardware eindeutig Identifiziert.
|
||||
uint32_t FirmwareVersion; // Version der Firmware des Tiny-CAN Moduls
|
||||
uint32_t FirmwareInfo; // Informationen zum Stand der Firmware Version
|
||||
// 0 = Unbekannt
|
||||
// 1 = Firmware veraltet, Device kann nicht ge<67>ffnet werden
|
||||
// 2 = Firmware veraltet, Funktionsumfang eingeschr<68>nkt
|
||||
// 3 = Firmware veraltet, keine Einschr<68>nkungen
|
||||
// 4 = Firmware auf Stand
|
||||
// 5 = Firmware neuer als Erwartet
|
||||
char SerialNumber[16]; // Seriennummer des Moduls
|
||||
char Description[64]; // Modul Bezeichnung, z.B. "Tiny-CAN IV-XL"
|
||||
struct TModulFeatures ModulFeatures; // Unterst<73>tzte Features des Moduls
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct TCanInfoVar // <*> ge<67>ndert von TInfoVar in TCanInfoVar
|
||||
{
|
||||
uint32_t Key; // Variablen Schl<68>ssel
|
||||
uint32_t Type; // Variablen Type
|
||||
uint32_t Size; // (Max)Gr<47><72>e der Variable in Byte
|
||||
char Data[255]; // Wert der Variable
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct TCanInfoVarList
|
||||
{
|
||||
uint32_t Size;
|
||||
struct TCanInfoVar *List;
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
typedef struct _TMhsEvent TMhsEvent;
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct _TMhsEvent
|
||||
{
|
||||
volatile uint32_t Events;
|
||||
volatile uint32_t EventsMask;
|
||||
volatile int32_t Waiting;
|
||||
#ifdef __WIN32__
|
||||
// ****** Windows
|
||||
uint32_t WinEventCount;
|
||||
HANDLE WinEvent[3];
|
||||
CRITICAL_SECTION EventLock;
|
||||
#else
|
||||
// ****** Linux
|
||||
pthread_cond_t Cond;
|
||||
pthread_mutex_t Mutex;
|
||||
#endif
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
/***************************************************************/
|
||||
/* Callback Funktionstypen */
|
||||
/***************************************************************/
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanGetDataBlockCB)(uint8_t *tx_data, uint16_t tx_limit, void *user_data);
|
||||
|
||||
#ifdef CAN_API_TRUE_FUNC
|
||||
|
||||
int32_t CanExGetDeviceCount(int32_t flags);
|
||||
int32_t CanExGetDeviceList(struct TCanDevicesList **devices_list, int32_t flags);
|
||||
int32_t CanExGetDeviceListPerform(int32_t flags);
|
||||
int32_t CanExGetDeviceListGet(struct TCanDevicesList *item);
|
||||
|
||||
int32_t CanExGetDeviceInfo(uint32_t index, struct TCanDeviceInfo *device_info,
|
||||
struct TCanInfoVar **hw_info, uint32_t *hw_info_size);
|
||||
int32_t CanExGetDeviceInfoPerform(uint32_t index, struct TCanDeviceInfo *device_info);
|
||||
int32_t CanExGetDeviceInfoGet(struct TCanInfoVar *item);
|
||||
void CanExDataFree(void **data);
|
||||
int32_t CanExCreateDevice(uint32_t *index, char *options);
|
||||
int32_t CanExDestroyDevice(uint32_t *index);
|
||||
int32_t CanExCreateFifo(uint32_t index, uint32_t size, TMhsEvent *event_obj, uint32_t event, uint32_t channels);
|
||||
int32_t CanExBindFifo(uint32_t fifo_index, uint32_t device_index, uint32_t bind);
|
||||
TMhsEvent *CanExCreateEvent(void);
|
||||
int32_t CanExSetObjEvent(uint32_t index, uint32_t source, TMhsEvent *event_obj, uint32_t event);
|
||||
void CanExSetEvent(TMhsEvent *event_obj, uint32_t event);
|
||||
void CanExSetEventAll(uint32_t event);
|
||||
void CanExResetEvent(TMhsEvent *event_obj, uint32_t event);
|
||||
uint32_t CanExWaitForEvent(TMhsEvent *event_obj, uint32_t timeout);
|
||||
int32_t CanExInitDriver(char *options);
|
||||
int32_t CanExSetOptions(uint32_t index, char *options);
|
||||
int32_t CanExSetAsByte(uint32_t index, const char *name, char value);
|
||||
int32_t CanExSetAsWord(uint32_t index, const char *name, int16_t value);
|
||||
int32_t CanExSetAsLong(uint32_t index, const char *name, int32_t value);
|
||||
int32_t CanExSetAsUByte(uint32_t index, const char *name, unsigned char value);
|
||||
int32_t CanExSetAsUWord(uint32_t index, const char *name, uint16_t value);
|
||||
int32_t CanExSetAsULong(uint32_t index, const char *name, uint32_t value);
|
||||
int32_t CanExSetAsString(uint32_t index, const char *name, char *value);
|
||||
int32_t CanExGetAsByte(uint32_t index, const char *name, char *value);
|
||||
int32_t CanExGetAsWord(uint32_t index, const char *name, int16_t *value);
|
||||
int32_t CanExGetAsLong(uint32_t index, const char *name, int32_t *value);
|
||||
int32_t CanExGetAsUByte(uint32_t index, const char *name, unsigned char *value);
|
||||
int32_t CanExGetAsUWord(uint32_t index, const char *name, uint16_t *value);
|
||||
int32_t CanExGetAsULong(uint32_t index, const char *name, uint32_t *value);
|
||||
int32_t CanExGetAsString(uint32_t index, const char *name, char **str);
|
||||
int32_t CanExGetAsStringCopy(uint32_t index, const char *name, char *dest, uint32_t *dest_size);
|
||||
// **** CAN-FD
|
||||
int32_t CanFdTransmit(uint32_t index, struct TCanFdMsg *fd_msg, int32_t count);
|
||||
int32_t CanFdReceive(uint32_t index, struct TCanFdMsg *fd_msg, int32_t count);
|
||||
// *** <*> neu
|
||||
int32_t CanExSetAsData(uint32_t index, const char *name, void *data, uint32_t size);
|
||||
int32_t CanExSetDataPtr(uint32_t index, const char *name, void *data_ptr, uint32_t size);
|
||||
int32_t CanExSetDataBlockCB(uint32_t index, TCanGetDataBlockCB func, void *user_data);
|
||||
|
||||
int32_t CanExGetInfoList(uint32_t dev_idx, const char *name, struct TCanInfoVarList **devices_info, int32_t flags); // <*> neu
|
||||
int32_t CanExGetInfoListPerform(uint32_t dev_idx, const char *name, int32_t flags);
|
||||
int32_t CanExGetInfoListGet(uint32_t list_idx, struct TCanInfoVar *item);
|
||||
|
||||
#endif
|
||||
|
||||
#if !(defined(CAN_API_TRUE_FUNC)) || defined(CAN_DRV_INCLUDE)
|
||||
|
||||
/***************************************************************/
|
||||
/* Funktionstypen */
|
||||
/***************************************************************/
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExGetDeviceCount)(int32_t flags);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExGetDeviceList)(struct TCanDevicesList **devices_list, int32_t flags);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExGetDeviceListPerform)(int32_t flags);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExGetDeviceListGet)(struct TCanDevicesList *item);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExGetDeviceInfo)(uint32_t index, struct TCanDeviceInfo *device_info,
|
||||
struct TCanInfoVar **hw_info, uint32_t *hw_info_size);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExGetDeviceInfoPerform)(uint32_t index, struct TCanDeviceInfo *device_info);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExGetDeviceInfoGet)(struct TCanInfoVar *item);
|
||||
typedef void (DRV_CALLBACK_TYPE *TCanExDataFree)(void **data);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExCreateDevice)(uint32_t *index, char *options);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExDestroyDevice)(uint32_t *index);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExCreateFifo)(uint32_t index, uint32_t size, TMhsEvent *event_obj,
|
||||
uint32_t event, uint32_t channels);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExBindFifo)(uint32_t fifo_index, uint32_t device_index,
|
||||
uint32_t bind);
|
||||
typedef TMhsEvent * (DRV_CALLBACK_TYPE *TCanExCreateEvent)(void);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExSetObjEvent)(uint32_t index, uint32_t source, TMhsEvent *event_obj, uint32_t event);
|
||||
typedef void (DRV_CALLBACK_TYPE *TCanExSetEvent)(TMhsEvent *event_obj, uint32_t event);
|
||||
typedef void (DRV_CALLBACK_TYPE *TCanExSetEventAll)(uint32_t event);
|
||||
typedef void (DRV_CALLBACK_TYPE *TCanExResetEvent)(TMhsEvent *event_obj, uint32_t event);
|
||||
typedef uint32_t (DRV_CALLBACK_TYPE *TCanExWaitForEvent)(TMhsEvent *event_obj, uint32_t timeout);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExInitDriver)(char *options);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExSetOptions)(uint32_t index, const char *options);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExSetAsByte)(uint32_t index, const char *name, char value);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExSetAsWord)(uint32_t index, const char *name, int16_t value);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExSetAsLong)(uint32_t index, const char *name, int32_t value);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExSetAsUByte)(uint32_t index, const char *name, unsigned char value);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExSetAsUWord)(uint32_t index, const char *name, uint16_t value);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExSetAsULong)(uint32_t index, const char *name, uint32_t value);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExSetAsString)(uint32_t index, const char *name, char *value);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExGetAsByte)(uint32_t index, const char *name, char *value);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExGetAsWord)(uint32_t index, const char *name, int16_t *value);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExGetAsLong)(uint32_t index, const char *name, int32_t *value);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExGetAsUByte)(uint32_t index, const char *name, unsigned char *value);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExGetAsUWord)(uint32_t index, const char *name, uint16_t *value);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExGetAsULong)(uint32_t index, const char *name, uint32_t *value);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExGetAsString)(uint32_t index, const char *name, char **str);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExGetAsStringCopy)(uint32_t index, const char *name, char *dest, uint32_t *dest_size);
|
||||
// ****** CAN-FD
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanFdTransmit)(uint32_t index, struct TCanFdMsg *fd_msg, int32_t count);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanFdReceive)(uint32_t index, struct TCanFdMsg *fd_msg, int32_t count);
|
||||
// ***** <*>
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExSetAsData)(uint32_t index, const char *name, void *data, uint32_t size);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExSetDataPtr)(uint32_t index, const char *name, void *data_ptr, uint32_t size);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExSetDataBlockCB)(uint32_t index, TCanGetDataBlockCB func, void *user_data);
|
||||
// ***** <*> neu 2
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExGetInfoList)(uint32_t dev_idx, const char *name, struct TCanInfoVarList **devices_info, int32_t flags); // <*> neu
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExGetInfoListPerform)(uint32_t dev_idx, const char *name, int32_t flags);
|
||||
typedef int32_t (DRV_CALLBACK_TYPE *TCanExGetInfoListGet)(uint32_t list_idx, struct TCanInfoVar *item);
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef CAN_API_TRUE_FUNC
|
||||
/***************************************************************/
|
||||
/* Tiny-CAN API Funktionen */
|
||||
/***************************************************************/
|
||||
extern TCanExGetDeviceCount CanExGetDeviceCount;
|
||||
extern TCanExGetDeviceList CanExGetDeviceList;
|
||||
extern TCanExGetDeviceListPerform CanExGetDeviceListPerform;
|
||||
extern TCanExGetDeviceListGet CanExGetDeviceListGet;
|
||||
extern TCanExGetDeviceInfo CanExGetDeviceInfo;
|
||||
extern TCanExGetDeviceInfoPerform CanExGetDeviceInfoPerform;
|
||||
extern TCanExGetDeviceInfoGet CanExGetDeviceInfoGet;
|
||||
extern TCanExDataFree CanExDataFree;
|
||||
extern TCanExCreateDevice CanExCreateDevice;
|
||||
extern TCanExDestroyDevice CanExDestroyDevice;
|
||||
extern TCanExCreateFifo CanExCreateFifo;
|
||||
extern TCanExBindFifo CanExBindFifo;
|
||||
extern TCanExCreateEvent CanExCreateEvent;
|
||||
extern TCanExSetObjEvent CanExSetObjEvent;
|
||||
extern TCanExSetEvent CanExSetEvent;
|
||||
extern TCanExSetEventAll CanExSetEventAll;
|
||||
extern TCanExResetEvent CanExResetEvent;
|
||||
extern TCanExWaitForEvent CanExWaitForEvent;
|
||||
extern TCanExInitDriver CanExInitDriver;
|
||||
extern TCanExSetOptions CanExSetOptions;
|
||||
extern TCanExSetAsByte CanExSetAsByte;
|
||||
extern TCanExSetAsWord CanExSetAsWord;
|
||||
extern TCanExSetAsLong CanExSetAsLong;
|
||||
extern TCanExSetAsUByte CanExSetAsUByte;
|
||||
extern TCanExSetAsUWord CanExSetAsUWord;
|
||||
extern TCanExSetAsULong CanExSetAsULong;
|
||||
extern TCanExSetAsString CanExSetAsString;
|
||||
extern TCanExGetAsByte CanExGetAsByte;
|
||||
extern TCanExGetAsWord CanExGetAsWord;
|
||||
extern TCanExGetAsLong CanExGetAsLong;
|
||||
extern TCanExGetAsUByte CanExGetAsUByte;
|
||||
extern TCanExGetAsUWord CanExGetAsUWord;
|
||||
extern TCanExGetAsULong CanExGetAsULong;
|
||||
extern TCanExGetAsString CanExGetAsString;
|
||||
extern TCanExGetAsStringCopy CanExGetAsStringCopy;
|
||||
|
||||
// ****** CAN-FD
|
||||
extern TCanFdTransmit CanFdTransmit;
|
||||
extern TCanFdReceive CanFdReceive;
|
||||
// **** <*> neu
|
||||
extern TCanExSetAsData CanExSetAsData;
|
||||
extern TCanExSetDataPtr CanExSetDataPtr;
|
||||
extern TCanExSetDataBlockCB CanExSetDataBlockCB;
|
||||
|
||||
extern TCanExGetInfoList CanExGetInfoList;
|
||||
extern TCanExGetInfoListPerform CanExGetInfoListPerform;
|
||||
extern TCanExGetInfoListGet CanExGetInfoListGet;
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
17
can_api/can_drv_linux.c
Normal file
17
can_api/can_drv_linux.c
Normal file
@@ -0,0 +1,17 @@
|
||||
/*******************************************************************************/
|
||||
/* Interface zur Tiny-CAN API */
|
||||
/* --------------------------------------------------------------------------- */
|
||||
/* Beschreibung : Laden einer Treiber Lib */
|
||||
/* */
|
||||
/* Version : 2.10 */
|
||||
/* Datei Name : can_drv_win.c */
|
||||
/* --------------------------------------------------------------------------- */
|
||||
/* Datum : 18.09.15 */
|
||||
/* Copyright : (C) 2011 - 2015 by MHS-Elektronik GmbH & Co. KG, Germany */
|
||||
/* www.mhs-elektronik.de */
|
||||
/* Autor : Demlehner Klaus, info@mhs-elektronik.de */
|
||||
/*******************************************************************************/
|
||||
#include "mhs_can_drv.c"
|
||||
|
||||
|
||||
|
||||
17
can_api/can_drv_win.c
Normal file
17
can_api/can_drv_win.c
Normal file
@@ -0,0 +1,17 @@
|
||||
/*******************************************************************************/
|
||||
/* Interface zur Tiny-CAN API */
|
||||
/* --------------------------------------------------------------------------- */
|
||||
/* Beschreibung : Laden einer Treiber DLL */
|
||||
/* */
|
||||
/* Version : 2.10 */
|
||||
/* Datei Name : can_drv_win.c */
|
||||
/* --------------------------------------------------------------------------- */
|
||||
/* Datum : 18.09.15 */
|
||||
/* Copyright : (C) 2011 - 2015 by MHS-Elektronik GmbH & Co. KG, Germany */
|
||||
/* www.mhs-elektronik.de */
|
||||
/* Autor : Demlehner Klaus, info@mhs-elektronik.de */
|
||||
/*******************************************************************************/
|
||||
#include "mhs_can_drv.c"
|
||||
|
||||
|
||||
|
||||
385
can_api/can_types.h
Normal file
385
can_api/can_types.h
Normal file
@@ -0,0 +1,385 @@
|
||||
#ifndef __CAN_TYPES_H__
|
||||
#define __CAN_TYPES_H__
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
#ifndef __WIN32__
|
||||
#define __WIN32__
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __WIN32__
|
||||
// Windows
|
||||
#if !defined(WINVER)
|
||||
#define WINVER 0x0500
|
||||
#endif
|
||||
#if !defined(_WIN32_IE)
|
||||
#define _WIN32_IE 0x0501
|
||||
#endif
|
||||
|
||||
#include <windows.h>
|
||||
#if defined(__GNUC__) || (defined(_MSC_VER) && _MSC_VER >= 1900)
|
||||
#include <stdint.h>
|
||||
#else
|
||||
typedef __int32 int32_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef __int16 int16_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef __int8 int8_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
#endif
|
||||
#else
|
||||
// Linux & Mac
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
|
||||
#ifndef M_FORCE_INLINE
|
||||
#define M_FORCE_INLINE static __inline__ __attribute__((__always_inline__,__gnu_inline__))
|
||||
//inline __attribute__((always_inline)) <*>
|
||||
#endif
|
||||
#else
|
||||
#ifndef M_FORCE_INLINE
|
||||
#define M_FORCE_INLINE static __forceinline
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define INDEX_INVALID 0xFFFFFFFF
|
||||
|
||||
#define INDEX_FIFO_PUFFER_MASK 0x0000FFFF
|
||||
#define INDEX_SOFT_FLAG 0x02000000
|
||||
// #define INDEX_RXD_TXT_FLAG 0x01000000 <*>
|
||||
#define INDEX_TXT_FLAG 0x01000000
|
||||
#define INDEX_CAN_KANAL_MASK 0x000F0000
|
||||
#define INDEX_CAN_DEVICE_MASK 0x00F00000
|
||||
|
||||
#define INDEX_FIFO_VIRTUAL 0x80000000
|
||||
#define INDEX_USER_MASK 0xFC000000
|
||||
|
||||
#define INDEX_CAN_KANAL_A 0x00000000
|
||||
#define INDEX_CAN_KANAL_B 0x00010000
|
||||
|
||||
/***************************************************************/
|
||||
/* Typen */
|
||||
/***************************************************************/
|
||||
|
||||
/******************************************/
|
||||
/* CAN Message Type */
|
||||
/******************************************/
|
||||
#define MsgFlags Flags.Long
|
||||
#define MsgLen Flags.Flag.Len
|
||||
#define MsgRTR Flags.Flag.RTR
|
||||
#define MsgEFF Flags.Flag.EFF
|
||||
#define MsgTxD Flags.Flag.TxD
|
||||
#define MsgErr Flags.Flag.Error
|
||||
#define MsgSource Flags.Flag.Source
|
||||
#define MsgFilHit Flags.Flag.FilHit
|
||||
#define MsgOV Flags.Flag.OV
|
||||
#define MsgData Data.Bytes
|
||||
|
||||
/*
|
||||
Byte
|
||||
|
||||
0 -> LEC Last Error Code
|
||||
1 = Stuff Error More than 5 equal bits in a sequence have occurred in a part of a
|
||||
received message where this is not allowed.
|
||||
2 = Form Error A fixed format part of a received frame has the wrong format.
|
||||
3 = AckError The message this CAN Core transmitted was not acknowledged by another node.
|
||||
4 = Bit1Error During the transmission of a message (with the exception of the
|
||||
arbitration field), the device wanted to send a recessive level (bit of logical
|
||||
value '1'), but the monitored busvalue was dominant.
|
||||
5 = Bit0Error During the transmission of a message (or acknowledge bit or active error
|
||||
flag, or overload flag), the device wanted to send a dominant level (data or
|
||||
identifier bit logical value '0'), but the monitored Bus value was recessive.
|
||||
During busoff recovery this status is set each time a sequence of 11 recessive bits
|
||||
has been monitored. This enables the CPU to monitor the proceeding of the busoff
|
||||
recovery sequence (indicating the bus is not stuck at dominant level or continuously
|
||||
disturbed).
|
||||
6 = CRCError The CRC check sum was incorrect in the message received, the CRC received
|
||||
for an incoming message does not match with the calculated CRC for the received data.
|
||||
1 -> Bus Status (Bit 0 - 3)
|
||||
0 = Ok
|
||||
1 = Error Warning
|
||||
2 = Error Passiv
|
||||
3 = Bus Off
|
||||
Bus-Failure -> Bit4
|
||||
2 -> Receive Error Counter
|
||||
3 -> Transmit Error Counter
|
||||
|
||||
<*> Neu
|
||||
OV -> FIFO Overflow Frame
|
||||
|
||||
Byte 0
|
||||
0 -> Source
|
||||
1 = CAN Controller
|
||||
2 = CAN Hardware
|
||||
3 = API
|
||||
1,2 -> Messages Lost <*> muss noch implementiert werden
|
||||
|
||||
*/
|
||||
|
||||
struct TCanFlagsBits
|
||||
{
|
||||
unsigned Len:4; // DLC -> Datenl<6E>nge 0 - 8 Byte
|
||||
unsigned TxD:1; // TxD -> 1 = Tx CAN Nachricht, 0 = Rx CAN Nachricht
|
||||
// Eine Erfolgreich versendete Nachricht wird als Best<73>tigung
|
||||
// ins Empfangsfifo zur<75>ckgeschrieben
|
||||
// Nicht alle Module unterst<73>tzen diese Funktion u. das
|
||||
// Feature muss aktiveirt sein
|
||||
unsigned Error:1; // Error -> 1 = CAN Bus Fehler Nachricht
|
||||
// Nicht alle Module unterst<73>tzen diese Funktion u. das
|
||||
// Feature muss aktiveirt sein
|
||||
unsigned RTR:1; // Remote Transmition Request bit -> Kennzeichnet eine RTR Nachricht
|
||||
unsigned EFF:1; // Extended Frame Format bit -> 1 = 29 Bit Id's, 0 = 11 Bit Id's
|
||||
unsigned Source:8; // Quelle der Nachricht (Device)
|
||||
// Neu
|
||||
unsigned FilHit:1; // FilHit -> 1 = Filter Hit
|
||||
unsigned OV:1; // <*> Neu FIFO Overflow
|
||||
unsigned Res1:1;
|
||||
unsigned Res3:1;
|
||||
unsigned Res4:4;
|
||||
unsigned Res5:8;
|
||||
};
|
||||
|
||||
#pragma pack(push, 1)
|
||||
union TCanFlags
|
||||
{
|
||||
struct TCanFlagsBits Flag;
|
||||
uint32_t Long;
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
#pragma pack(push, 1)
|
||||
union TCanData
|
||||
{
|
||||
char Chars[8];
|
||||
unsigned char Bytes[8];
|
||||
uint16_t Words[4];
|
||||
uint32_t Longs[2];
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct TTime
|
||||
{
|
||||
uint32_t Sec;
|
||||
uint32_t USec;
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct TCanMsg
|
||||
{
|
||||
uint32_t Id;
|
||||
union TCanFlags Flags;
|
||||
union TCanData Data;
|
||||
struct TTime Time;
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
||||
/******************************************/
|
||||
/* CAN FD */
|
||||
/******************************************/
|
||||
#define MsgFD Flags.Flag.FD // FD Format
|
||||
#define MsgBRS Flags.Flag.BRS // Bit Rate Switch
|
||||
|
||||
struct TCanFdFlagsBits
|
||||
{
|
||||
unsigned Source:8; // Quelle der Nachricht (Device)
|
||||
unsigned Len:8; // DLC -> Datenl<6E>nge 0 - 8 Byte
|
||||
|
||||
unsigned TxD:1; // TxD -> 1 = Tx CAN Nachricht, 0 = Rx CAN Nachricht
|
||||
// Eine Erfolgreich versendete Nachricht wird als Best<73>tigung
|
||||
// ins Empfangsfifo zur<75>ckgeschrieben
|
||||
// Nicht alle Module unterst<73>tzen diese Funktion u. das
|
||||
// Feature muss aktiveirt sein
|
||||
unsigned Error:1; // Error -> 1 = CAN Bus Fehler Nachricht
|
||||
// Nicht alle Module unterst<73>tzen diese Funktion u. das
|
||||
// Feature muss aktiveirt sein
|
||||
unsigned RTR:1; // Remote Transmition Request bit -> Kennzeichnet eine RTR Nachricht
|
||||
unsigned EFF:1; // Extended Frame Format bit -> 1 = 29 Bit Id's, 0 = 11 Bit Id's
|
||||
unsigned FD:1; // CAN-FD Frame
|
||||
unsigned BRS:1; // Bit Rate Switch
|
||||
unsigned Res0:1;
|
||||
unsigned OV:1; // <*> Neu FIFO Overflow
|
||||
|
||||
unsigned Res2:1;
|
||||
unsigned Res3:1;
|
||||
unsigned Res4:1;
|
||||
unsigned Res5:1;
|
||||
unsigned Res6:1;
|
||||
unsigned Res7:1;
|
||||
unsigned Res8:1;
|
||||
unsigned FilHit:1; // FilHit -> 1 = Filter Hit
|
||||
};
|
||||
|
||||
#pragma pack(push, 1)
|
||||
union TCanFdFlags
|
||||
{
|
||||
struct TCanFdFlagsBits Flag;
|
||||
uint32_t Long;
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
#pragma pack(push, 1)
|
||||
union TCanFdData
|
||||
{
|
||||
char Chars[64];
|
||||
unsigned char Bytes[64];
|
||||
uint16_t Words[32];
|
||||
uint32_t Longs[16];
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct TCanFdMsg
|
||||
{
|
||||
uint32_t Id;
|
||||
union TCanFdFlags Flags;
|
||||
union TCanFdData Data;
|
||||
struct TTime Time;
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
||||
/******************************************/
|
||||
/* CAN Message Filter Type */
|
||||
/******************************************/
|
||||
#define FilFlags Flags.Long
|
||||
#define FilRTR Flags.Flag.RTR
|
||||
#define FilEFF Flags.Flag.EFF
|
||||
#define FilMode Flags.Flag.Mode
|
||||
#define FilIdMode Flags.Flag.IdMode
|
||||
#define FilEnable Flags.Flag.Enable
|
||||
|
||||
// * = Reserviert, zur Zeit noch unbenutzt
|
||||
|
||||
struct TMsgFilterFlagsBits
|
||||
{
|
||||
// 1. Byte
|
||||
unsigned Len:4; // * Dlc
|
||||
unsigned Res:2; // Reserviert
|
||||
unsigned RTR:1; // Remote Transmition Request
|
||||
unsigned EFF:1; // Extended Frame Format
|
||||
// 2. Byte
|
||||
unsigned IdMode:2; // 0 = Maske & Code
|
||||
// 1 = Start & Stop
|
||||
// 2 = Single Id
|
||||
unsigned DLCCheck:1; // *
|
||||
unsigned DataCheck:1; // *
|
||||
unsigned Res1:4;
|
||||
// 3. Byte
|
||||
unsigned Res2:8;
|
||||
// 4. Byte
|
||||
unsigned Type:4; // 0 = Single Puffer
|
||||
unsigned Res3:2;
|
||||
unsigned Mode:1; // 0 = Message entfernen
|
||||
// 1 = Message nicht entfernen
|
||||
unsigned Enable:1; // 0 = Filter sperren
|
||||
// 1 = Filter freigeben
|
||||
};
|
||||
|
||||
|
||||
#pragma pack(push, 1)
|
||||
union TMsgFilterFlags
|
||||
{
|
||||
struct TMsgFilterFlagsBits Flag;
|
||||
uint32_t Long;
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct TMsgFilter
|
||||
{ // IdMode -> Maske & Code | Start & Stop | Single Id
|
||||
// --------------------------+--------------+-----------
|
||||
uint32_t Maske; // Filter-Id -> Maske | Stop |
|
||||
uint32_t Code; // Filter-Id -> Code | Start | Id
|
||||
union TMsgFilterFlags Flags;
|
||||
union TCanData Data; // *
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
struct TCanIndexSource
|
||||
{
|
||||
// 1. u. 2 Byte
|
||||
unsigned SubIndex:16;
|
||||
// 3. Byte
|
||||
unsigned Source:8;
|
||||
// 4. Byte
|
||||
unsigned TxD:1;
|
||||
unsigned Soft:1;
|
||||
unsigned User:5;
|
||||
unsigned Virtual:1;
|
||||
};
|
||||
|
||||
struct TCanIndexBits
|
||||
{
|
||||
// 1. u. 2 Byte
|
||||
unsigned SubIndex:16;
|
||||
// 3. Byte
|
||||
unsigned Channel:4;
|
||||
unsigned Device:4;
|
||||
// 4. Byte
|
||||
unsigned TxD:1;
|
||||
unsigned Soft:1;
|
||||
unsigned User:5;
|
||||
unsigned Virtual:1;
|
||||
};
|
||||
|
||||
union TCanIndex
|
||||
{
|
||||
struct TCanIndexBits Item;
|
||||
struct TCanIndexSource SrcItem;
|
||||
uint32_t Long;
|
||||
};
|
||||
|
||||
|
||||
|
||||
M_FORCE_INLINE void CanFdToCan(struct TCanMsg *dst, const struct TCanFdMsg *src)
|
||||
{
|
||||
uint8_t len;
|
||||
|
||||
dst->Id = src->Id;
|
||||
len = src->MsgLen;
|
||||
dst->MsgFlags = (src->MsgFlags >> 12) & 0x000000F0;
|
||||
if (len > 8)
|
||||
len = 8;
|
||||
dst->MsgLen = len;
|
||||
dst->MsgSource = src->MsgSource;
|
||||
dst->MsgFilHit = src->MsgFilHit;
|
||||
dst->Data.Longs[0] = src->Data.Longs[0];
|
||||
dst->Data.Longs[1] = src->Data.Longs[1];
|
||||
dst->Time.Sec = src->Time.Sec;
|
||||
dst->Time.USec = src->Time.USec;
|
||||
}
|
||||
|
||||
|
||||
M_FORCE_INLINE void CanToCanFd(struct TCanFdMsg *dst, const struct TCanMsg *src)
|
||||
{
|
||||
dst->Id = src->Id;
|
||||
dst->MsgFlags = (src->MsgFlags << 12) & 0x000F0000;
|
||||
dst->MsgLen = src->MsgLen;
|
||||
dst->MsgSource = src->MsgSource;
|
||||
dst->MsgFilHit = src->MsgFilHit;
|
||||
dst->Data.Longs[0] = src->Data.Longs[0];
|
||||
dst->Data.Longs[1] = src->Data.Longs[1];
|
||||
dst->Time.Sec = src->Time.Sec;
|
||||
dst->Time.USec = src->Time.USec;
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
BIN
can_api/mhspassthru.dll
Normal file
BIN
can_api/mhspassthru.dll
Normal file
Binary file not shown.
BIN
can_api/mhstcan.dll
Normal file
BIN
can_api/mhstcan.dll
Normal file
Binary file not shown.
BIN
can_api/mhstcan.lib
Normal file
BIN
can_api/mhstcan.lib
Normal file
Binary file not shown.
BIN
can_api/x64/mhstcan.dll
Normal file
BIN
can_api/x64/mhstcan.dll
Normal file
Binary file not shown.
BIN
can_api/x64/mhstcan.lib
Normal file
BIN
can_api/x64/mhstcan.lib
Normal file
Binary file not shown.
15
data/bikeinfo.xml
Normal file
15
data/bikeinfo.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Bike name="franken-wheeler">
|
||||
<Console>
|
||||
<Value ID="" Default="" Current="" Min="" Max="" UnitType="mm"/>
|
||||
<Value ID="" Default="" Current="" Min="" Max="" UnitType="mm"/>
|
||||
<Value ID="" Default="" Current="" Min="" Max="" UnitType="mm"/>
|
||||
<Value ID="" Default="" Current="" Min="" Max="" UnitType="mm"/>
|
||||
</Console>
|
||||
<Battery>
|
||||
</Battery>
|
||||
<Motor>
|
||||
</Motor>
|
||||
<Sensor>
|
||||
</Sensor>
|
||||
</Bike>
|
||||
95
data/demo.txt
Normal file
95
data/demo.txt
Normal file
@@ -0,0 +1,95 @@
|
||||
C:\syncMePlease\projects.now\all.about.bionx\all.can\bigxionflasher>BigXionFlasher.exe -s
|
||||
BigXionFlasher USB V 0.2.4 rev. 97
|
||||
(c) 2011-2013 by Thomas Koenig <info@bigxionflasher.org> - www.bigxionflasher.org
|
||||
|
||||
console already in salve mode. good!
|
||||
|
||||
|
||||
|
||||
Console information:
|
||||
hardware version ........: 15
|
||||
software version ........: 66
|
||||
assistance level ........: 0
|
||||
part number .............: 03205
|
||||
item number .............: 00745
|
||||
|
||||
max limit enabled .......: yes
|
||||
speed limit .............: 44.00 Km/h
|
||||
|
||||
min limit enabled .......: yes
|
||||
min speed limit .........: 0.50 Km/h
|
||||
|
||||
throttle limit enabled ..: yes
|
||||
throttle speed limit ....: 20.00 Km/h
|
||||
|
||||
wheel circumference .....: 2199 mm
|
||||
|
||||
mountain cap ............: 54.69%
|
||||
odo .....................: 803.60 Km
|
||||
|
||||
Battery information:
|
||||
hardware version ........: 62
|
||||
software version ........: 112
|
||||
part number .............: 05521
|
||||
item number .............: 00011
|
||||
voltage .................: 53.10V
|
||||
battery level ...........: 100.00%
|
||||
maximum voltage .........: 97.85%
|
||||
minimum voltage .........: 87.85%
|
||||
mean voltage ............: 97.85%
|
||||
resets ..................: 0
|
||||
ggjrCalib ...............: 0
|
||||
vctrlShorts .............: 0
|
||||
lmd .....................: 6.80Ah
|
||||
cell capacity ...........: 2.15Ah
|
||||
|
||||
charge time worst .......: 488
|
||||
charge time mean ........: 9
|
||||
charge cycles ...........: 76
|
||||
full charge cycles ......: 6
|
||||
power cycles ............: 257
|
||||
battery temp max ........: 73
|
||||
battery temp min ........: 239
|
||||
|
||||
charge level @ 010% : 0014
|
||||
charge level @ 020% : 0013
|
||||
charge level @ 030% : 0015
|
||||
charge level @ 040% : 0007
|
||||
charge level @ 050% : 0007
|
||||
charge level @ 060% : 0006
|
||||
charge level @ 070% : 0002
|
||||
charge level @ 080% : 0004
|
||||
charge level @ 090% : 0008
|
||||
charge level @ 100% : 0008
|
||||
total # of charges .: 0084
|
||||
|
||||
balancer enabled ...: yes
|
||||
|
||||
voltage cell #01 ...: 4.044V
|
||||
voltage cell #02 ...: 4.061V
|
||||
voltage cell #03 ...: 4.058V
|
||||
voltage cell #04 ...: 4.059V
|
||||
voltage cell #05 ...: 4.071V
|
||||
voltage cell #06 ...: 4.088V
|
||||
voltage cell #07 ...: 4.073V
|
||||
voltage cell #08 ...: 4.078V
|
||||
voltage cell #09 ...: 4.095V
|
||||
voltage cell #10 ...: 4.131V
|
||||
voltage cell #11 ...: 4.097V
|
||||
voltage cell #12 ...: 4.122V
|
||||
voltage cell #13 ...: 4.127V
|
||||
temperature pack #01: 24oC
|
||||
temperature pack #02: 24oC
|
||||
temperature pack #03: 24oC
|
||||
temperature pack #04: 24oC
|
||||
temperature pack #05: 14oC
|
||||
|
||||
Motor information:
|
||||
hardware version ........: 32
|
||||
software version ........: 102
|
||||
temperature .............: 35oC
|
||||
speed limit .............: 44 Km/h
|
||||
wheel circumference .....: 2199 mm
|
||||
|
||||
part number .............: 02283
|
||||
item number .............: 00030
|
||||
60
main.cpp
Normal file
60
main.cpp
Normal file
@@ -0,0 +1,60 @@
|
||||
/***************************************************************************
|
||||
|
||||
BionxControl
|
||||
Copyright © 2025 christoph holzheuer
|
||||
christoph.holzheuer@gmail.com
|
||||
|
||||
Using:
|
||||
|
||||
BigXionFlasher USB V 0.2.4 rev. 97
|
||||
© 2011-2013 by Thomas Koenig <info@bigxionflasher.org>
|
||||
@see www.bigxionflasher.org
|
||||
|
||||
Bionx Bike Info
|
||||
© 2018 Thorsten Schmidt (tschmidt@ts-soft.de)
|
||||
@see www.ts-soft.de
|
||||
|
||||
mhs_can_drv.c 3.00
|
||||
© 2011 - 2015 by MHS-Elektronik GmbH & Co. KG, Germany
|
||||
Demlehner Klaus, info@mhs-elektronik.de
|
||||
@see www.mhs-elektronik.de
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
@see https://github.com/bikemike/bionx-bikeinfo
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include <bcmainwindow.h>
|
||||
#include <bc.h>
|
||||
#include <QApplication>
|
||||
|
||||
|
||||
// main.cpp
|
||||
#include <QCoreApplication>
|
||||
#include <QTimer>
|
||||
#include <QDebug>
|
||||
|
||||
#include <QThread>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
auto x = BC::ID::Motor_Status_Main;
|
||||
|
||||
enum class Color : uint8_t { Red, Green, Blue };
|
||||
|
||||
QMap<Color, QString> map;
|
||||
map.insert(Color::Red, QStringLiteral("rot"));
|
||||
map[Color::Green] = QStringLiteral("grün");
|
||||
|
||||
|
||||
qDebug() << " --- sach bloss das geht: " << x << " ui: " << uint8_t(x) << " : " << map[Color::Red];
|
||||
|
||||
QApplication a(argc, argv);
|
||||
//BCMainWindow w;
|
||||
//w.show();
|
||||
return a.exec();
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user