|
|
@@ -27,7 +27,7 @@ mc_limit_t *nv_get_limter(void) {
|
|
|
}
|
|
|
|
|
|
void nv_save_hall_table(s32 *hall_table) {
|
|
|
- memcpy((char *)m_params.hall_table, (char *)hall_table, sizeof(m_params.hall_table));
|
|
|
+// memcpy((char *)m_params.hall_table, (char *)hall_table, sizeof(m_params.hall_table));
|
|
|
nv_save_motor_params();
|
|
|
}
|
|
|
|
|
|
@@ -498,19 +498,6 @@ void nv_storage_init(void) {
|
|
|
#endif
|
|
|
#if CONFIG_MOT_TYPE==MOTOR_BLUESHARK_A1
|
|
|
m_params.offset = 0.0f; //编码器做了零位置校准
|
|
|
- if (foc_params.n_currentBand != CONFIG_CURRENT_BANDWITH) {
|
|
|
- foc_params.n_currentBand = CONFIG_CURRENT_BANDWITH;
|
|
|
- foc_params.pid_conf[PID_D_id].kp = (foc_params.n_currentBand * MOTOR_Ld);
|
|
|
- foc_params.pid_conf[PID_D_id].ki = (MOTOR_R/MOTOR_Ld);
|
|
|
- foc_params.pid_conf[PID_D_id].kd = 0;
|
|
|
-
|
|
|
- foc_params.pid_conf[PID_Q_id].kp = (foc_params.n_currentBand * MOTOR_Lq);
|
|
|
- foc_params.pid_conf[PID_Q_id].ki = (MOTOR_R/MOTOR_Lq);
|
|
|
- foc_params.pid_conf[PID_Q_id].kd = 0;
|
|
|
- }
|
|
|
- if (CONFIG_DEFAULT_PHASE_CURR_LIM != foc_params.s_PhaseCurrLim) {
|
|
|
- foc_params.s_PhaseCurrLim = CONFIG_DEFAULT_PHASE_CURR_LIM;
|
|
|
- }
|
|
|
#endif
|
|
|
sys_debug("%f -- %f, flux: %f, %d\n", foc_params.n_currentBand, m_params.ld, m_params.flux_linkage, sizeof(m_params));
|
|
|
}
|