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.
Revision 6:d4d781f31f70, committed 2015-11-22
- Comitter:
- takashikojo
- Date:
- Sun Nov 22 08:47:56 2015 +0000
- Parent:
- 5:6105553963bb
- Commit message:
- Serial Terminal message macro
Changed in this revision
--- a/TrainStat.cpp Fri Oct 23 05:51:49 2015 +0000
+++ b/TrainStat.cpp Sun Nov 22 08:47:56 2015 +0000
@@ -7,6 +7,12 @@
#define ERR(x, ...) std::printf("[TrainStat : ERR]"x"\r\n", ##__VA_ARGS__);
+#if 0
+#define TERMINAL(x, ...) std::printf("[TrainStat :]"x"\r\n", ##__VA_ARGS__);
+#else
+#define TERMINAL(x, ...)
+#endif
+
TrainStat::TrainStat(enum infoSource s) {
source = s ;
} ;
@@ -34,7 +40,6 @@
default:
return false ;
}
- printf(" Train => %s\n", ret?"Delay":"No Delay") ;
+ TERMINAL("%s\n", ret?"Delay":"No Delay") ;
return ret ;
-
}
--- a/matchLine.cpp Fri Oct 23 05:51:49 2015 +0000
+++ b/matchLine.cpp Sun Nov 22 08:47:56 2015 +0000
@@ -6,7 +6,7 @@
#include <SDFileSystem.h>
#include "matchLine.h"
-SDFileSystem sdCard(PTE3, PTE1, PTE2, PTE4, "sd");
+SDFileSystem sdCard(PTE3, PTE1, PTE2, PTE4, "sd"); // SD for FRDM-K64F
#define ERR(x, ...) std::printf("[DigitalClock : ERR]"x"\r\n", ##__VA_ARGS__);
@@ -24,7 +24,6 @@
bool matchLine::getList(string filename)
{
- int cnt = 0 ;
char line[100] ;
FILE *fp ;
fp = fopen(filename.c_str(), "r");
--- a/tokyoMetro.cpp Fri Oct 23 05:51:49 2015 +0000
+++ b/tokyoMetro.cpp Sun Nov 22 08:47:56 2015 +0000
@@ -115,7 +115,9 @@
picojson::array array = trainStat.get<picojson::array>();
for (picojson::array::iterator it = array.begin(); it != array.end(); it++) {
picojson::object& obj = it->get<picojson::object>();
- DBG("Line=%s, %s\n", obj["odpt:railway"].get<std::string>().c_str(), lineTbl[obj["odpt:railway"].get<std::string>()].c_str()) ;
+ DBG("Line=%s, %s, %s\n", obj["odpt:railway"].get<std::string>().c_str(),
+ lineTbl[obj["odpt:railway"].get<std::string>()].c_str(),
+ obj["odpt:trainInformationText"].get<std::string>()) ;
if(watchList.find(lineTbl[obj["odpt:railway"].get<std::string>()])) {
printStat(
lineTbl[obj["odpt:railway"].get<std::string>()].c_str(),