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.
Dependencies: mbed freescal_cup_k22f
Diff: source/Gestion_Moteur.cpp
- Revision:
- 26:a836e62e0c98
- Parent:
- 6:a4e49784b533
- Child:
- 29:e7f37f801c93
--- a/source/Gestion_Moteur.cpp Wed Jan 21 10:30:39 2015 +0000
+++ b/source/Gestion_Moteur.cpp Wed Jan 21 16:54:53 2015 +0000
@@ -9,7 +9,7 @@
//DigitalOut FLAG(PTA5);
-AnalogOut FLAG(DAC0_OUT);
+
Timeout timeout;
PwmOut Pwm_moteur_1(PTD4); // Moteur gauche
PwmOut Pwm_moteur_2(PTA1); // Moteur droit
@@ -57,8 +57,8 @@
void mesure_interruption(void)
{
float mem;
- mem=FLAG.read();
- FLAG.write(1);
+
+
// Calcul de l'écart pour le moteur gauche
mesure1=decodeur_1.getPulses();
if (mesure1 >= mesure_precedente1)
@@ -77,7 +77,7 @@
Bloc_propulsion();
- FLAG.write(mem);
+
}
void init_led(void)
{