|
|
@ -77,13 +77,21 @@ void CmdScheduler::schedule() { |
|
|
|
int inext = strlen(&rxbuf[i]) + i; |
|
|
|
int32_t ecode = callcmd(&rxbuf[i]); |
|
|
|
i = inext; |
|
|
|
|
|
|
|
if (ecode == 0) { |
|
|
|
ZLOGI(TAG, "\tsuccess"); |
|
|
|
} else { |
|
|
|
ZLOGE(TAG, "\tfailed:%s(%d)", err::error2str(ecode), ecode); |
|
|
|
} |
|
|
|
ZLOGI(TAG, "\r\n"); |
|
|
|
if (ecode != 0) { |
|
|
|
ZLOGE(TAG, "callcmd %s fail:%s(%d)", &rxbuf[i], err::error2str(ecode), ecode); |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
ZLOGI(TAG, "process_rx_cmd:end"); |
|
|
|
// if (m_rxsize != 1) {
|
|
|
|
// ZLOGI(TAG, "doscript:end");
|
|
|
|
// }
|
|
|
|
m_dataisready = false; |
|
|
|
} |
|
|
|
|
|
|
@ -116,9 +124,6 @@ int32_t CmdScheduler::callcmd(const char* cmd) { |
|
|
|
// ZLOGI(TAG, "callcmd:argc %d %d", argc, cmder->second.npara);
|
|
|
|
if (cmder->second.npara != context.argc - 1) return err::kce_cmd_param_num_error; |
|
|
|
int32_t ret = cmder->second.call_cmd(&context); |
|
|
|
if (ret == 0) { |
|
|
|
ZLOGI(TAG, "success", argv[0]); |
|
|
|
} |
|
|
|
return ret; |
|
|
|
|
|
|
|
} else { |
|
|
|