test+++++
This commit is contained in:
parent
d1f99ab781
commit
094928841d
|
@ -121,7 +121,8 @@ turn(uint32_t direction,
|
|||
|
||||
updateDirection(pp_car_struct->p_direction);
|
||||
float initial_yaw = pp_car_struct->p_direction->yaw;
|
||||
float target_yaw = adjust_yaw(initial_yaw + degree);
|
||||
float target_yaw = (direction == DIRECTION_LEFT) ? initial_yaw - degree
|
||||
: initial_yaw + degree;
|
||||
|
||||
turn_to_yaw(direction, target_yaw, pwm_level, pp_car_struct);
|
||||
}
|
||||
|
|
|
@ -8,9 +8,6 @@
|
|||
#ifndef MOTOR_PID_H
|
||||
#define MOTOR_PID_H
|
||||
|
||||
#include "magnetometer_init.h"
|
||||
#include "magnetometer_direction.h"
|
||||
|
||||
/*!
|
||||
* @brief Compute the control signal using PID controller
|
||||
* @param integral The integral term of the PID controller
|
||||
|
|
Loading…
Reference in New Issue