Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: TrainStat.cpp
- Revision:
- 4:acfd6fbf9f9e
- Parent:
- 3:5720d24f4a4a
- Child:
- 6:d4d781f31f70
--- a/TrainStat.cpp	Sun Jun 28 12:21:33 2015 +0000
+++ b/TrainStat.cpp	Sun Jul 05 08:09:02 2015 +0000
@@ -3,13 +3,12 @@
 #include "TrainStat.h"
 #include "tokyoMetro.h"
 #include "yahooTrain.h"
+#include "matchLine.h"
 
 #define ERR(x, ...) std::printf("[TrainStat : ERR]"x"\r\n", ##__VA_ARGS__);
 
 TrainStat::TrainStat(enum infoSource s) {
         source = s ;
-        TMetro_initLine() ;
-        YahooT_initLine() ;
 } ;
  
 TrainStat::~TrainStat(){ } ;
@@ -20,21 +19,6 @@
     recvSize = size ;
 }
 
-bool TrainStat::setLine(string line)
-{
-    switch(source) {
-    case YAHOO_TRAIN: 
-        YahooT_setLine(line) ; 
-        break ;
-    case TOKYO_METRO:
-        TMetro_setLine(line) ; 
-        break ;
-    default:
-        return false ;
-    }
-    return true ;
-}
-
 bool TrainStat::getStat()
 {
     int ret ;
@@ -50,7 +34,7 @@
     default:
         return false ;
     }
-
+    printf("     Train => %s\n", ret?"Delay":"No Delay") ;
     return ret ;
     
 }