Réinitialisation des intégrateurs du correcteur des moteurs pour supprimer les à-coups en reprise de trajectoire
This commit is contained in:
parent
7b472725cb
commit
e00e3f5a3e
@ -28,6 +28,13 @@ void AsserMoteur_Init(int id){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AsserMoteur_Reset(){
|
||||||
|
for(unsigned int i =0; i< 2; i ++){
|
||||||
|
commande_I[i]=0;
|
||||||
|
consigne_mm_s[i]=0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// @brief Défini une consigne de vitesse pour le moteur indiqué.
|
/// @brief Défini une consigne de vitesse pour le moteur indiqué.
|
||||||
/// @param moteur : Moteur à asservir
|
/// @param moteur : Moteur à asservir
|
||||||
/// @param _consigne_mm_s : consigne de vitesse en mm/s
|
/// @param _consigne_mm_s : consigne de vitesse en mm/s
|
||||||
|
|||||||
@ -6,4 +6,5 @@ float AsserMoteur_getConsigne_mm_s(enum t_moteur moteur);
|
|||||||
float AsserMoteur_getVitesse_mm_s(enum t_moteur moteur, int step_ms);
|
float AsserMoteur_getVitesse_mm_s(enum t_moteur moteur, int step_ms);
|
||||||
void AsserMoteur_Gestion(int step_ms);
|
void AsserMoteur_Gestion(int step_ms);
|
||||||
void AsserMoteur_Init(int);
|
void AsserMoteur_Init(int);
|
||||||
void AsserMoteurs_stop(void);
|
void AsserMoteurs_stop(void);
|
||||||
|
void AsserMoteur_Reset(void);
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// Changer le define en fonction qu'on soit sur les PAMIs ou sur le robot principal
|
// Changer le define en fonction qu'on soit sur les PAMIs ou sur le robot principal
|
||||||
|
|
||||||
//#define ROBOT_PROPULSION_2026
|
#define ROBOT_PROPULSION_2026
|
||||||
#define ROBOT_TYPE_PAMI
|
//#define ROBOT_TYPE_PAMI
|
||||||
|
|
||||||
#ifndef ROBOT_PROPULSION_2026
|
#ifndef ROBOT_PROPULSION_2026
|
||||||
#ifndef ROBOT_TYPE_PAMI
|
#ifndef ROBOT_TYPE_PAMI
|
||||||
|
|||||||
1
main.c
1
main.c
@ -320,6 +320,7 @@ void main(void)
|
|||||||
mise_données_dans_échange((uint8_t*) &(etat_action_u8), sizeof(etat_action_u8), REG_PROPULSION_ETAT_TRAJET);
|
mise_données_dans_échange((uint8_t*) &(etat_action_u8), sizeof(etat_action_u8), REG_PROPULSION_ETAT_TRAJET);
|
||||||
|
|
||||||
if(etat_action == ACTION_TERMINEE){
|
if(etat_action == ACTION_TERMINEE){
|
||||||
|
AsserMoteur_Reset();
|
||||||
mode = 0;
|
mode = 0;
|
||||||
}
|
}
|
||||||
AsserMoteur_Gestion(step_ms);
|
AsserMoteur_Gestion(step_ms);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user