added current monitoring to pcb, many code fixes for the protocol / feed control logic, completely reworked diagnostic tool
This commit is contained in:
@@ -82,8 +82,8 @@ static inline pid_motor_cmd_t pid_update_motor(pid_i32_t *pid,
|
||||
|
||||
int32_t error = setpoint - position;
|
||||
|
||||
// Deadband: if within ±3 counts, hold position and reset integrator
|
||||
if (error >= -3 && error <= 3) {
|
||||
// Deadband: if within ±1 count (~0.005mm), hold position and reset integrator
|
||||
if (error >= -1 && error <= 1) {
|
||||
pid->integrator = 0;
|
||||
pid->prev_error = 0;
|
||||
pid->last_output = 0;
|
||||
|
||||
Reference in New Issue
Block a user