Searched refs:int_tofp (Results 1 – 1 of 1) sorted by relevance
41 #define int_tofp(X) ((int64_t)(X) << FRAC_BITS) macro156 .max_perf = int_tofp(1),167 pid->integral = int_tofp(integral); in pid_reset()168 pid->last_err = int_tofp(setpoint) - int_tofp(busy); in pid_reset()173 pid->p_gain = div_fp(int_tofp(percent), int_tofp(100)); in pid_p_gain_set()178 pid->i_gain = div_fp(int_tofp(percent), int_tofp(100)); in pid_i_gain_set()183 pid->d_gain = div_fp(int_tofp(percent), int_tofp(100)); in pid_d_gain_set()192 fp_error = int_tofp(pid->setpoint) - busy; in pid_calc()194 if (abs(fp_error) <= int_tofp(pid->deadband)) in pid_calc()202 integral_limit = int_tofp(30); in pid_calc()[all …]