diff --git a/components/xy_robot_ctrl_module/xy_robot_ctrl_module.hpp b/components/xy_robot_ctrl_module/xy_robot_ctrl_module.hpp index ef92488..f671bc6 100644 --- a/components/xy_robot_ctrl_module/xy_robot_ctrl_module.hpp +++ b/components/xy_robot_ctrl_module/xy_robot_ctrl_module.hpp @@ -4,6 +4,8 @@ #include "sdk\components\tmc\basic\tmc_ic_interface.hpp" #include "sdk\components\zcancmder\zcanreceiver.hpp" +#include "sdk\components\zcancmder\cmd\cmd.hpp" + namespace iflytop { class XYRobotCtrlModule { public: @@ -55,7 +57,7 @@ class XYRobotCtrlModule { int32_t set_dec(int32_t dec); int32_t set_speed(int32_t speed); int32_t set_zero_robottype(RobotType_t robot_type); - int32_t set_shaft(bool x_shaft, bool y_shaft) ; + int32_t set_shaft(bool x_shaft, bool y_shaft); int32_t set_zero_shift(int32_t x, int32_t y); int32_t set_runtozero_max_distance(int32_t maxX, int32_t maxY); int32_t set_runtozero_speed(int32_t speed); diff --git a/components/zcancmder/cmd/basic.hpp b/components/zcancmder_2/cmd/basic.hpp similarity index 100% rename from components/zcancmder/cmd/basic.hpp rename to components/zcancmder_2/cmd/basic.hpp diff --git a/components/zcancmder/cmd/cmd.hpp b/components/zcancmder_2/cmd/cmd.hpp similarity index 98% rename from components/zcancmder/cmd/cmd.hpp rename to components/zcancmder_2/cmd/cmd.hpp index f4ce84f..d5848dd 100644 --- a/components/zcancmder/cmd/cmd.hpp +++ b/components/zcancmder_2/cmd/cmd.hpp @@ -166,11 +166,11 @@ typedef enum { kcmd_pipette_module_z_motor_move_to_zero = CMDID(1016, 2), // 归零 kcmd_pipette_module_z_motor_move_to_zero_with_calibrate = CMDID(1016, 3), // 归零并校准 kcmd_pipette_module_z_motor_stop = CMDID(1016, 4), // 停止 - - kcmd_pipette_module_take_liquid = CMDID(1016, 4), // 取液体 - kcmd_pipette_module_split_liquid = CMDID(1016, 5), // 吐液体 - kcmd_pipette_module_take_tip = CMDID(1016, 6), // 取tip - kcmd_pipette_module_remove_tip = CMDID(1016, 7), // 移除tip + + kcmd_pipette_module_take_liquid = CMDID(1016, 4), // 取液体 + kcmd_pipette_module_split_liquid = CMDID(1016, 5), // 吐液体 + kcmd_pipette_module_take_tip = CMDID(1016, 6), // 取tip + kcmd_pipette_module_remove_tip = CMDID(1016, 7), // 移除tip kcmd_pipette_module_read_version = CMDID(1016, 50), // 读取模块型号版本信息 kcmd_pipette_module_read_status = CMDID(1016, 51), // 读取模块精简状态信息 @@ -203,6 +203,7 @@ ZPACKET_CMD_ACK(kcmd_readadc_raw, // /******************************************************************************* * |Module_1006:XYRobot机器人控制模组 * *******************************************************************************/ +// ACTION ZPACKET_CMD_ACK(kcmd_xy_robot_ctrl_enable, CMD(u8 id; u8 enable;), // ACK(u8 id;)); @@ -225,15 +226,17 @@ ZPACKET_CMD_ACK_AND_REPORT(kcmd_xy_robot_ctrl_move_by, CMD(u8 id; s32 dx; s32 dy; s32 speed;), // ACK(u8 id;), // REPORT(u8 id; u8 status; s32 dx; s32 dy;)); +// READ ZPACKET_CMD_ACK(kcmd_xy_robot_ctrl_read_version, // CMD(u8 id;), // - ACK(u8 id;)); + ACK(u8 id; u32 version;)); ZPACKET_CMD_ACK(kcmd_xy_robot_ctrl_read_status, // CMD(u8 id;), // - ACK(u8 id;)); + ACK(u8 id; u8 status; s32 x; s32 y;)); ZPACKET_CMD_ACK(kcmd_xy_robot_ctrl_read_debug_info, // CMD(u8 id;), // - ACK(u8 id;)); + ACK(u8 id; u8 status; s32 x; s32 y;)); +// SET ZPACKET_CMD_ACK(kcmd_xy_robot_ctrl_set_run_param, // CMD(u8 id; u8 opt_type; u8 shaft; s32 distance_scale; s32 shift_x; s32 shift_y; s32 acc; s32 dec; s32 maxspeed; s32 min_x; s32 max_x; s32 min_y; s32 max_y;), // @@ -483,7 +486,6 @@ ZPACKET_CMD_ACK(kcmd_fan_module_fan_read_debug_info, * |Module_1016:移液枪控制 * *******************************************************************************/ - ZPACKET_CMD_ACK(kcmd_pipette_module_motor_enable, CMD(u8 id; u8 enable;), // ACK(u8 id;)); diff --git a/components/zcancmder/zcanreceiver.cpp b/components/zcancmder_2/zcanreceiver.cpp similarity index 100% rename from components/zcancmder/zcanreceiver.cpp rename to components/zcancmder_2/zcanreceiver.cpp diff --git a/components/zcancmder/zcanreceiver.hpp b/components/zcancmder_2/zcanreceiver.hpp similarity index 100% rename from components/zcancmder/zcanreceiver.hpp rename to components/zcancmder_2/zcanreceiver.hpp