Nelson Santos / Mbed 2 deprecated trabalho

Dependencies:   X_NUCLEO_IKS01A1-f255a2c75ecb mbed-rtos mbed

Files at this revision

API Documentation at this revision

Comitter:
nlsantos
Date:
Tue May 17 13:52:44 2016 +0000
Parent:
12:33728f2a7068
Commit message:
NBVCX

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
sensor.cpp Show annotated file Show diff for this revision Revisions of this file
userMethods.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon May 16 23:11:34 2016 +0000
+++ b/main.cpp	Tue May 17 13:52:44 2016 +0000
@@ -33,8 +33,8 @@
 
     printf("Sampling started...\n");
 
-    printf("\n\rWelcome! Type one of the following commands and press space or enter");
-    printf("\n\ Don't forget to use only capitals when typing the commands!");
+    printf("\nWelcome! Type one of the following commands and press space or enter");
+    printf("\n Don't forget to use only capitals when typing the commands!");
     printf("\n\r READ ALL\n\r READ <n>\n\r DELETE ALL\n\r DELETE <n>");
     printf("\n\r SETDATE dd mm yyyy\n\r SETTIME hh mm ss");
     printf("\n\r SETT <T>\n\r STATE <x>\n\r LOGGING <x>\n\r EXIT\n\n\r");
@@ -58,8 +58,12 @@
         if (strcmp("READ", command)==0) {
             scanf("%s", arg);
             printf("\n");
-            if(strcmp("ALL", arg)==0)
-                Thread readAllThread(u.readAllData, NULL, osPriorityNormal, DEFAULT_STACK_SIZE);
+            if(strcmp("ALL", arg)==0){
+                printf ("fui");
+                Thread readAllThread(u.readAllData, NULL, osPriorityNormal, DEFAULT_STACK_SIZE*2);
+                printf("voltei");
+                
+                }
                 
             else if (atoi(arg)!= 0) {
                 n = atoi(arg); //A bit hacky, but it works
--- a/sensor.cpp	Mon May 16 23:11:34 2016 +0000
+++ b/sensor.cpp	Tue May 17 13:52:44 2016 +0000
@@ -83,6 +83,7 @@
      /* Retrieve the composing elements of the expansion board */
     uint8_t id;
     printf("Initialising expansion board...\n\r");
+    
     /*
     humidity_sensor->ReadID(&id);
     printf("HTS221  humidity & temperature    = 0x%X\r\n", id);
--- a/userMethods.cpp	Mon May 16 23:11:34 2016 +0000
+++ b/userMethods.cpp	Tue May 17 13:52:44 2016 +0000
@@ -9,6 +9,7 @@
 int * UserMethods::n;
 
 void UserMethods::readAllData(const void*) {
+    printf("chegei aqui");
     vector<log_data> vector = *v;
     
     printf("Entered in readAllData");