Romain Ame / Mbed 2 deprecated Timer71pt

Dependencies:   RoboClaw mbed

Fork of Timer by ARES

Files at this revision

API Documentation at this revision

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

couleur.cpp Show annotated file Show diff for this revision Revisions of this file
entete.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
tests.cpp Show annotated file Show diff for this revision Revisions of this file
--- 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) {