Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: PSL_ROBOT_lorenzo robot_lorenzo recepteur_mbed_os_6
Diff: MX12.cpp
- Revision:
- 32:5f44c2239b7b
- Parent:
- 30:4e7cf52ac2dd
--- a/MX12.cpp Fri Feb 04 09:22:50 2022 +0000 +++ b/MX12.cpp Fri Mar 18 10:04:50 2022 +0000 @@ -375,7 +375,7 @@ void MX12::cmd_moteur(float Vavance, float Vlat, float Wz) { // mettre en mode wh - char data[2]; +/* char data[2]; data[1] = 0; data[0] = 0; _bus_state = SerialState::Writing; @@ -388,7 +388,7 @@ rw(1, CONTROL_TABLE_CCW_ANGLE_LIMIT, 2, data); rw(2, CONTROL_TABLE_CCW_ANGLE_LIMIT, 2, data); rw(3, CONTROL_TABLE_CCW_ANGLE_LIMIT, 2, data); - +*/ float W1; float W2; float W3; @@ -432,7 +432,7 @@ W1=1/R*(-cosf(a1)*Vavance + sinf(a1)*y1*Wz - sinf(a1)*Vlat + cosf(a1)*x1*Wz); //loi de commande moteur 1 W2=1/R*(-cosf(a2)*Vavance + sinf(a2)*y2*Wz - sinf(a2)*Vlat + cosf(a2)*x2*Wz); W3=1/R*(-cosf(a3)*Vavance + sinf(a3)*y3*Wz - sinf(a3)*Vlat + cosf(a3)*x3*Wz); - printf("%d %d %dn\r",(int)(1000*W1),(int)(1000*W2),(int)(1000*W3)); + //printf("%d %d %dn\r",(int)(1000*W1),(int)(1000*W2),(int)(1000*W3)); SetSpeed_rad_s(1,W1); // impose la vitesse au moteur 1