Skip to content

Commit bd6fc32

Browse files
committed
Merge remote-tracking branch 'origin/development' into feat/MDMA2
2 parents cc7b102 + bd05e1b commit bd6fc32

43 files changed

Lines changed: 3104 additions & 931 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ RUN apt-get update && apt-get -y install git git-lfs python3-colorama cmake g++
77
git lfs install
88

99
# Install cubeclt
10-
RUN mkdir /temp && cd /temp && git clone https://github.com/HyperloopUPV-H8/cubeclt.git && \
10+
RUN mkdir /temp && cd /temp && git clone https://github.com/Hyperloop-UPV/cubeclt.git && \
1111
cd cubeclt && git lfs pull && chmod +x cubeclt_1.16.0_installer.sh && \
1212
echo | LICENSE_ALREADY_ACCEPTED=1 ./cubeclt_1.16.0_installer.sh

.vscode/settings.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"C_Cpp.clang_format_sortIncludes": true,
88
"C_Cpp.intelliSenseCacheSize": 0,
99
"files.associations": {
10+
<<<<<<< HEAD
1011
"any": "cpp",
1112
"array": "cpp",
1213
"atomic": "cpp",
@@ -95,5 +96,12 @@
9596
"typeinfo": "cpp",
9697
"valarray": "cpp",
9798
"variant": "cpp"
99+
=======
100+
"*.embeddedhtml": "html",
101+
"mem.h": "c",
102+
"tinydir.h": "c",
103+
"dirent.h": "c",
104+
"initializer_list": "cpp"
105+
>>>>>>> origin/development
98106
}
99-
}
107+
}

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ add_library(${STLIB_LIBRARY} STATIC
245245
$<$<BOOL:${CMAKE_CROSSCOMPILING}>:${CMAKE_CURRENT_LIST_DIR}/Src/ST-LIB.cpp>
246246

247247
$<$<NOT:$<BOOL:${CMAKE_CROSSCOMPILING}>>:${CMAKE_CURRENT_LIST_DIR}/Src/HALAL/Services/Time/Scheduler.cpp>
248+
$<$<NOT:$<BOOL:${CMAKE_CROSSCOMPILING}>>:${CMAKE_CURRENT_LIST_DIR}/Src/HALAL/Models/TimerDomain/TimerDomain.cpp>
248249
$<$<NOT:$<BOOL:${CMAKE_CROSSCOMPILING}>>:${CMAKE_CURRENT_LIST_DIR}/Src/MockedDrivers/mocked_ll_tim.cpp>
249250
$<$<NOT:$<BOOL:${CMAKE_CROSSCOMPILING}>>:${CMAKE_CURRENT_LIST_DIR}/Src/MockedDrivers/mocked_system_stm32h7xx.c>
250251
$<$<NOT:$<BOOL:${CMAKE_CROSSCOMPILING}>>:${CMAKE_CURRENT_LIST_DIR}/Src/MockedDrivers/stm32h723xx_wrapper.c>

Inc/C++Utilities/StaticVector.hpp

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#pragma once
2+
#include <array>
3+
#include "ErrorHandler/ErrorHandler.hpp"
4+
5+
template <typename T, size_t Capacity>
6+
class StaticVector {
7+
private:
8+
std::array<T, Capacity> data{};
9+
size_t size_ = 0;
10+
11+
public:
12+
constexpr StaticVector() = default;
13+
14+
template<typename... Args>
15+
constexpr StaticVector(Args&&... args) : data{std::forward<Args>(args)...}, size_(sizeof...(args)) {}
16+
17+
constexpr bool operator==(const StaticVector&) const = default;
18+
19+
constexpr void push_back(const T& value)
20+
{
21+
if (size_ >= Capacity)
22+
{
23+
ErrorHandler("StaticVector capacity exceeded");
24+
return;
25+
}
26+
data[size_] = value;
27+
size_++;
28+
}
29+
30+
constexpr auto begin() { return data.begin(); }
31+
constexpr auto begin() const { return data.begin(); }
32+
constexpr auto end() { return data.begin() + size_; }
33+
constexpr auto end() const { return data.begin() + size_; }
34+
35+
constexpr const std::array<T, Capacity>& get_array() const { return data; }
36+
constexpr size_t size() const { return size_; }
37+
constexpr T* get_data() { return data.data(); }
38+
constexpr const T* get_data() const { return data.data(); }
39+
constexpr T& operator[](size_t i) { return data[i]; }
40+
constexpr const T& operator[](size_t i) const { return data[i]; }
41+
constexpr bool contains(const T& value) const
42+
{
43+
for (size_t i = 0; i < size_; ++i)
44+
{
45+
if (data[i] == value)
46+
{
47+
return true;
48+
}
49+
}
50+
return false;
51+
}
52+
};
53+

Inc/HALAL/HALAL.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include "HALAL/Services/PWM/PhasedPWM/PhasedPWM.hpp"
2121
#include "HALAL/Services/PWM/DualPhasedPWM/DualPhasedPWM.hpp"
2222

23-
#include "HALAL/Services/Time/Time.hpp"
23+
#include "HALAL/Services/Time/TimerWrapper.hpp"
2424
#include "HALAL/Services/Time/Scheduler.hpp"
2525
#include "HALAL/Services/Time/RTC.hpp"
2626

@@ -37,11 +37,10 @@
3737
#include "HALAL/Services/FMAC/FMAC.hpp"
3838

3939
#include "HALAL/Models/MPUManager/MPUManager.hpp"
40+
#include "HALAL/Models/MPU.hpp"
4041
#include "HALAL/Services/InfoWarning/InfoWarning.hpp"
4142
#include "HALAL/Services/Watchdog/Watchdog.hpp"
4243

43-
#include "HALAL/Models/TimerPeripheral/TimerPeripheral.hpp"
44-
4544
#include "HALAL/Models/BoardID/BoardID.hpp"
4645
#include "HALAL/Models/Concepts/Concepts.hpp"
4746
#include "HALAL/Models/MDMA/MDMA.hpp"

0 commit comments

Comments
 (0)