mmotor / Mbed 2 deprecated MarsRover_ExoMars____

Dependencies:   EPOS2 mbed-rtos mbed

Fork of MarsRover_ExoMars by mmotor

Files at this revision

API Documentation at this revision

Comitter:
ODEM
Date:
Thu Nov 10 08:35:59 2016 +0000
Parent:
16:e5343d6c9fb2
Commit message:
add Zeit

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Nov 07 07:33:03 2016 +0000
+++ b/main.cpp	Thu Nov 10 08:35:59 2016 +0000
@@ -48,6 +48,10 @@
 int ErrorState6; 
 int ErrorState7;
 float speed = 1.5;   
+int arr[3]; //für die speicherung der Zähler
+int zaehler_buzzer;
+int zaehler_usv;
+int zaehler_mails;
 
 void interrupt_usv(){                               //Funktion, wird aufgeruffen durch den interrupt des USV's
     current_step = 5;
@@ -100,6 +104,10 @@
         led3 = 0;
         led4 = 0;
         MyEpos5.SetDigOut(4, 1);
+        
+        time_t ctTime = time(NULL);
+        ctTime = ctTime+ 7200;
+        printf("\nTime is now (UTC): %d %s\n", ctTime, ctime(&ctTime));
      
         while(1){
 
@@ -523,6 +531,11 @@
                             
                         case 5:
                             pc.printf("USV 5\n");
+                            FILE *fd_write = fopen("/local/zaehler.txt", "w");  // Open "out.txt" on the local file system for writing
+                        if (fd_write) {
+                            fprintf(fd_write, "Buzzer Zähler = %d\n    Fehler Zähler = %d\n    Mails Zähler = %d\n", zaehler_buzzer, zaehler_usv, zaehler_mails);
+                            fclose(fd_write);
+                            }
                             if(buffering == 1){
                                 led3 = 1;
                                 } else {