WIP trajectoire
This commit is contained in:
parent
1a72e92a03
commit
bc7e947823
6
main.c
6
main.c
@ -189,6 +189,12 @@ void main(void)
|
|||||||
|
|
||||||
}
|
}
|
||||||
if(mise_a_jour_trajectoire){
|
if(mise_a_jour_trajectoire){
|
||||||
|
struct msg_trajectoire_t msg_trajectoire;
|
||||||
|
get_données_reçues((uint8_t *) &msg_trajectoire, sizeof(msg_trajectoire), REG_PROPULSION_TRAJECTOIRE);
|
||||||
|
printf("trajectoire: type: %d, point1_x:%f, point1_y:%f, point2_x:%f, point2_y:%f\n",
|
||||||
|
msg_trajectoire.trajectoire.type, msg_trajectoire.trajectoire.p1.x, msg_trajectoire.trajectoire.p1.y,
|
||||||
|
msg_trajectoire.trajectoire.p2.x, msg_trajectoire.trajectoire.p2.y);
|
||||||
|
|
||||||
// Oh la la !
|
// Oh la la !
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
#ifndef MESSAGE_PROPULSION_H
|
#ifndef MESSAGE_PROPULSION_H
|
||||||
#define MESSAGE_PROPULSION_H
|
#define MESSAGE_PROPULSION_H
|
||||||
|
|
||||||
|
#include "Trajectoire.h"
|
||||||
#define USB_ID_PROPULSION 'P'
|
#define USB_ID_PROPULSION 'P'
|
||||||
|
|
||||||
#define REG_PROPULSION_POSITION 0x00
|
#define REG_PROPULSION_POSITION 0x00
|
||||||
@ -7,6 +9,7 @@
|
|||||||
#define REG_PROPULSION_PWM 0x0E
|
#define REG_PROPULSION_PWM 0x0E
|
||||||
#define REG_PROPULSION_VITESSE_ROUES 0x12
|
#define REG_PROPULSION_VITESSE_ROUES 0x12
|
||||||
#define REG_PROPULSION_VITESSE_ROBOT 0x1A
|
#define REG_PROPULSION_VITESSE_ROBOT 0x1A
|
||||||
|
#define REG_PROPULSION_TRAJECTOIRE 0x22
|
||||||
|
|
||||||
struct msg_propulsion_position_t{
|
struct msg_propulsion_position_t{
|
||||||
float position_x_mm, position_y_mm, orientation_rad;
|
float position_x_mm, position_y_mm, orientation_rad;
|
||||||
@ -24,4 +27,19 @@ struct msg_propulsion_vitesse_robot_t {
|
|||||||
float avance_mm_s, rotation_rad_s;
|
float avance_mm_s, rotation_rad_s;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct msg_trajectoire_t {
|
||||||
|
struct trajectoire_t trajectoire;
|
||||||
|
};
|
||||||
|
/*
|
||||||
|
struct trajectoire_t {
|
||||||
|
enum trajectoire_type_t type;
|
||||||
|
struct point_xy_t p1, p2, p3, p4;
|
||||||
|
float orientation_debut_rad, orientation_fin_rad;
|
||||||
|
float rayon, angle_debut_rad, angle_fin_rad;
|
||||||
|
float longueur;
|
||||||
|
// Pour les trajectoires composées
|
||||||
|
struct trajectoire_t * trajectoires[NB_MAX_TRAJECTOIRE];
|
||||||
|
int nb_trajectoire;
|
||||||
|
};*/
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
Loading…
Reference in New Issue
Block a user