Final1x

Dependencies:   GYRO_DISCO_L476VG mbed BSP_DISCO_L476VG COMPASS_DISCO_L476VG

Files at this revision

API Documentation at this revision

Comitter:
gr91
Date:
Sat Feb 27 06:55:41 2021 +0000
Parent:
6:6df9f66ca6bb
Commit message:
xx

Changed in this revision

BSP_DISCO_L476VG.lib 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
diff -r 6df9f66ca6bb -r 763b230d3b66 BSP_DISCO_L476VG.lib
--- a/BSP_DISCO_L476VG.lib	Sat Jun 13 16:28:37 2020 +0000
+++ b/BSP_DISCO_L476VG.lib	Sat Feb 27 06:55:41 2021 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/teams/ST/code/BSP_DISCO_L476VG/#4943b15cce9f
+https://os.mbed.com/teams/ER-S3-prime/code/BSP_DISCO_L476VG/#e1b1de1039d2
diff -r 6df9f66ca6bb -r 763b230d3b66 main.cpp
--- a/main.cpp	Sat Jun 13 16:28:37 2020 +0000
+++ b/main.cpp	Sat Feb 27 06:55:41 2021 +0000
@@ -1,6 +1,12 @@
+// pour modifier la sensibilite du gyro
+// dans le fichier stm32l476g_discovery_guroscope.c
+// ligne 106   
+//L3GD20_InitStructure.Full_Scale = L3GD20_FULLSCALE_2000;
 #include "mbed.h"
 #include "GYRO_DISCO_L476VG.h"
 #include "COMPASS_DISCO_L476VG.h"
+#define TE 0.01
+#define FC 0.1
 //
 GYRO_DISCO_L476VG gyro;
 COMPASS_DISCO_L476VG compass;
@@ -67,12 +73,12 @@
     double GyrF[2];
     wait(1);
     pc.printf("Super Inclinometre \n");
-    coef_filtre_PB(1,0.05,0.01,coef_acc);   // H0 f0 Te
-    coef_filtre_PB(1/(2*3.1415926*0.05),0.05,0.01,coef_gyr);   // H0 f0 Te
+    coef_filtre_PB(1,FC,TE,coef_acc);   // H0 f0 Te
+    coef_filtre_PB(1/(2*3.1415926*FC),FC,TE,coef_gyr);   // H0 f0 Te
     //pc.printf("a= %f   b=%f \n\r",coef_acc[0],coef_acc[1]);
     float gyoff=gyro_zero();
     float anoff=angle_zero();
-    ticker.attach(&mesure,0.01);
+    ticker.attach(&mesure,TE);
     unsigned char cpt=0;
     //
     while(1) {