From 68cf7d277d0dca0a680bbba305b5cfe8dffd6365 Mon Sep 17 00:00:00 2001 From: alejandrogonzalvo Date: Thu, 20 Apr 2023 12:53:37 +0200 Subject: [PATCH 1/5] update .vscode config --- .gitignore | 2 -- .vscode/c_cpp_properties.json | 18 ++++++++++++++++++ .vscode/settings.json | 21 +++++++++++++++++++++ 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 .vscode/c_cpp_properties.json create mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore index 6625d7c2..c0fb2776 100644 --- a/.gitignore +++ b/.gitignore @@ -12,8 +12,6 @@ PRUEBAS/ .ccls-cache/ .cache/ -#vscode -.vscode .cproject .cache diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 00000000..ccf54aba --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,18 @@ +{ + "configurations": [ + { + "name": "Linux", + "includePath": [ + "${workspaceFolder}/**" + ], + "defines": [], + "compilerPath": "/usr/bin/gcc", + "cStandard": "c17", + "cppStandard": "c++20", + "intelliSenseMode": "linux-gcc-x64", + "configurationProvider": "ms-vscode.cmake-tools", + "compileCommands": "compile_commands.json" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..da03cd5a --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,21 @@ +{ + "files.exclude": { + "**/.cache": true, + "**/.cproject": true, + "**/.gitignore": true, + "**/.mxproject": true, + "**/.project": true, + "**/.settings": true, + "**/arm-none-eabi.cmake": true, + "**/build": true, + "**/cmake_install.cmake": true, + "**/CMakeFiles": true, + "**/CMakeLists.txt": true, + "**/compile_commands.json": true, + "**/Debug": true, + "**/libst-lib.a": true, + "**/Makefile": true + }, + "C_Cpp.default.cppStandard": "c++20", + "C_Cpp.default.cStandard": "c17" +} \ No newline at end of file From 7e148b1c7fe98b75ad025754aa6bd54635de1cfd Mon Sep 17 00:00:00 2001 From: alejandrogonzalvo Date: Thu, 20 Apr 2023 12:54:04 +0200 Subject: [PATCH 2/5] readd .vscode to .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index c0fb2776..6625d7c2 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,8 @@ PRUEBAS/ .ccls-cache/ .cache/ +#vscode +.vscode .cproject .cache From aee1de6ef8b4ec2552286f96606eae24e8098dbc Mon Sep 17 00:00:00 2001 From: alejandrogonzalvo Date: Fri, 28 Apr 2023 12:32:57 +0200 Subject: [PATCH 3/5] add get phase function for halfbridge --- Inc/ST-LIB_LOW/HalfBridge/HalfBridge.hpp | 1 + Src/ST-LIB_LOW/HalfBridge/HalfBridge.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/Inc/ST-LIB_LOW/HalfBridge/HalfBridge.hpp b/Inc/ST-LIB_LOW/HalfBridge/HalfBridge.hpp index 72edef87..e408e54d 100644 --- a/Inc/ST-LIB_LOW/HalfBridge/HalfBridge.hpp +++ b/Inc/ST-LIB_LOW/HalfBridge/HalfBridge.hpp @@ -24,6 +24,7 @@ class HalfBridge { void set_duty_cycle(float duty_cycle); void set_frequency(int32_t frequency); void set_phase(float phase); + float get_phase(); private: bool is_dual; diff --git a/Src/ST-LIB_LOW/HalfBridge/HalfBridge.cpp b/Src/ST-LIB_LOW/HalfBridge/HalfBridge.cpp index 9164c9e9..46c967e1 100644 --- a/Src/ST-LIB_LOW/HalfBridge/HalfBridge.cpp +++ b/Src/ST-LIB_LOW/HalfBridge/HalfBridge.cpp @@ -45,3 +45,7 @@ void HalfBridge::set_phase(float phase) { positive_pwm.set_phase(phase); negative_pwm.set_phase(-phase); } + +float HalfBridge::get_phase() { + return positive_pwm.phase; +} \ No newline at end of file From b6ed368b50b40725bf7bd265a8f9bc3f2976d415 Mon Sep 17 00:00:00 2001 From: alejandrogonzalvo Date: Fri, 28 Apr 2023 13:20:54 +0200 Subject: [PATCH 4/5] fix .cproject --- .cproject | 48 ++++++------------------ Src/HALAL/Models/HALconfig/Halconfig.cpp | 1 - 2 files changed, 12 insertions(+), 37 deletions(-) diff --git a/.cproject b/.cproject index bff09a61..29e995c6 100644 --- a/.cproject +++ b/.cproject @@ -35,6 +35,7 @@ -