C027_SupportTest_xively_locationで使用しているC027用ライブラリ
Fork of C027_Support by
下記のプログラムC027_SupportTest_xively_locationで使用しているC027用ライブラリです。
Import programC027_SupportTest_xively_location
インターフェース2014年10月号のu-blox C027で3G通信する記事で使用したプログラム。 CQ publishing Interface 2014.10 issue, C027 3G test program.
オリジナルのライブラリは下記を参照してください。
Import libraryC027_Support
support library for C027 helper functions for Buffer Pipes, Buffered Serial Port (rtos capable) and GPS parsing. It includes modem APIs for USSD, SMS and Sockets.
Diff: SerialPipe.cpp
- Revision:
- 12:684b31d5482b
- Parent:
- 11:b084552b03fe
- Child:
- 13:e2446fcdc246
--- a/SerialPipe.cpp Thu Nov 14 15:52:36 2013 +0000 +++ b/SerialPipe.cpp Fri Nov 15 13:33:39 2013 +0000 @@ -86,8 +86,10 @@ i ++; if (t == '\r') // terminate commands with carriage return { - _pipeRx.done(); - return o; // if enter send the zero char + _pipeRx.done(); + if (s > o) + b[o] = '\0'; + return o; // if enter send the zero char } else if (t == '\n') // skip/filter new line /* skip */; @@ -97,5 +99,7 @@ o --; // remove it } o = 0; + if (s > 0) + b[0] = '\0'; return WAIT; }