diff --git a/components/zcancmder/zcanreceiver_master.cpp b/components/zcancmder/zcanreceiver_master.cpp index 82ba6d4..06122ec 100644 --- a/components/zcancmder/zcanreceiver_master.cpp +++ b/components/zcancmder/zcanreceiver_master.cpp @@ -151,7 +151,7 @@ int32_t ZCanCommnaderMaster::sendCmd(int32_t cmdid, int32_t submoduleid, int32_t int32_t *rxbuf = report->get_data_as(); if (ack != nullptr && nack != 0) { for (size_t i = 0; i < nack; i++) { - ZLOGI(TAG, "ack[%d] = %d", i, rxbuf[i]); + // ZLOGI(TAG, "ack[%d] = %d", i, rxbuf[i]); ack[i] = rxbuf[i]; } } diff --git a/components/zprotocol_helper/micro_computer_module_device_script_cmder_paser.cpp b/components/zprotocol_helper/micro_computer_module_device_script_cmder_paser.cpp index 20c41fb..dd945c0 100644 --- a/components/zprotocol_helper/micro_computer_module_device_script_cmder_paser.cpp +++ b/components/zprotocol_helper/micro_computer_module_device_script_cmder_paser.cpp @@ -4,8 +4,8 @@ #include #include -#include "sdk\components\zprotocols\zcancmder_v2\api\state_index.hpp" #include "sdk/os/zos.hpp" +#include "sdk\components\zprotocols\zcancmder_v2\api\state_index.hpp" using namespace iflytop; using namespace std; @@ -13,8 +13,11 @@ using namespace std; void MicroComputerModuleDeviceScriptCmderPaser::do_dumpconfig(int32_t moduleId) { ICmdParserACK ack; - const char paraV[1][10] = {{0}}; - sprintf((char*)paraV[0], "%d", moduleId); + const char paraV_cache[1][10] = {{0}}; + sprintf((char*)paraV_cache[0], "%ld", moduleId); + // sprintf((char*)¶V[0][0], "%d", moduleId); + + const char* paraV[1] = {paraV_cache[0]}; do_dumpconfig(1, (const char**)paraV, &ack); } @@ -26,10 +29,11 @@ void MicroComputerModuleDeviceScriptCmderPaser::do_dumpconfig(int32_t paramN, co uint16_t moduleId = atoi(paraV[0]); int32_t configval = 0; int32_t ecode = 0; + ZLOGI(TAG, "dumpconfig %s", paraV[0]); #define DUMP_CONFIG(tag, configid) \ ecode = m_deviceManager->module_get_param(moduleId, configid, &configval); \ - if (ecode != 0) { \ + if (ecode == 0) { \ ZLOGI(TAG, "%-30s :%d", tag, configval); \ }