-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
:add servo example #20
base: master
Are you sure you want to change the base?
Conversation
examples/motor/servo.cc
Outdated
@@ -0,0 +1,25 @@ | |||
#include "cmsis_os.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing license
examples/motor/servo.cc
Outdated
#define KEY_GPIO_GROUP GPIOB | ||
#define KEY_GPIO_PIN GPIO_PIN_2 | ||
|
||
control::MotorPWMBase *motor1 = NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
control::MotorPWMBase *motor1 = NULL; | |
control::MotorPWMBase *motor1 = nullptr; |
examples/motor/servo.cc
Outdated
#define KEY_GPIO_GROUP GPIOB | ||
#define KEY_GPIO_PIN GPIO_PIN_2 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove unused stuff
examples/motor/servo.cc
Outdated
#include "cmsis_os.h" | ||
#include "main.h" | ||
|
||
#include "bsp_print.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove unused header
examples/motor/servo.cc
Outdated
control::MotorPWMBase *motor1 = NULL; | ||
|
||
void RM_RTOS_Init() { | ||
print_use_uart(&huart8); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. You need to format your code though.
implemented a servo (MG996R) PWM motor base