diff --git a/components/cmdscheduler/cmd_scheduler.cpp b/components/cmdscheduler/cmd_scheduler.cpp index b3807ac..8b2cbfa 100644 --- a/components/cmdscheduler/cmd_scheduler.cpp +++ b/components/cmdscheduler/cmd_scheduler.cpp @@ -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 { diff --git a/components/hardware/uart/zuart_helper.cpp b/components/hardware/uart/zuart_helper.cpp index 4f24880..4e085f0 100644 --- a/components/hardware/uart/zuart_helper.cpp +++ b/components/hardware/uart/zuart_helper.cpp @@ -3,7 +3,7 @@ #include "sdk\components\zprotocols\errorcode\errorcode.hpp" using namespace iflytop; -#define DEBUG 1 +#define DEBUG 0 #if DEBUG static void dumphex(char* tag, uint8_t* data, uint8_t len) { printf("%s:", tag);