mDot AT-Firmware for testing

Dependencies:   MTS-Serial libmDot-mbed5

Fork of Dot-AT-Firmware by MultiTech

Revision:
9:ff62b20f7000
Parent:
4:666017851052
Child:
14:f9a77400b622
--- a/CommandTerminal/CmdSendString.cpp	Mon Apr 04 13:17:44 2016 +0000
+++ b/CommandTerminal/CmdSendString.cpp	Mon Apr 04 09:00:31 2016 -0500
@@ -21,16 +21,9 @@
 
     std::vector<uint8_t> data(text.begin(), text.end());
     if ((code = _dot->send(data, _dot->getTxWait())) != mDot::MDOT_OK) {
-        std::string error = mDot::getReturnCodeString(code);
-
-        if (code != mDot::MDOT_NOT_JOINED)
-            error +=  + " - " + _dot->getLastError();
-
-        setErrorMessage(error);
+        setErrorMessage(_dot->getLastError());
         return 1;
-    }
-
-    if (_dot->getTxWait()) {
+    } else if (_dot->getTxWait()) {
         data.clear();
 
         if (_dot->recv(data) == mDot::MDOT_OK) {
@@ -54,7 +47,7 @@
 
     if (args.size() >= 2) {
         size_t size = 0;
-        for (int i = 1; i < args.size() - 1; i++)
+        for (size_t i = 1; i < args.size() - 1; i++)
             size += args[i].size() + 1;
         if (size > 242) {
             setErrorMessage("Invalid packet, expects (string:242)");