|
@ -19,6 +19,7 @@ |
|
|
#include "sdk\components/step_motor_ctrl_module/zcan_master_step_motor_ctrl_module.hpp"
|
|
|
#include "sdk\components/step_motor_ctrl_module/zcan_master_step_motor_ctrl_module.hpp"
|
|
|
#include "sdk\components/xy_robot_ctrl_module/xy_robot_script_cmder_module.hpp"
|
|
|
#include "sdk\components/xy_robot_ctrl_module/xy_robot_script_cmder_module.hpp"
|
|
|
#include "sdk\components/xy_robot_ctrl_module/zcan_xy_robot_master_module.hpp"
|
|
|
#include "sdk\components/xy_robot_ctrl_module/zcan_xy_robot_master_module.hpp"
|
|
|
|
|
|
#include "sdk\components\eq_20_asb_motor\script_cmder_eq20_servomotor.hpp"
|
|
|
#include "sdk\components\mini_servo_motor\mini_servo_motor_ctrl_module.hpp"
|
|
|
#include "sdk\components\mini_servo_motor\mini_servo_motor_ctrl_module.hpp"
|
|
|
// #include "sdk\components\scriptcmder_module\xy_robot_script_cmder_module.hpp"
|
|
|
// #include "sdk\components\scriptcmder_module\xy_robot_script_cmder_module.hpp"
|
|
|
// #include "sdk\components\zcancmder_master_module/zcan_master_step_motor_ctrl_module.hpp"
|
|
|
// #include "sdk\components\zcancmder_master_module/zcan_master_step_motor_ctrl_module.hpp"
|
|
@ -153,6 +154,7 @@ I_StepMotorCtrlModule* g_z_step_motor = nullptr; |
|
|
*******************************************************************************/ |
|
|
*******************************************************************************/ |
|
|
StepMotorCtrlScriptCmderModule g_script_zmotor; |
|
|
StepMotorCtrlScriptCmderModule g_script_zmotor; |
|
|
XYRobotScriptCmderModule g_script_xyrobot; |
|
|
XYRobotScriptCmderModule g_script_xyrobot; |
|
|
|
|
|
ScriptCmderEq20Servomotor g_script_eq20servomotor; |
|
|
|
|
|
|
|
|
} // namespace iflytop
|
|
|
} // namespace iflytop
|
|
|
#if 0
|
|
|
#if 0
|
|
@ -223,6 +225,9 @@ extern DMA_HandleTypeDef hdma_usart3_tx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
extern "C" {} |
|
|
extern "C" {} |
|
|
|
|
|
extern DMA_HandleTypeDef hdma_usart2_rx; |
|
|
|
|
|
extern DMA_HandleTypeDef hdma_usart2_tx; |
|
|
|
|
|
|
|
|
extern void step_motor_cmd_reg(); |
|
|
extern void step_motor_cmd_reg(); |
|
|
void Main::run() { |
|
|
void Main::run() { |
|
|
/*******************************************************************************
|
|
|
/*******************************************************************************
|
|
@ -238,7 +243,15 @@ void Main::run() { |
|
|
m_zcanCommnaderMaster.init(cfg); |
|
|
m_zcanCommnaderMaster.init(cfg); |
|
|
g_cmdScheduler.initialize(&DEBUG_UART, 1000); |
|
|
g_cmdScheduler.initialize(&DEBUG_UART, 1000); |
|
|
g_feiteservomotor_bus.initialize(&huart3, &hdma_usart3_rx, &hdma_usart3_tx); |
|
|
g_feiteservomotor_bus.initialize(&huart3, &hdma_usart3_rx, &hdma_usart3_tx); |
|
|
|
|
|
g_modbusblockhost.initialize(&huart2, &hdma_usart2_tx, &hdma_usart2_rx); |
|
|
|
|
|
|
|
|
|
|
|
g_main_servo_motor.init(&g_modbusblockhost, 1); |
|
|
|
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
|
|
* CMD * |
|
|
|
|
|
*******************************************************************************/ |
|
|
|
|
|
g_script_eq20servomotor.initialize(&g_cmdScheduler); |
|
|
|
|
|
g_script_eq20servomotor.regmodule(1, &g_main_servo_motor); |
|
|
#if 0
|
|
|
#if 0
|
|
|
|
|
|
|
|
|
g_xyrobotctrlmodule = zcancmder_master::create_xyrobot_ctrl_module(&m_zcanCommnaderMaster, 1); |
|
|
g_xyrobotctrlmodule = zcancmder_master::create_xyrobot_ctrl_module(&m_zcanCommnaderMaster, 1); |
|
|