Browse Source

update

master
zhaohe 2 years ago
parent
commit
6ed00e1c1d
  1. 2
      sdk
  2. 13
      usrc/main.cpp

2
sdk

@ -1 +1 @@
Subproject commit 18d70a8b2ed213738162a5631519ca1e3b8e94e8
Subproject commit 541da22a0f3afd3b6f8b55646d6cca7958512dc0

13
usrc/main.cpp

@ -19,6 +19,7 @@
#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/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\scriptcmder_module\xy_robot_script_cmder_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;
XYRobotScriptCmderModule g_script_xyrobot;
ScriptCmderEq20Servomotor g_script_eq20servomotor;
} // namespace iflytop
#if 0
@ -223,6 +225,9 @@ extern DMA_HandleTypeDef hdma_usart3_tx;
}
extern "C" {}
extern DMA_HandleTypeDef hdma_usart2_rx;
extern DMA_HandleTypeDef hdma_usart2_tx;
extern void step_motor_cmd_reg();
void Main::run() {
/*******************************************************************************
@ -238,7 +243,15 @@ void Main::run() {
m_zcanCommnaderMaster.init(cfg);
g_cmdScheduler.initialize(&DEBUG_UART, 1000);
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
g_xyrobotctrlmodule = zcancmder_master::create_xyrobot_ctrl_module(&m_zcanCommnaderMaster, 1);

Loading…
Cancel
Save