|
@ -192,6 +192,7 @@ void Main::initializeIflytopCanProtocolStackProcesser() { |
|
|
ACTIVE_REG(REG_MOTOR_CTRL_CURRENT_STATE /* */, icps::kr, 0); |
|
|
ACTIVE_REG(REG_MOTOR_CTRL_CURRENT_STATE /* */, icps::kr, 0); |
|
|
|
|
|
|
|
|
m_protocolStack.initialize(&m_hardware, &IflytopCanStackConfig); |
|
|
m_protocolStack.initialize(&m_hardware, &IflytopCanStackConfig); |
|
|
|
|
|
m_protocolStack.setDumpPacketFlag(true); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void Main::LncubatorRotatingControlService_onException(exception_id_t exception) {} |
|
|
void Main::LncubatorRotatingControlService_onException(exception_id_t exception) {} |
|
@ -260,11 +261,19 @@ void Main::main(int argc, char const *argv[]) { |
|
|
// m_rotatingCtrl.periodicJob();
|
|
|
// m_rotatingCtrl.periodicJob();
|
|
|
// updateRegList();
|
|
|
// updateRegList();
|
|
|
|
|
|
|
|
|
|
|
|
m_hardware.debug_light_periodicJob(); |
|
|
|
|
|
|
|
|
|
|
|
m_protocolStack.periodicJob(); |
|
|
|
|
|
|
|
|
m_hardware.debug_light_periodicJob(); |
|
|
|
|
|
if (m_protocolStack.sendHeart(0, 10) == HAL_OK) { |
|
|
|
|
|
ZLOGI(TAG, "CAN RX HAL_OK"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
static uint32_t lastprocess = 0; |
|
|
|
|
|
if (sys_haspassedms(lastprocess) > 3000) { |
|
|
|
|
|
lastprocess = HAL_GetTick(); |
|
|
|
|
|
if (m_protocolStack.sendHeart(0, 10) == HAL_OK) { |
|
|
|
|
|
ZLOGI(TAG, "CAN RX HAL_OK"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|