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.
Fork of Timer by
Revision 84:b54822c913b0, committed 2016-05-06
- Comitter:
- IceTeam
- Date:
- Fri May 06 07:43:02 2016 +0000
- Parent:
- 83:714fa414b2bf
- Child:
- 85:38cbf5fd22e1
- Commit message:
- Plateforme test Ok ! Choix des couleurs Ok ! et testey
Changed in this revision
--- a/couleur.cpp Fri May 06 09:20:49 2016 +0200
+++ b/couleur.cpp Fri May 06 07:43:02 2016 +0000
@@ -6,13 +6,14 @@
SCouleur = VIOLET;
LEDR = 1;
LEDV = 0;
- } if (SCouleur == VIOLET) {
+ }
+ else if (SCouleur == VIOLET) {
SCouleur = NOIR;
LEDV = 0;
LEDR = 0;
}
else {
- SCouleur = NOIR;
+ SCouleur = VERT;
LEDV = 1;
LEDR = 0;
}
@@ -20,7 +21,7 @@
void depart(void)
{
- while(button==1) {
+ while (start == 0) {
if(CAMP==0) {
changeCamp();
}
--- a/entete.h Fri May 06 09:20:49 2016 +0200 +++ b/entete.h Fri May 06 07:43:02 2016 +0000 @@ -19,6 +19,7 @@ extern DigitalIn START; extern DigitalOut LEDR; extern DigitalOut LEDV; +extern DigitalIn button; extern int SCouleur; // Fonctions main.cpp
--- a/main.cpp Fri May 06 09:20:49 2016 +0200
+++ b/main.cpp Fri May 06 07:43:02 2016 +0000
@@ -4,6 +4,7 @@
DigitalIn START(PB_7);
DigitalOut LEDR(PC_2);
DigitalOut LEDV(PC_3);
+DigitalIn button(USER_BUTTON);
int SCouleur = VERT;
BusOut drapeau (PC_8, PC_6, PC_5);
@@ -30,7 +31,8 @@
;
}
else {
- ;
+ TestDist3(2,2);
+ TestThet3(1,1);
}
while(1);
--- a/tests.cpp Fri May 06 09:20:49 2016 +0200
+++ b/tests.cpp Fri May 06 07:43:02 2016 +0000
@@ -1,8 +1,7 @@
#include "entete.h"
void wait_start() {
- while (start == 1);
- while (start == 0);
+ while (CAMP != 0) ;
}
void TestDist3(float start, float pas) {
