Support for LISA-N101
Fork of C027_Support by
This is a variant of the C027 driver code for the C027N version, i.e. the one with the Neul/Huawei/u-blox Cellular Internet of Things module on board. The AT command interface for this module is entirely different to the AT interface for the other u-blox modules, hence this fork of the driver. Work is underway to rearchitect the original C027 driver so that a merge can be done.
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; }