Projeto teste do Programa de integracao com biblioteca SGAM_MDW !! Aqui visa um usuario que usa o projeto implementado para a placa NUCLEO F429ZI

Dependencies:   sgam_mdw sgam_mdw_NUCLEOF429ZI_impl Cayenne-LPP

Revision:
12:2109a8bc8848
Parent:
10:cb7a807b5225
Child:
14:8ec6bdff6f67
--- a/main.cpp	Sat Jun 22 15:06:49 2019 +0000
+++ b/main.cpp	Sun Jun 23 13:22:50 2019 -0300
@@ -1,41 +1,40 @@
-#include "mbed_config.h"
-#include "mbed.h"
+// #define DEBUG_SGAM
 
+#include "mbed.h"
 #include "sgam_mdw.h"
 
-#define LOG(args...)   printf(args)  
-
 #include "ControlImpl.h"
 #include "Gyroscope.h"
 
 ControlImpl ctrl;
 
+#define D_LOG(args...)   printf(args) 
+
 int main() {
-    LOG("=============== INICIO ===============\r\n");
+    D_LOG("=============== INICIO ===============\r\n");
 
     Control* control = ctrl.getControler();
+    control->initialize();
 
-    control->initialize();
     int count = 0;
 
     Sensor<float>* temp = (Sensor<float>*) control->getSensor("Temperature");
-    Sensor<GyroscopeData>* gyro = (Sensor<GyroscopeData>*) control->getSensor("Gyroscope");
+    // Sensor<GyroscopeData>* gyro = (Sensor<GyroscopeData>*) control->getSensor("Gyroscope");
     
     while( count++ < 10) {
         float* f = temp->getValue();
-        LOG("Temperatura => %f \r\n", *f);
+        D_LOG("Temperatura => %f \r\n", *f);
 
-        GyroscopeData* data = gyro->getValue();
-        
-        LOG("Gyro (X) => %d \r\n", data->gx);
-        LOG("Gyro (Y) => %d \r\n", data->gy);
-        LOG("Gyro (Z) => %d \r\n", data->gz);
-        LOG("***********************************\r\n");
+        // GyroscopeData* data = gyro->getValue();
+        // D_LOG("Gyro (X) => %d \r\n", data->gx);
+        // D_LOG("Gyro (Y) => %d \r\n", data->gy);
+        // D_LOG("Gyro (Z) => %d \r\n", data->gz);
+        // D_LOG("***********************************\r\n");
 
-        wait(1);
+        wait(1.5);
     }
 
     control->finalize();
-    LOG("=============== FINAL ===============\r\n");
+    D_LOG("=============== FINAL ===============\r\n");
     return 1;
 }