Simon devel#4
Open
zrzz-hq wants to merge 20 commits into
Open
Conversation
the register. Now, after inputting the address of the starting register, the values of the subsequent registers can be input one by one to control the mode and parameters of the motor.
…omy-Lab/PID_motor_controller into simon-devel
zrzz-hq
commented
May 27, 2026
Move motor default register initialization from reg.c to motor_control.c Move PWM conversion helpers from app_config.h to motor_control.c Move Hall capture-to-RPM conversion from app_config.h to hall_sensor.c Remove control_update_flag and call user_loop directly from the control timer callback
zrzz-hq
commented
May 29, 2026
| @@ -2,6 +2,44 @@ | |||
| #include "lp_filter.h" | |||
Contributor
Author
There was a problem hiding this comment.
I think we can remove this header file
zrzz-hq
commented
May 29, 2026
|
|
||
| motor_control_init(); | ||
|
|
||
| HAL_TIM_PWM_Start(&MOTOR_PWM_TIMER_HANDLE, MOTOR_PWM_CHANNEL); |
Contributor
Author
There was a problem hiding this comment.
I think we can move this into the motor_control_init function
zrzz-hq
commented
May 29, 2026
| motor_control_set_pwm_us(PWM_US_NEUTRAL); | ||
|
|
||
| HAL_TIMEx_HallSensor_Start_IT(&HALL_TIMER_HANDLE); | ||
| HAL_TIM_Base_Start_IT(&HALL_TIMER_HANDLE); |
Contributor
Author
There was a problem hiding this comment.
I think we create a hall_sensor_init function and move these two function calls to it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.