From e21f21b281b0517447237134562f606528c2e55c Mon Sep 17 00:00:00 2001 From: FoniksFox Date: Sat, 9 May 2026 00:58:27 +0200 Subject: [PATCH 1/3] fix(PWM): Reorder members to make it compile --- Inc/HALAL/Services/PWM/PWM.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Inc/HALAL/Services/PWM/PWM.hpp b/Inc/HALAL/Services/PWM/PWM.hpp index ca38b3aa8..7a5442b81 100644 --- a/Inc/HALAL/Services/PWM/PWM.hpp +++ b/Inc/HALAL/Services/PWM/PWM.hpp @@ -18,13 +18,13 @@ template class PWM { friend TimerWrapper; TimerWrapper* timer; - uint32_t* frequency; + uint32_t polarity; + uint32_t negated_polarity; float* duty_cycle = nullptr; + uint32_t* frequency; bool is_on = false; bool is_initialized = false; - uint32_t polarity; - uint32_t negated_polarity; - + /* This constructor is private for a reason. Use TimerWrapper::get_pwm */ PWM(TimerWrapper* tim, uint32_t polarity, From 5a76e930c8626d994f010be868ee2ac4f5582546 Mon Sep 17 00:00:00 2001 From: FoniksFox Date: Sat, 9 May 2026 00:59:43 +0200 Subject: [PATCH 2/3] chore: Add changeset --- .changesets/fix-pwm.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .changesets/fix-pwm.md diff --git a/.changesets/fix-pwm.md b/.changesets/fix-pwm.md new file mode 100644 index 000000000..0a6f1f031 --- /dev/null +++ b/.changesets/fix-pwm.md @@ -0,0 +1,2 @@ +release: patch +summary: Fix reorder issue in PWM constructor From 8de139c9f2c9c7aa734dc113a4068def334d3e25 Mon Sep 17 00:00:00 2001 From: FoniksFox Date: Sat, 9 May 2026 01:00:22 +0200 Subject: [PATCH 3/3] style: just style --- CHANGELOG.md | 10 +++++----- Inc/HALAL/Services/PWM/PWM.hpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f37bf6b3..adea158ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,18 +12,18 @@ Historical releases that predate this file remain available in Git tags such as - Redesign fault handling, protections, and Board bootstrap around explicit fault policies This PR changes the public integration contract for applications built on ST-LIB. - + Breaking changes: - + - `Board` now takes the fault policy type as its first template parameter. - The global `FAULT` runtime is owned exclusively by `FaultController`. - User state machines are now nested under the global `OPERATIONAL` state through `FaultPolicy` or `FaultPolicyNoMachine`. - Protections are now compile-time `Board` request objects evaluated through `Board::ProtectionEngine`; the previous `ProtectionManager` and boundary split is no longer the active model. - Runtime reporting is unified under `PANIC(...)`, `FAULT(...)`, `WARNING(...)`, and `INFO(...)`. - The real bootstrap path is `Board::init()`. Legacy `STLIB::start()`, `STLIB::update()`, `STLIB_LOW::start()`, and `STLIB_HIGH::start()` must not be used as the integration path. - + Migration notes: - + - Declare the board as `Board`. - Use `FaultPolicy` when you want an operational state machine nested under the global runtime. - Use `FaultPolicyNoMachine` when you only need a fault-entry callback. @@ -39,7 +39,7 @@ Historical releases that predate this file remain available in Git tags such as timerwrapper: - Add `set_callback(void (*callback)(void*), void* callback_data)` to set the callback and its data instead of needing to call `configurexxbit()` and set the period. - `set_limit_value(uint32_t arr)` to set the arr, this will likely be changed to use a `uint32_t` type only when using a 32 bit timer, for now it is just an alias to `instance->tim->ARR = arr;`. Was not added in this pr but also wasn't mentioned before. - + spi: - Add `transceive` with ptr + data explicitly instead of using a span since it's sometimes a pain in the ass to use. diff --git a/Inc/HALAL/Services/PWM/PWM.hpp b/Inc/HALAL/Services/PWM/PWM.hpp index 7a5442b81..79e6b7fd7 100644 --- a/Inc/HALAL/Services/PWM/PWM.hpp +++ b/Inc/HALAL/Services/PWM/PWM.hpp @@ -24,7 +24,7 @@ template class PWM { uint32_t* frequency; bool is_on = false; bool is_initialized = false; - + /* This constructor is private for a reason. Use TimerWrapper::get_pwm */ PWM(TimerWrapper* tim, uint32_t polarity,