|
@ -6,15 +6,22 @@ |
|
|
//
|
|
|
//
|
|
|
#include "feite_servo_motor.hpp"
|
|
|
#include "feite_servo_motor.hpp"
|
|
|
#include "sdk/os/zos.hpp"
|
|
|
#include "sdk/os/zos.hpp"
|
|
|
|
|
|
//
|
|
|
#include "sdk\components\cmdscheduler\cmd_scheduler.hpp"
|
|
|
#include "sdk\components\cmdscheduler\cmd_scheduler.hpp"
|
|
|
#include "sdk\components\eq_20_asb_motor\eq20_servomotor.hpp"
|
|
|
#include "sdk\components\eq_20_asb_motor\eq20_servomotor.hpp"
|
|
|
#include "sdk\components\iflytop_can_slave_module_master_end\stepmotor.hpp"
|
|
|
#include "sdk\components\iflytop_can_slave_module_master_end\stepmotor.hpp"
|
|
|
#include "sdk\components\iflytop_can_slave_v1\iflytop_can_master.hpp"
|
|
|
#include "sdk\components\iflytop_can_slave_v1\iflytop_can_master.hpp"
|
|
|
#include "sdk\components\scriptcmder_module\xy_robot_script_cmder_module.hpp"
|
|
|
|
|
|
#include "sdk\components\step_motor_45\step_motor_45.hpp"
|
|
|
#include "sdk\components\step_motor_45\step_motor_45.hpp"
|
|
|
#include "sdk\components\step_motor_45\step_motor_45_scheduler.hpp"
|
|
|
#include "sdk\components\step_motor_45\step_motor_45_scheduler.hpp"
|
|
|
#include "sdk\components\zcancmder\zcanreceiver_master.hpp"
|
|
|
#include "sdk\components\zcancmder\zcanreceiver_master.hpp"
|
|
|
#include "sdk\components\zcancmder_master_module\zcan_xy_robot_master_module.hpp"
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
#include "sdk\components/step_motor_ctrl_module/step_motor_ctrl_script_cmder_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/zcan_xy_robot_master_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_xy_robot_master_module.hpp"
|
|
|
|
|
|
|
|
|
#define TAG "main"
|
|
|
#define TAG "main"
|
|
|
namespace iflytop { |
|
|
namespace iflytop { |
|
@ -123,16 +130,19 @@ static StepMotor45::cfg_t cfg6 = { |
|
|
* ´úÂë * |
|
|
* ´úÂë * |
|
|
*******************************************************************************/ |
|
|
*******************************************************************************/ |
|
|
namespace iflytop { |
|
|
namespace iflytop { |
|
|
StepMotor45 g_step_motor45[7]; |
|
|
|
|
|
StepMotor g_step_motor[10]; |
|
|
|
|
|
ZCanCommnaderMaster m_zcanCommnaderMaster; |
|
|
|
|
|
CmdScheduler cmdScheduler; |
|
|
|
|
|
XYRobotScriptCmderModule xyRobotScriptCmderModule; |
|
|
|
|
|
|
|
|
StepMotor45 g_step_motor45[7]; |
|
|
|
|
|
StepMotor g_step_motor[10]; |
|
|
|
|
|
ZCanCommnaderMaster m_zcanCommnaderMaster; |
|
|
|
|
|
CmdScheduler cmdScheduler; |
|
|
|
|
|
XYRobotScriptCmderModule xyRobotScriptCmderModule; |
|
|
|
|
|
StepMotorCtrlScriptCmderModule stepMotorCtrlScriptCmderModule; |
|
|
|
|
|
|
|
|
|
|
|
I_XYRobotCtrlModule* g_xyrobotctrlmodule = nullptr; |
|
|
|
|
|
I_StepMotorCtrlModule* g_stepmotorctrlmodule = nullptr; |
|
|
|
|
|
|
|
|
ModbusBlockHost g_modbusblockhost; |
|
|
|
|
|
Eq20ServoMotor g_eq20servomotor; |
|
|
|
|
|
FeiTeServoMotor g_feiteservomotor; |
|
|
|
|
|
I_XYRobotCtrlModule* g_xyrobotctrlmodule = nullptr; |
|
|
|
|
|
|
|
|
ModbusBlockHost g_modbusblockhost; |
|
|
|
|
|
Eq20ServoMotor g_eq20servomotor; |
|
|
|
|
|
FeiTeServoMotor g_feiteservomotor; |
|
|
|
|
|
|
|
|
} // namespace iflytop
|
|
|
} // namespace iflytop
|
|
|
|
|
|
|
|
@ -215,12 +225,18 @@ void Main::run() { |
|
|
auto* cfg = m_zcanCommnaderMaster.createCFG(); |
|
|
auto* cfg = m_zcanCommnaderMaster.createCFG(); |
|
|
m_zcanCommnaderMaster.init(cfg); |
|
|
m_zcanCommnaderMaster.init(cfg); |
|
|
g_xyrobotctrlmodule = zcancmder_master::create_xyrobot_ctrl_module(&m_zcanCommnaderMaster, 1); |
|
|
g_xyrobotctrlmodule = zcancmder_master::create_xyrobot_ctrl_module(&m_zcanCommnaderMaster, 1); |
|
|
g_xyrobotctrlmodule->enable(false); |
|
|
|
|
|
|
|
|
// g_xyrobotctrlmodule->enable(false);
|
|
|
|
|
|
|
|
|
|
|
|
g_stepmotorctrlmodule = zcancmder_master::create_zcan_master_step_motor_ctrl_module(&m_zcanCommnaderMaster, 1); |
|
|
|
|
|
// g_stepmotorctrlmodule->rotate(300000, 0, [this](int32_t end) {});
|
|
|
|
|
|
|
|
|
cmdScheduler.initialize(&DEBUG_UART, 1000); |
|
|
cmdScheduler.initialize(&DEBUG_UART, 1000); |
|
|
xyRobotScriptCmderModule.initialize(&cmdScheduler); |
|
|
xyRobotScriptCmderModule.initialize(&cmdScheduler); |
|
|
xyRobotScriptCmderModule.regXYRobot(1, g_xyrobotctrlmodule); |
|
|
xyRobotScriptCmderModule.regXYRobot(1, g_xyrobotctrlmodule); |
|
|
|
|
|
|
|
|
|
|
|
stepMotorCtrlScriptCmderModule.initialize(&cmdScheduler); |
|
|
|
|
|
stepMotorCtrlScriptCmderModule.regmodule(1, g_stepmotorctrlmodule); |
|
|
|
|
|
|
|
|
regfn(); |
|
|
regfn(); |
|
|
|
|
|
|
|
|
#if 0
|
|
|
#if 0
|
|
|