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.
Diff: main.cpp
- Revision:
- 7:20d05f0d11a2
- Parent:
- 6:9af875ef7b30
--- a/main.cpp Thu Jun 06 16:30:59 2019 +0000
+++ b/main.cpp Sat Jun 08 09:41:48 2019 +0000
@@ -9,7 +9,7 @@
// Timer
DigitalOut myled2(LED2);
-DigitalOut myled3(LED3);
+
Serial pc(USBTX,USBRX,115200);
float tnul = 0.0;
@@ -60,7 +60,7 @@
voiture_deltat = t.read() - t1;
}
- while (start) { //while(start){
+ while (1) { //while(start){
// données de la centrale inertiel
// data_distances = Radar;
recuperer_start(deltat_start);
@@ -78,16 +78,24 @@
// L'actualisation ne se lance que si on a un tableau complet
-
+ // if (newData){
+ // newData = 0;
+ // addRadar(dataReady, prevData);
+ // for(int k=0; k<4; k++){
+ // prevData[k] = dataReady[k];
+ // }
+ //}
if (newRadar) {
cpt++;
newRadar = false;
- myled3 = !myled3 ;
+ //myled3 = !myled3 ;
// Conversion tableau -> vector
for (int i =0; i<360; i++) {
data_distances[i]=float(Radar[i])/1000.0; // (m)
}
+ myled3=!myled3;
actualisation();
+ //myled3=0;
if(cpt%100==0) {
for(int i=0; i<360; i++) {
pc.printf("%3d %4.3f%\n",i,data_distances[i]);