From bc3d38b24d6a6f7fb98ee1b37d84b1086350b78d Mon Sep 17 00:00:00 2001 From: zhaohe Date: Sat, 3 Feb 2024 21:01:44 +0800 Subject: [PATCH] fix read io state fail --- components/zcancmder/zcan_board_module.hpp | 4 ++-- .../micro_computer_module_device_script_cmder_paser.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/zcancmder/zcan_board_module.hpp b/components/zcancmder/zcan_board_module.hpp index 71fbbe7..20b7070 100644 --- a/components/zcancmder/zcan_board_module.hpp +++ b/components/zcancmder/zcan_board_module.hpp @@ -42,8 +42,8 @@ class ZCanBoardModule : public ZIModule { hardware_config_t m_cfg; int32_t module_id; - ZGPIO m_input[16]; - ZGPIO m_output[16]; + ZGPIO m_input[32]; + ZGPIO m_output[32]; int32_t m_input_num = 0; int32_t m_output_num = 0; 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 1d663dc..9b5ca7c 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 @@ -109,7 +109,7 @@ void MicroComputerModuleDeviceScriptCmderPaser::app_dump_reg(int moduleId, const if (ecode == 0) { if (type == kint) { ZLOGI(TAG, "%s(%d) :%d", configtag, configid, configval); - } else if (type == kint) { + } else if (type == kbit) { ZLOGI(TAG, "%s(%d) :%s", configtag, configid, dumpbit(configval)); } } else if (ecode != err::kmodule_not_find_config_index) {