Vodafone Test Suite

Dependencies:   mbed-rtos mbed HTTPClient VodafoneUSBModem

Revision:
53:54b2d3a0c7bf
Parent:
52:de6cc9d823ab
Child:
56:6ca2d4c1ffc4
--- a/main.cpp	Thu Oct 11 10:00:19 2012 +0000
+++ b/main.cpp	Fri Oct 12 10:03:37 2012 +0000
@@ -23,28 +23,6 @@
 time_t gPreviousUptime = 0;
 time_t gUptime = 0;
 
-void loopForever() {
-   while(1) {
-      Thread::wait(1000);
-      time_t now = time(NULL);
-      gPreviousUptime = gUptime;
-      gUptime = now-startTime;
-   }
-}
-
-void test(void const*) {
-  VodafoneUSBModem modem;
-  LOG("Constructing TestManager");
-  LOG("Running tests.");
-  TestManager *m = new TestManager(&modem);
-  //m->runTestProfile(TESTS_AUTOMATED);
-  m->runTest(8);
-  //m->executeTest(26);
-  //m->executeTest(10);
-  //m->executeTest(21);
-  loopForever();
-}
-
 void setTime() {
   struct tm t;
   t.tm_year  = 100;
@@ -72,13 +50,18 @@
   LOG("Constructing TestManager");
   LOG("Running tests.");
   TestManager *m = new TestManager(&modem);
-  //m->runTestProfile(TESTS_AUTOMATED);
-  m->runTest(8);
+  m->runTestProfile(TESTS_AUTOMATED);
+  //m->runTest(10);
+  
+  
   // this thread just waits and blinks leds periodically
   while(1) {
      led1 = !led1;
      Thread::wait(500);
      led1 = !led1;
      Thread::wait(1000);
+     time_t now = time(NULL);
+     gPreviousUptime = gUptime;
+     gUptime = now-startTime;
   }
 }
\ No newline at end of file