diff --git a/sdk/components/step_motor_ctrl_module/step_motor_ctrl_module.cpp b/sdk/components/step_motor_ctrl_module/step_motor_ctrl_module.cpp index 10920db..89f816f 100644 --- a/sdk/components/step_motor_ctrl_module/step_motor_ctrl_module.cpp +++ b/sdk/components/step_motor_ctrl_module/step_motor_ctrl_module.cpp @@ -251,7 +251,7 @@ int32_t StepMotorCtrlModule::step_motor_stop(int32_t breakstop) { int32_t StepMotorCtrlModule::step_motor_easy_set_current_pos(int32_t pos) { return setnowpos(pos); } int32_t StepMotorCtrlModule::step_motor_active_cfg() { - ZLOGI(TAG, "m%d motor_active_cfg", module_id); + // ZLOGI(TAG, "m%d motor_active_cfg", module_id); m_stepM1->enable(false); m_stepM1->setMRES((mres_type_t)m_cfg.stepmotor_mres); m_stepM1->setIHOLD_IRUN(m_cfg.stepmotor_ihold, m_cfg.stepmotor_irun, m_cfg.stepmotor_iholddelay); diff --git a/sdk/components/zcan_protocol_parser/zcan_protocol_parser.cpp b/sdk/components/zcan_protocol_parser/zcan_protocol_parser.cpp index a23261a..cb62953 100644 --- a/sdk/components/zcan_protocol_parser/zcan_protocol_parser.cpp +++ b/sdk/components/zcan_protocol_parser/zcan_protocol_parser.cpp @@ -251,6 +251,13 @@ void ZCanProtocolParser::_processRxPacket(ZIModule* module, zcr_cmd_header_t* rx return; } + // static int32_t lastindex = 0; + // // ZLOGI(TAG, "rx index:%d", rxcmd->index); + // if (rxcmd->index != lastindex + 1) { + // ZLOGI(TAG, "lost packet:%d", lastindex - rxcmd->index); + // } + // lastindex = rxcmd->index; + cmdcontxt_t cxt = {0}; cxt.module = module; cxt.rxcmd = rxcmd; diff --git a/sdk/components/zcancmder/zcanreceiver.cpp b/sdk/components/zcancmder/zcanreceiver.cpp index 13f30d3..415d3b2 100644 --- a/sdk/components/zcancmder/zcanreceiver.cpp +++ b/sdk/components/zcancmder/zcanreceiver.cpp @@ -299,6 +299,8 @@ void ZCanReceiver::STM32_HAL_onCAN_RxFifo0MsgPending(CAN_HandleTypeDef *canHandl if (pHeader.RTR != CAN_RTR_DATA || pHeader.IDE != CAN_ID_STD) continue; if (pHeader.DLC == 0) continue; + // printf("."); + /** * @brief 处理接收到的数据 */ @@ -337,8 +339,10 @@ void ZCanReceiver::STM32_HAL_onCAN_RxFifo0MsgPending(CAN_HandleTypeDef *canHandl curRxBuf->npacket = nframe; bool pass = rxprocesser->filterPacket(curRxBuf); if (pass) { + // printf("y\n"); m_pendingMsgQueue.sendIRQ(curRxBuf); } else { + // printf("x\n"); m_rxFramePool.free(&curRxBuf); } }