Browse Source

Merge branch 'master' of 192.168.1.3:manufacturer_stm32/iflytop_stm32_os_sdk

master
zhaohe 2 years ago
parent
commit
9ac1223e1e
  1. 2
      components/zcancmder/basic.cpp
  2. 4
      components/zprotocol_helper/micro_computer_module_device_script_cmder_paser.cpp

2
components/zcancmder/basic.cpp

@ -29,7 +29,7 @@ uint8_t *CanPacketRxBuffer::get_data() {
uint16_t CanPacketRxBuffer::get_datalen() { return rxdataSize - sizeof(zcr_cmd_header_t); }
void CanPacketRxBuffer::clear() {
id = 0;
memset(&m_canPacket, 0, sizeof(m_canPacket) * sizeof(m_canPacket[0]));
memset(&m_canPacket, 0, sizeof(m_canPacket) / sizeof(m_canPacket[0]));
m_canPacketNum = 0;
m_npacket = 0;
memset(rxdata, 0, sizeof(rxdata));

4
components/zprotocol_helper/micro_computer_module_device_script_cmder_paser.cpp

@ -58,7 +58,7 @@ void MicroComputerModuleDeviceScriptCmderPaser::initialize(ICmdParser* cancmder,
});
deviceManager->regOnRegValChangeEvent([this](int32_t moduleid, int32_t regindex, int32_t oldval, int32_t toval) { //
ZLOGI(TAG, "onRegValChangeEvent(%d,%d,%d->%d)", moduleid, regindex, oldval,toval);
ZLOGI(TAG, "onRegValChangeEvent(%d,%d,%d->%d)", moduleid, regindex, oldval, toval);
});
}
@ -467,9 +467,11 @@ void MicroComputerModuleDeviceScriptCmderPaser::do_wait_for_module(int32_t modul
void MicroComputerModuleDeviceScriptCmderPaser::do_scan_module(int32_t paramN, const char* paraV[], ICmdParserACK* ack) {
m_deviceManager->for_each_module([this](int32_t id) { //
// ZLOGI(TAG, "ping %d", id);
int32_t ecode = m_deviceManager->module_ping(id);
if (ecode == 0) {
ZLOGI(TAG, "module %d : %s", id, ecode == 0 ? "online" : "offline");
}
});
ZLOGI(TAG, "scan module end...");
}
Loading…
Cancel
Save