From 5fc1f504ef48eccc931c2a80315ef57e462e3c27 Mon Sep 17 00:00:00 2001 From: zhaohe Date: Sun, 22 Oct 2023 17:26:04 +0800 Subject: [PATCH] update --- api/zi_motor.hpp | 3 +++ api/zi_xymotor.hpp | 2 ++ cmdid.hpp | 44 ++++++++++++++++++++++------------- protocol_parser.cpp | 19 +++++++++++---- protocol_proxy.cpp | 14 +++++++++++ protocol_proxy.hpp | 7 ++++++ zmodule_device_manager.cpp | 14 ++++++++++- zmodule_device_manager.hpp | 12 ++++++++++ zmodule_device_script_cmder_paser.cpp | 10 +++++++- 9 files changed, 103 insertions(+), 22 deletions(-) diff --git a/api/zi_motor.hpp b/api/zi_motor.hpp index b3178cc..4888554 100644 --- a/api/zi_motor.hpp +++ b/api/zi_motor.hpp @@ -24,6 +24,9 @@ class ZIMotor { virtual int32_t motor_move_to_zero_forward(int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime) { return err::koperation_not_support; } virtual int32_t motor_move_to_zero_backward(int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime) { return err::koperation_not_support; } + virtual int32_t motor_move_to_zero_forward_and_calculated_shift(int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime) { return err::koperation_not_support; } + virtual int32_t motor_move_to_zero_backward_and_calculated_shift(int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime) { return err::koperation_not_support; } + virtual int32_t motor_read_pos(int32_t* pos) { return err::koperation_not_support; } virtual int32_t motor_set_current_pos_by_change_shift(int32_t pos) { return err::koperation_not_support; } // Ò»°ãÓÃÓÚ¶æ»ú diff --git a/api/zi_xymotor.hpp b/api/zi_xymotor.hpp index a738ed3..35a01c8 100644 --- a/api/zi_xymotor.hpp +++ b/api/zi_xymotor.hpp @@ -14,5 +14,7 @@ class ZIXYMotor { virtual int32_t xymotor_move_by(int32_t dx, int32_t dy, int32_t motor_velocity) { return err::koperation_not_support; } virtual int32_t xymotor_move_to(int32_t x, int32_t y, int32_t motor_velocity) { return err::koperation_not_support; } virtual int32_t xymotor_move_to_zero() { return err::koperation_not_support; } + virtual int32_t xymotor_move_to_zero_and_calculated_shift() { return err::koperation_not_support; } + virtual int32_t xymotor_read_pos(int32_t *x, int32_t *y) { return err::koperation_not_support; } }; } // namespace iflytop \ No newline at end of file diff --git a/cmdid.hpp b/cmdid.hpp index cd50f55..95c249b 100644 --- a/cmdid.hpp +++ b/cmdid.hpp @@ -21,23 +21,35 @@ typedef enum { kmodule_flush_cfg = CMDID(1, 15), // para:{}, ack:{} kmodule_active_cfg = CMDID(1, 16), // para:{}, ack:{} - kmotor_enable = CMDID(2, 1), // para:{1}, ack:{} - kmotor_rotate = CMDID(2, 2), // para:{1,4}, ack:{} - kmotor_move_by = CMDID(2, 3), // para:{4,4}, ack:{} - kmotor_move_to = CMDID(2, 4), // para:{4,4}, ack:{} - kmotor_rotate_acctime = CMDID(2, 5), // para:{4,4}, ack:{} - kmotor_move_by_acctime = CMDID(2, 6), // para:{4,4}, ack:{} - kmotor_move_to_acctime = CMDID(2, 7), // para:{4,4}, ack:{} - kmotor_move_to_with_torque = CMDID(2, 8), // para:{4,4}, ack:{} - kmotor_move_to_zero_forward = CMDID(2, 9), // para:{4,4,4,4}, ack:{} //int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime - kmotor_move_to_zero_backward = CMDID(2, 10), // para:{4,4,4,4}, ack:{} //int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime - kmotor_read_pos = CMDID(2, 11), // para:{}, ack:{4} - kmotor_set_current_pos_by_change_shift = CMDID(2, 12), // para:{4}, ack:{} + kmotor_enable = CMDID(2, 1), // para:{1}, ack:{} + kmotor_rotate = CMDID(2, 2), // para:{1,4}, ack:{} + kmotor_move_by = CMDID(2, 3), // para:{4,4}, ack:{} + kmotor_move_to = CMDID(2, 4), // para:{4,4}, ack:{} + kmotor_rotate_acctime = CMDID(2, 5), // para:{4,4}, ack:{} + kmotor_move_by_acctime = CMDID(2, 6), // para:{4,4}, ack:{} + kmotor_move_to_acctime = CMDID(2, 7), // para:{4,4}, ack:{} + kmotor_move_to_with_torque = CMDID(2, 8), // para:{4,4}, ack:{} + kmotor_move_to_zero_forward = CMDID(2, 9), // para:{4,4,4,4}, ack:{} //int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime + kmotor_move_to_zero_backward = CMDID(2, 10), // para:{4,4,4,4}, ack:{} //int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime + kmotor_read_pos = CMDID(2, 11), // para:{}, ack:{4} + kmotor_set_current_pos_by_change_shift = CMDID(2, 12), // para:{4}, ack:{} + kmotor_motor_move_to_zero_forward_and_calculated_shift = CMDID(2, 13), // para:{4,4,4,4}, ack:{} //int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime + kmotor_motor_move_to_zero_backward_and_calculated_shift = CMDID(2, 14), // para:{4,4,4,4}, ack:{} //int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime - kxymotor_enable = CMDID(3, 1), // para:{1}, ack:{} - kxymotor_move_by = CMDID(3, 2), // para:{4,4,4}, ack:{} - kxymotor_move_to = CMDID(3, 3), // para:{4,4,4}, ack:{} - kxymotor_move_to_zero = CMDID(3, 4), // para:{}, ack:{} +#if 0 + virtual int32_t xymotor_enable(int32_t enable) { return err::koperation_not_support; } + virtual int32_t xymotor_move_by(int32_t dx, int32_t dy, int32_t motor_velocity) { return err::koperation_not_support; } + virtual int32_t xymotor_move_to(int32_t x, int32_t y, int32_t motor_velocity) { return err::koperation_not_support; } + virtual int32_t xymotor_move_to_zero() { return err::koperation_not_support; } + virtual int32_t xymotor_move_to_zero_and_calculated_shift() { return err::koperation_not_support; } + virtual int32_t xymotor_read_pos(int32_t *x, int32_t *y) { return err::koperation_not_support; } +#endif + kxymotor_enable = CMDID(3, 1), // para:{1}, ack:{} + kxymotor_move_by = CMDID(3, 2), // para:{4,4,4}, ack:{} + kxymotor_move_to = CMDID(3, 3), // para:{4,4,4}, ack:{} + kxymotor_move_to_zero = CMDID(3, 4), // para:{}, ack:{} + kxymotor_move_to_zero_and_calculated_shift = CMDID(3, 5), // para:{4,4,4,4}, ack:{} //int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime + kxymotor_read_pos = CMDID(3, 6), // para:{}, ack:{4,4} } cmdid_t; diff --git a/protocol_parser.cpp b/protocol_parser.cpp index 89f1341..71e27cb 100644 --- a/protocol_parser.cpp +++ b/protocol_parser.cpp @@ -142,9 +142,14 @@ void ZIProtocolParser::onRceivePacket(zcr_cmd_header_t* rxcmd, uint8_t* data, in PROCESS_PACKET_00(kmodule_flush_cfg, ZIModule, module_flush_cfg); PROCESS_PACKET_00(kmodule_active_cfg, ZIModule, module_active_cfg); - /******************************************************************************* - * motor * - *******************************************************************************/ +/******************************************************************************* + * motor * + *******************************************************************************/ +#if 0 + virtual int32_t motor_move_to_zero_forward_and_calculated_shift(int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime) { return err::koperation_not_support; } + virtual int32_t motor_move_to_zero_backward_and_calculated_shift(int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime) { return err::koperation_not_support; } + +#endif PROCESS_PACKET_10(kmotor_enable, ZIMotor, motor_enable); PROCESS_PACKET_30(kmotor_rotate, ZIMotor, motor_rotate); PROCESS_PACKET_30(kmotor_move_by, ZIMotor, motor_move_by); @@ -157,6 +162,8 @@ void ZIProtocolParser::onRceivePacket(zcr_cmd_header_t* rxcmd, uint8_t* data, in PROCESS_PACKET_40(kmotor_move_to_zero_backward, ZIMotor, motor_move_to_zero_backward); PROCESS_PACKET_01(kmotor_read_pos, ZIMotor, motor_read_pos); PROCESS_PACKET_10(kmotor_set_current_pos_by_change_shift, ZIMotor, motor_set_current_pos_by_change_shift); + PROCESS_PACKET_40(kmotor_motor_move_to_zero_forward_and_calculated_shift, ZIMotor, motor_move_to_zero_forward_and_calculated_shift); + PROCESS_PACKET_40(kmotor_motor_move_to_zero_backward_and_calculated_shift, ZIMotor, motor_move_to_zero_backward_and_calculated_shift); /******************************************************************************* * xymotor * @@ -166,10 +173,14 @@ void ZIProtocolParser::onRceivePacket(zcr_cmd_header_t* rxcmd, uint8_t* data, in virtual int32_t xymotor_move_by(int32_t dx, int32_t dy, int32_t motor_velocity) { return err::koperation_not_support; } virtual int32_t xymotor_move_to(int32_t x, int32_t y, int32_t motor_velocity) { return err::koperation_not_support; } virtual int32_t xymotor_move_to_zero() { return err::koperation_not_support; } + virtual int32_t xymotor_move_to_zero_and_calculated_shift() { return err::koperation_not_support; } + virtual int32_t xymotor_read_pos(int32_t *x, int32_t *y) { return err::koperation_not_support; } #endif - + PROCESS_PACKET_10(kxymotor_enable, ZIXYMotor, xymotor_enable); PROCESS_PACKET_30(kxymotor_move_by, ZIXYMotor, xymotor_move_by); PROCESS_PACKET_30(kxymotor_move_to, ZIXYMotor, xymotor_move_to); PROCESS_PACKET_00(kxymotor_move_to_zero, ZIXYMotor, xymotor_move_to_zero); + PROCESS_PACKET_00(kxymotor_move_to_zero_and_calculated_shift, ZIXYMotor, xymotor_move_to_zero_and_calculated_shift); + PROCESS_PACKET_02(kxymotor_read_pos, ZIXYMotor, xymotor_read_pos); } \ No newline at end of file diff --git a/protocol_proxy.cpp b/protocol_proxy.cpp index 8748406..83fe234 100644 --- a/protocol_proxy.cpp +++ b/protocol_proxy.cpp @@ -113,10 +113,24 @@ int32_t ZIProtocolProxy::motor_move_to_zero_backward(int32_t para0, int32_t para int32_t ZIProtocolProxy::motor_read_pos(int32_t *ack0) { PROXY_IMPL_01(kmotor_read_pos); } int32_t ZIProtocolProxy::motor_set_current_pos_by_change_shift(int32_t para0) { PROXY_IMPL_10(kmotor_set_current_pos_by_change_shift); } + +int32_t ZIProtocolProxy::motor_move_to_zero_forward_and_calculated_shift(int32_t para0, int32_t para1, int32_t para2, int32_t para3) { PROXY_IMPL_40(kmotor_motor_move_to_zero_forward_and_calculated_shift); }; +int32_t ZIProtocolProxy::motor_move_to_zero_backward_and_calculated_shift(int32_t para0, int32_t para1, int32_t para2, int32_t para3) { PROXY_IMPL_40(kmotor_motor_move_to_zero_backward_and_calculated_shift); }; + /******************************************************************************* * ZIXYMotor * *******************************************************************************/ +#if 0 + virtual int32_t xymotor_enable(int32_t enable) { return err::koperation_not_support; } + virtual int32_t xymotor_move_by(int32_t dx, int32_t dy, int32_t motor_velocity) { return err::koperation_not_support; } + virtual int32_t xymotor_move_to(int32_t x, int32_t y, int32_t motor_velocity) { return err::koperation_not_support; } + virtual int32_t xymotor_move_to_zero() { return err::koperation_not_support; } + virtual int32_t xymotor_move_to_zero_and_calculated_shift() { return err::koperation_not_support; } + virtual int32_t xymotor_read_pos(int32_t *x, int32_t *y) { return err::koperation_not_support; } +#endif int32_t ZIProtocolProxy::xymotor_enable(int32_t para0) { PROXY_IMPL_10(kxymotor_enable); } int32_t ZIProtocolProxy::xymotor_move_by(int32_t para0, int32_t para1, int32_t para2) { PROXY_IMPL_30(kxymotor_move_by); } int32_t ZIProtocolProxy::xymotor_move_to(int32_t para0, int32_t para1, int32_t para2) { PROXY_IMPL_30(kxymotor_move_to); } int32_t ZIProtocolProxy::xymotor_move_to_zero() { PROXY_IMPL_00(kxymotor_move_to_zero); } +int32_t ZIProtocolProxy::xymotor_move_to_zero_and_calculated_shift() { PROXY_IMPL_00(kxymotor_move_to_zero_and_calculated_shift); } +int32_t ZIProtocolProxy::xymotor_read_pos(int32_t *ack0, int32_t *ack1) { PROXY_IMPL_02(kxymotor_read_pos); } diff --git a/protocol_proxy.hpp b/protocol_proxy.hpp index d4fe565..62f9cf4 100644 --- a/protocol_proxy.hpp +++ b/protocol_proxy.hpp @@ -71,6 +71,9 @@ class ZIProtocolProxy : public ZIMotor, // virtual int32_t motor_read_pos(int32_t *pos) override; virtual int32_t motor_set_current_pos_by_change_shift(int32_t pos) override; + virtual int32_t motor_move_to_zero_forward_and_calculated_shift(int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime) override; + virtual int32_t motor_move_to_zero_backward_and_calculated_shift(int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime) override; + /******************************************************************************* * ZIXYMotor * *******************************************************************************/ @@ -79,11 +82,15 @@ class ZIProtocolProxy : public ZIMotor, // virtual int32_t xymotor_move_by(int32_t dx, int32_t dy, int32_t motor_velocity) { return err::koperation_not_support; } virtual int32_t xymotor_move_to(int32_t x, int32_t y, int32_t motor_velocity) { return err::koperation_not_support; } virtual int32_t xymotor_move_to_zero() { return err::koperation_not_support; } + virtual int32_t xymotor_move_to_zero_and_calculated_shift() { return err::koperation_not_support; } + virtual int32_t xymotor_read_pos(int32_t *x, int32_t *y) { return err::koperation_not_support; } #endif virtual int32_t xymotor_enable(int32_t enable) override; virtual int32_t xymotor_move_by(int32_t dx, int32_t dy, int32_t motor_velocity) override; virtual int32_t xymotor_move_to(int32_t x, int32_t y, int32_t motor_velocity) override; virtual int32_t xymotor_move_to_zero() override; + virtual int32_t xymotor_move_to_zero_and_calculated_shift() override; + virtual int32_t xymotor_read_pos(int32_t *x, int32_t *y) override; }; } // namespace iflytop \ No newline at end of file diff --git a/zmodule_device_manager.cpp b/zmodule_device_manager.cpp index 6a52ff0..7509054 100644 --- a/zmodule_device_manager.cpp +++ b/zmodule_device_manager.cpp @@ -58,10 +58,22 @@ int32_t ZModuleDeviceManager::motor_move_to_zero_forward(uint16_t id, int32_t fi int32_t ZModuleDeviceManager::motor_move_to_zero_backward(uint16_t id, int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime) { PROXY_IMPL(ZIMotor, motor_move_to_zero_backward, findzerospeed, findzeroedge_speed, acc, overtime); } int32_t ZModuleDeviceManager::motor_read_pos(uint16_t id, int32_t *pos) { PROXY_IMPL(ZIMotor, motor_read_pos, pos); } int32_t ZModuleDeviceManager::motor_set_current_pos_by_change_shift(uint16_t id, int32_t pos) { PROXY_IMPL(ZIMotor, motor_set_current_pos_by_change_shift, pos); } +int32_t ZModuleDeviceManager::motor_move_to_zero_forward_and_calculated_shift(uint16_t id, int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime) { PROXY_IMPL(ZIMotor, motor_move_to_zero_forward_and_calculated_shift, findzerospeed, findzeroedge_speed, acc, overtime); } +int32_t ZModuleDeviceManager::motor_move_to_zero_backward_and_calculated_shift(uint16_t id, int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime) { PROXY_IMPL(ZIMotor, motor_move_to_zero_backward_and_calculated_shift, findzerospeed, findzeroedge_speed, acc, overtime); } /******************************************************************************* * ZIXYMotor * *******************************************************************************/ +#if 0 + virtual int32_t xymotor_enable(int32_t enable) { return err::koperation_not_support; } + virtual int32_t xymotor_move_by(int32_t dx, int32_t dy, int32_t motor_velocity) { return err::koperation_not_support; } + virtual int32_t xymotor_move_to(int32_t x, int32_t y, int32_t motor_velocity) { return err::koperation_not_support; } + virtual int32_t xymotor_move_to_zero() { return err::koperation_not_support; } + virtual int32_t xymotor_move_to_zero_and_calculated_shift() { return err::koperation_not_support; } + virtual int32_t xymotor_read_pos(int32_t *x, int32_t *y) { return err::koperation_not_support; } +#endif int32_t ZModuleDeviceManager::xymotor_enable(uint16_t id, int32_t enable) { PROXY_IMPL(ZIXYMotor, xymotor_enable, enable); } int32_t ZModuleDeviceManager::xymotor_move_by(uint16_t id, int32_t dx, int32_t dy, int32_t motor_velocity) { PROXY_IMPL(ZIXYMotor, xymotor_move_by, dx, dy, motor_velocity); } int32_t ZModuleDeviceManager::xymotor_move_to(uint16_t id, int32_t x, int32_t y, int32_t motor_velocity) { PROXY_IMPL(ZIXYMotor, xymotor_move_to, x, y, motor_velocity); } -int32_t ZModuleDeviceManager::xymotor_move_to_zero(uint16_t id) { PROXY_IMPL(ZIXYMotor, xymotor_move_to_zero); } \ No newline at end of file +int32_t ZModuleDeviceManager::xymotor_move_to_zero(uint16_t id) { PROXY_IMPL(ZIXYMotor, xymotor_move_to_zero); } +int32_t ZModuleDeviceManager::xymotor_move_to_zero_and_calculated_shift(uint16_t id) { PROXY_IMPL(ZIXYMotor, xymotor_move_to_zero_and_calculated_shift); } +int32_t ZModuleDeviceManager::xymotor_read_pos(uint16_t id, int32_t *x, int32_t *y) { PROXY_IMPL(ZIXYMotor, xymotor_read_pos, x, y); } diff --git a/zmodule_device_manager.hpp b/zmodule_device_manager.hpp index 9c87acd..8709e7c 100644 --- a/zmodule_device_manager.hpp +++ b/zmodule_device_manager.hpp @@ -83,6 +83,11 @@ class ZModuleDeviceManager { * ZIMotor * *******************************************************************************/ +#if 0 + virtual int32_t motor_move_to_zero_forward_and_calculated_shift(int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime) override; + virtual int32_t motor_move_to_zero_backward_and_calculated_shift(int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime) override; +#endif + int32_t motor_enable(uint16_t id, int32_t enable); int32_t motor_rotate(uint16_t id, int32_t direction, int32_t motor_velocity, int32_t acc); int32_t motor_move_by(uint16_t id, int32_t distance, int32_t motor_velocity, int32_t acc); @@ -95,6 +100,8 @@ class ZModuleDeviceManager { int32_t motor_move_to_with_torque(uint16_t id, int32_t pos, int32_t torque); int32_t motor_read_pos(uint16_t id, int32_t *pos); int32_t motor_set_current_pos_by_change_shift(uint16_t id, int32_t pos); + int32_t motor_move_to_zero_forward_and_calculated_shift(uint16_t id, int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime); + int32_t motor_move_to_zero_backward_and_calculated_shift(uint16_t id, int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime); /******************************************************************************* * ZIXYMotor * @@ -104,11 +111,16 @@ class ZModuleDeviceManager { virtual int32_t xymotor_move_by(int32_t dx, int32_t dy, int32_t motor_velocity) { return err::koperation_not_support; } virtual int32_t xymotor_move_to(int32_t x, int32_t y, int32_t motor_velocity) { return err::koperation_not_support; } virtual int32_t xymotor_move_to_zero() { return err::koperation_not_support; } + virtual int32_t xymotor_move_to_zero_and_calculated_shift() { return err::koperation_not_support; } + virtual int32_t xymotor_read_pos(int32_t *x, int32_t *y) { return err::koperation_not_support; } #endif int32_t xymotor_enable(uint16_t id, int32_t enable); int32_t xymotor_move_by(uint16_t id, int32_t dx, int32_t dy, int32_t motor_velocity); int32_t xymotor_move_to(uint16_t id, int32_t x, int32_t y, int32_t motor_velocity); int32_t xymotor_move_to_zero(uint16_t id); + int32_t xymotor_move_to_zero_and_calculated_shift(uint16_t id); + int32_t xymotor_read_pos(uint16_t id, int32_t *x, int32_t *y); + private: template diff --git a/zmodule_device_script_cmder_paser.cpp b/zmodule_device_script_cmder_paser.cpp index 17595bd..13c3a07 100644 --- a/zmodule_device_script_cmder_paser.cpp +++ b/zmodule_device_script_cmder_paser.cpp @@ -89,7 +89,8 @@ void ZModuleDeviceScriptCmderPaser::initialize(ICmdParser* cancmder, ZModuleDevi int32_t motor_move_to_with_torque(uint16_t id, int32_t pos, int32_t torque); int32_t motor_read_pos(uint16_t id, int32_t *pos); int32_t motor_set_current_pos_by_change_shift(uint16_t id, int32_t pos); - + virtual int32_t motor_move_to_zero_forward_and_calculated_shift(int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime) override; + virtual int32_t motor_move_to_zero_backward_and_calculated_shift(int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime) override; #endif PROCESS_PACKET_10(module_stop, "module_stop (mid)"); @@ -125,14 +126,21 @@ void ZModuleDeviceScriptCmderPaser::initialize(ICmdParser* cancmder, ZModuleDevi PROCESS_PACKET_11(motor_read_pos, "motor_read_pos (mid)"); PROCESS_PACKET_20(motor_set_current_pos_by_change_shift, "motor_set_current_pos_by_change_shift (mid, pos)"); + PROCESS_PACKET_50(motor_move_to_zero_forward_and_calculated_shift, "motor_move_to_zero_forward_and_calculated_shift (mid, findzerospeed, findzeroedge_speed, acc, overtime)"); + PROCESS_PACKET_50(motor_move_to_zero_backward_and_calculated_shift, "motor_move_to_zero_backward_and_calculated_shift (mid, findzerospeed, findzeroedge_speed, acc, overtime)"); + #if 0 virtual int32_t xymotor_enable(int32_t enable) { return err::koperation_not_support; } virtual int32_t xymotor_move_by(int32_t dx, int32_t dy, int32_t motor_velocity) { return err::koperation_not_support; } virtual int32_t xymotor_move_to(int32_t x, int32_t y, int32_t motor_velocity) { return err::koperation_not_support; } virtual int32_t xymotor_move_to_zero() { return err::koperation_not_support; } + virtual int32_t xymotor_move_to_zero_and_calculated_shift() { return err::koperation_not_support; } + virtual int32_t xymotor_read_pos(int32_t *x, int32_t *y) { return err::koperation_not_support; } #endif PROCESS_PACKET_20(xymotor_enable, "xymotor_enable (mid, enable)"); PROCESS_PACKET_40(xymotor_move_by, "xymotor_move_by (mid, dx, dy, motor_velocity)"); PROCESS_PACKET_40(xymotor_move_to, "xymotor_move_to (mid, x, y, motor_velocity)"); PROCESS_PACKET_10(xymotor_move_to_zero, "xymotor_move_to_zero (mid)"); + PROCESS_PACKET_10(xymotor_move_to_zero_and_calculated_shift, "xymotor_move_to_zero_and_calculated_shift (mid)"); + PROCESS_PACKET_12(xymotor_read_pos, "xymotor_read_pos (mid)"); }