26 msg_f(
"stopping...", 1);
32 msg_f(
"running...", 1);
37 leftWheel.
setPWM(pwm - turn);
38 rightWheel.
setPWM(pwm + turn);
98 int32_t defaultAngleL;
120 if(angle % 5 == 0 && angle % 45 != 0) {
128 defaultAngleL = leftWheel.
getCount();
131 run(0, 10 * rotation);
133 if(leftWheel.
getCount() - defaultAngleL < -dAngle * angle * rotation ||
134 leftWheel.
getCount() - defaultAngleL > dAngle * angle * rotation) {
138 if(leftWheel.
getCount() - defaultAngleL > -dAngle * angle * rotation ||
139 leftWheel.
getCount() - defaultAngleL < dAngle * angle * rotation) {
void setBrake(bool brake)
void setBrakeMotor(bool brake)
void angleChange(int angle, int rotation)
void init_f(const char *str)
void sleep(uint32_t duration)
void msg_f(const char *str, int32_t line)
int32_t getCount(void) const
void moveAngle(int8_t pwm, int angle)
void run(int8_t pwm, int8_t turn)