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 diff --git a/Inc/HALAL/Services/PWM/PWM.hpp b/Inc/HALAL/Services/PWM/PWM.hpp index ca38b3aa8..79e6b7fd7 100644 --- a/Inc/HALAL/Services/PWM/PWM.hpp +++ b/Inc/HALAL/Services/PWM/PWM.hpp @@ -18,12 +18,12 @@ 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,