正点原子开发板 alientek_develop_board cancmder
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

346 lines
19 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. #include "intelligent_winding_robot_ctrl.hpp"
  2. #include <stdlib.h>
  3. #include <string.h>
  4. using namespace std;
  5. using namespace iflytop;
  6. #define TAG "IntelligentWindingRobotCtrl"
  7. #define DO(exptr) \
  8. { \
  9. int32_t ret = exptr; \
  10. if (ret != 0) { \
  11. return ret; \
  12. } \
  13. }
  14. void IntelligentWindingRobotCtrl::processError(int32_t err) { ZLOGE(TAG, "processError: %d", err); }
  15. void IntelligentWindingRobotCtrl::wait_module_idle(int32_t moduleid) {
  16. while (true) {
  17. int32_t status = 0;
  18. int32_t ecode = m_dm->module_get_status(moduleid, &status);
  19. if (ecode != 0) {
  20. processError(ecode);
  21. break;
  22. };
  23. if (status == 0) break;
  24. if (status == 2) {
  25. processError(err::kfail);
  26. break;
  27. };
  28. zos_delay(100);
  29. }
  30. }
  31. int32_t IntelligentWindingRobotCtrl::initialize_device() { return 0; }
  32. // �ŷ϶���
  33. int32_t IntelligentWindingRobotCtrl::paifei_duoji_moveto_reset() {
  34. ZLOGI(TAG, "paifei_duoji_moveto_reset %d %d %d", 15, cfg.paifei_duoji_reset_pos, 330);
  35. DO(m_dm->motor_move_to(15, cfg.paifei_duoji_reset_pos, 2000, 0));
  36. wait_module_idle(15);
  37. return 0;
  38. }
  39. int32_t IntelligentWindingRobotCtrl::paifei_duoji_moveto_press() {
  40. ZLOGI(TAG, "paifei_duoji_moveto_press %d %d %d", 15, cfg.paifei_duoji_press_pos, cfg.paifei_duoji_press_torque);
  41. DO(m_dm->motor_move_to_with_torque(15, cfg.paifei_duoji_press_pos, cfg.paifei_duoji_press_torque));
  42. wait_module_idle(15);
  43. }
  44. /**
  45. * @brief ̽
  46. */
  47. int32_t IntelligentWindingRobotCtrl::raoxiantance_duoji_move_to_reset() {
  48. ZLOGI(TAG, "raoxiantance_duoji_move_to_reset %d %d %d", 14, cfg.raoxiantance_duoji_reset_pos, 330);
  49. DO(m_dm->motor_move_to(14, cfg.raoxiantance_duoji_reset_pos, 2000, 0));
  50. wait_module_idle(14);
  51. return 0;
  52. }
  53. int32_t IntelligentWindingRobotCtrl::raoxiantance_duoji_move_to_get_thickness(int32_t* thickness) {
  54. ZLOGI(TAG, "raoxiantance_duoji_move_to_get_thickness %d %d", 14, cfg.raoxiantance_duoji_tance_zero_pos);
  55. DO(m_dm->motor_move_to_with_torque(14, cfg.raoxiantance_duoji_tance_zero_pos, 200));
  56. zos_delay(2000);
  57. int32_t nowpos = 0;
  58. DO(m_dm->motor_read_pos(14, &nowpos));
  59. *thickness = cfg.raoxiantance_duoji_tance_zero_pos - nowpos;
  60. DO(raoxiantance_duoji_move_to_reset());
  61. return 0;
  62. }
  63. /**
  64. * @brief ѹ߶
  65. */
  66. int32_t IntelligentWindingRobotCtrl::yaxian_duoji_move_to_reset() {
  67. ZLOGI(TAG, "yaxian_duoji_move_to_reset %d %d %d", 13, cfg.yaxian_duoji_reset_pos, 330);
  68. DO(m_dm->motor_move_to(13, cfg.yaxian_duoji_reset_pos, 2000, 0));
  69. wait_module_idle(13);
  70. return 0;
  71. }
  72. int32_t IntelligentWindingRobotCtrl::yaxian_duoji_move_to_press_pos() {
  73. ZLOGI(TAG, "yaxian_duoji_move_to_press_pos %d %d %d", 13, cfg.yaxian_duoji_press_pos, cfg.yaxian_duoji_press_torque);
  74. DO(m_dm->motor_move_to_with_torque(13, cfg.yaxian_duoji_press_pos, cfg.yaxian_duoji_press_torque));
  75. wait_module_idle(13);
  76. return 0;
  77. }
  78. int32_t IntelligentWindingRobotCtrl::yaxian_duoji_move_to_wait_for_press_pos() {
  79. ZLOGI(TAG, "yaxian_duoji_move_to_wait_for_press_pos %d %d %d", 13, cfg.yaxian_duoji_wait_for_press_pos, cfg.yaxian_duoji_press_torque);
  80. DO(m_dm->motor_move_to_with_torque(13, cfg.yaxian_duoji_wait_for_press_pos, cfg.yaxian_duoji_press_torque));
  81. wait_module_idle(13);
  82. return 0;
  83. }
  84. /**
  85. * @brief
  86. */
  87. int32_t IntelligentWindingRobotCtrl::xianlajin_duoji_move_to_reset() {
  88. ZLOGI(TAG, "xianlajin_duoji_move_to_reset %d %d %d", 12, cfg.xianlajin_duoji_reset_pos, 330);
  89. DO(m_dm->motor_move_to(16, cfg.xianlajin_duoji_reset_pos, 2000, 0));
  90. wait_module_idle(16);
  91. return 0;
  92. } // ��λ
  93. int32_t IntelligentWindingRobotCtrl::xianlajin_duoji_move_to_line_entry_pos() {
  94. ZLOGI(TAG, "xianlajin_duoji_move_to_line_entry_pos %d %d %d", 16, cfg.xianlajin_duoji_line_entry_pos, 330);
  95. DO(m_dm->motor_move_to(16, cfg.xianlajin_duoji_line_entry_pos, 2000, 0));
  96. wait_module_idle(16);
  97. return 0;
  98. } // ����λ
  99. int32_t IntelligentWindingRobotCtrl::xianlajin_duoji_move_to_tight_line_pos() {
  100. ZLOGI(TAG, "xianlajin_duoji_move_to_tight_line_pos %d %d %d", 16, cfg.xianlajin_duoji_tight_line_pos, 330);
  101. DO(m_dm->motor_move_to(16, cfg.xianlajin_duoji_tight_line_pos, 2000, 0));
  102. wait_module_idle(16);
  103. return 0;
  104. } // �����
  105. int32_t IntelligentWindingRobotCtrl::xianlajin_duoji_move_to_loose_line_pos() {
  106. ZLOGI(TAG, "xianlajin_duoji_move_to_loose_line_pos %d %d %d", 16, cfg.xianlajin_duoji_loose_line_pos, 330);
  107. DO(m_dm->motor_move_to(16, cfg.xianlajin_duoji_loose_line_pos, 2000, 0));
  108. wait_module_idle(16);
  109. return 0;
  110. } // �����
  111. /**
  112. * @brief ߶12
  113. */
  114. int32_t IntelligentWindingRobotCtrl::jiaxian_duoji_move_to_reset_pos() {
  115. ZLOGI(TAG, "jiaxian_duoji_move_to_reset_pos %d %d %d", 12, cfg.jiaxian_duoji_reset_pos, 330);
  116. DO(m_dm->motor_move_to(12, cfg.jiaxian_duoji_reset_pos, 2000, 0));
  117. wait_module_idle(12);
  118. return 0;
  119. }
  120. int32_t IntelligentWindingRobotCtrl::jiaxian_duoji_move_to_clamp_pos() {
  121. ZLOGI(TAG, "jiaxian_duoji_move_to_clamp_pos %d %d %d", 12, cfg.jiaxian_duoji_clamp_pos, cfg.jiaxian_duoji_clamp_torque);
  122. DO(m_dm->motor_move_to_with_torque(12, cfg.jiaxian_duoji_clamp_pos, cfg.jiaxian_duoji_clamp_torque));
  123. wait_module_idle(12);
  124. return 0;
  125. }
  126. /**
  127. * @brief
  128. */
  129. int32_t IntelligentWindingRobotCtrl::scissors_move_reset_pos() {
  130. // ZLOGI(TAG, "scissors_move_reset_pos %d", 11);
  131. ZLOGI(TAG, "scissors_move_reset_pos");
  132. return 0;
  133. } // block
  134. int32_t IntelligentWindingRobotCtrl::scissors_cut() {
  135. ZLOGI(TAG, "scissors_cut %d", 22);
  136. DO(m_dm->motor_move_by(22, 4095, 0, 0));
  137. wait_module_idle(22);
  138. return 0;
  139. } // block
  140. /**
  141. * @brief еۼ߶
  142. */
  143. int32_t IntelligentWindingRobotCtrl::arm_jiaxian_duoji_move_to_reset_pos() {
  144. ZLOGI(TAG, "arm_jiaxian_duoji_move_to_reset_pos %d %d %d", 11, cfg.arm_jiaxian_duoji_reset_pos, 330);
  145. DO(m_dm->motor_move_to(11, cfg.arm_jiaxian_duoji_reset_pos, 2000, 0));
  146. wait_module_idle(11);
  147. return 0;
  148. }
  149. int32_t IntelligentWindingRobotCtrl::arm_jiaxian_duoji_move_to_clamp_pos() {
  150. ZLOGI(TAG, "arm_jiaxian_duoji_move_to_clamp_pos %d %d %d", 11, cfg.arm_jiaxian_duoji_clamp_pos, cfg.arm_jiaxian_duoji_clamp_torque);
  151. DO(m_dm->motor_move_to_with_torque(11, cfg.arm_jiaxian_duoji_clamp_pos, cfg.arm_jiaxian_duoji_clamp_torque));
  152. wait_module_idle(11);
  153. return 0;
  154. }
  155. /**
  156. * @brief е۹צ
  157. */
  158. int32_t IntelligentWindingRobotCtrl::arm_hook_claws_reset() {
  159. ZLOGI(TAG, "arm_hook_claws_reset");
  160. DO(m_dm->motor_move_to_zero_backward(21, 0, 0, 0, 0));
  161. wait_module_idle(21);
  162. return 0;
  163. }
  164. int32_t IntelligentWindingRobotCtrl::arm_hook_claws_move_to_half_pos() {
  165. ZLOGI(TAG, "arm_hook_claws_move_to_half_pos");
  166. DO(m_dm->motor_move_to(21, cfg.arm_hook_claws_half_pos, 0, 0));
  167. wait_module_idle(21);
  168. return 0;
  169. }
  170. int32_t IntelligentWindingRobotCtrl::arm_hook_claws_move_to_full_pos() {
  171. ZLOGI(TAG, "arm_hook_claws_move_to_full_pos");
  172. DO(m_dm->motor_move_to(21, cfg.arm_hook_claws_full_pos, 0, 0));
  173. wait_module_idle(21);
  174. return 0;
  175. }
  176. int32_t IntelligentWindingRobotCtrl::main_shaft_run() {
  177. ZLOGI(TAG, "main_shaft_run");
  178. DO(m_dm->motor_rotate_acctime(2, 1, 1000, 10000));
  179. return 0;
  180. }
  181. int32_t IntelligentWindingRobotCtrl::main_shaft_stop() {
  182. ZLOGI(TAG, "main_shaft_stop");
  183. DO(m_dm->module_stop(2));
  184. return 0;
  185. }
  186. /**
  187. * @brief XYƽ̨
  188. */
  189. int32_t IntelligentWindingRobotCtrl::xy_platform_reset() { return 0; }
  190. /**
  191. * @brief Z
  192. */
  193. int32_t IntelligentWindingRobotCtrl::z_axis_reset() { return 0; }
  194. int32_t IntelligentWindingRobotCtrl::z_axis_move_to(int32_t pos) { return 0; }
  195. int32_t IntelligentWindingRobotCtrl::xy_reset() { return 0; } // ��λ
  196. int32_t IntelligentWindingRobotCtrl::xy_move_to_zero() { return 0; } // �ƶ�����λ
  197. int32_t IntelligentWindingRobotCtrl::xy_take_clip(int32_t index) { return 0; } // ȡ����
  198. int32_t IntelligentWindingRobotCtrl::xy_take_line() { return 0; } // ȡ��
  199. int32_t IntelligentWindingRobotCtrl::xy_take_back_clip() { return 0; } // �ŵ���
  200. int32_t IntelligentWindingRobotCtrl::xy_remove_line() { return 0; } // �Ƴ���
  201. int32_t IntelligentWindingRobotCtrl::do_reset_device() {
  202. }
  203. int32_t IntelligentWindingRobotCtrl::do_winding(int32_t index) {}
  204. /**
  205. * @brief
  206. */
  207. int32_t IntelligentWindingRobotCtrl::start_winding() { return 0; }
  208. int32_t IntelligentWindingRobotCtrl::stop_winding() { return 0; }
  209. int32_t IntelligentWindingRobotCtrl::reset_and_check_device() { return 0; }
  210. int32_t IntelligentWindingRobotCtrl::setcfg(const char* cfgname, int32_t cfgvalue) {
  211. if (strcmp(cfgname, "paifei_duoji_reset_pos") == 0)
  212. cfg.paifei_duoji_reset_pos = cfgvalue;
  213. else if (strcmp(cfgname, "paifei_duoji_press_pos") == 0)
  214. cfg.paifei_duoji_press_pos = cfgvalue;
  215. else if (strcmp(cfgname, "paifei_duoji_press_torque") == 0)
  216. cfg.paifei_duoji_press_torque = cfgvalue;
  217. else if (strcmp(cfgname, "raoxiantance_duoji_reset_pos") == 0)
  218. cfg.raoxiantance_duoji_reset_pos = cfgvalue;
  219. else if (strcmp(cfgname, "raoxiantance_duoji_tance_zero_pos") == 0)
  220. cfg.raoxiantance_duoji_tance_zero_pos = cfgvalue;
  221. else if (strcmp(cfgname, "yaxian_duoji_reset_pos") == 0)
  222. cfg.yaxian_duoji_reset_pos = cfgvalue;
  223. else if (strcmp(cfgname, "yaxian_duoji_press_pos") == 0)
  224. cfg.yaxian_duoji_press_pos = cfgvalue;
  225. else if (strcmp(cfgname, "yaxian_duoji_press_torque") == 0)
  226. cfg.yaxian_duoji_press_torque = cfgvalue;
  227. else if (strcmp(cfgname, "yaxian_duoji_wait_for_press_pos") == 0)
  228. cfg.yaxian_duoji_wait_for_press_pos = cfgvalue;
  229. else if (strcmp(cfgname, "xianlajin_duoji_reset_pos") == 0)
  230. cfg.xianlajin_duoji_reset_pos = cfgvalue;
  231. else if (strcmp(cfgname, "xianlajin_duoji_line_entry_pos") == 0)
  232. cfg.xianlajin_duoji_line_entry_pos = cfgvalue;
  233. else if (strcmp(cfgname, "xianlajin_duoji_tight_line_pos") == 0)
  234. cfg.xianlajin_duoji_tight_line_pos = cfgvalue;
  235. else if (strcmp(cfgname, "xianlajin_duoji_loose_line_pos") == 0)
  236. cfg.xianlajin_duoji_loose_line_pos = cfgvalue;
  237. else if (strcmp(cfgname, "jiaxian_duoji_reset_pos") == 0)
  238. cfg.jiaxian_duoji_reset_pos = cfgvalue;
  239. else if (strcmp(cfgname, "jiaxian_duoji_clamp_pos") == 0)
  240. cfg.jiaxian_duoji_clamp_pos = cfgvalue;
  241. else if (strcmp(cfgname, "jiaxian_duoji_clamp_torque") == 0)
  242. cfg.jiaxian_duoji_clamp_torque = cfgvalue;
  243. else if (strcmp(cfgname, "arm_jiaxian_duoji_reset_pos") == 0)
  244. cfg.arm_jiaxian_duoji_reset_pos = cfgvalue;
  245. else if (strcmp(cfgname, "arm_jiaxian_duoji_clamp_pos") == 0)
  246. cfg.arm_jiaxian_duoji_clamp_pos = cfgvalue;
  247. else if (strcmp(cfgname, "arm_jiaxian_duoji_clamp_torque") == 0)
  248. cfg.arm_jiaxian_duoji_clamp_torque = cfgvalue;
  249. else if (strcmp(cfgname, "scissors_reset_pos") == 0)
  250. cfg.scissors_reset_pos = cfgvalue;
  251. else if (strcmp(cfgname, "scissors_cut_pos") == 0)
  252. cfg.scissors_cut_pos = cfgvalue;
  253. else if (strcmp(cfgname, "arm_hook_claws_half_pos") == 0)
  254. cfg.arm_hook_claws_half_pos = cfgvalue;
  255. else if (strcmp(cfgname, "arm_hook_claws_full_pos") == 0)
  256. cfg.arm_hook_claws_full_pos = cfgvalue;
  257. return 0;
  258. }
  259. int32_t IntelligentWindingRobotCtrl::dumpcfg() {
  260. ZLOGI(TAG, "paifei_duoji_reset_pos %d", cfg.paifei_duoji_reset_pos);
  261. ZLOGI(TAG, "paifei_duoji_press_pos %d", cfg.paifei_duoji_press_pos);
  262. ZLOGI(TAG, "paifei_duoji_press_torque %d", cfg.paifei_duoji_press_torque);
  263. ZLOGI(TAG, "raoxiantance_duoji_reset_pos %d", cfg.raoxiantance_duoji_reset_pos);
  264. ZLOGI(TAG, "raoxiantance_duoji_tance_zero_pos %d", cfg.raoxiantance_duoji_tance_zero_pos);
  265. ZLOGI(TAG, "yaxian_duoji_reset_pos %d", cfg.yaxian_duoji_reset_pos);
  266. ZLOGI(TAG, "yaxian_duoji_press_pos %d", cfg.yaxian_duoji_press_pos);
  267. ZLOGI(TAG, "yaxian_duoji_press_torque %d", cfg.yaxian_duoji_press_torque);
  268. ZLOGI(TAG, "yaxian_duoji_wait_for_press_pos %d", cfg.yaxian_duoji_wait_for_press_pos);
  269. ZLOGI(TAG, "xianlajin_duoji_reset_pos %d", cfg.xianlajin_duoji_reset_pos);
  270. ZLOGI(TAG, "xianlajin_duoji_line_entry_pos %d", cfg.xianlajin_duoji_line_entry_pos);
  271. ZLOGI(TAG, "xianlajin_duoji_tight_line_pos %d", cfg.xianlajin_duoji_tight_line_pos);
  272. ZLOGI(TAG, "xianlajin_duoji_loose_line_pos %d", cfg.xianlajin_duoji_loose_line_pos);
  273. ZLOGI(TAG, "jiaxian_duoji_reset_pos %d", cfg.jiaxian_duoji_reset_pos);
  274. ZLOGI(TAG, "jiaxian_duoji_clamp_pos %d", cfg.jiaxian_duoji_clamp_pos);
  275. ZLOGI(TAG, "jiaxian_duoji_clamp_torque %d", cfg.jiaxian_duoji_clamp_torque);
  276. ZLOGI(TAG, "arm_jiaxian_duoji_reset_pos %d", cfg.arm_jiaxian_duoji_reset_pos);
  277. ZLOGI(TAG, "arm_jiaxian_duoji_clamp_pos %d", cfg.arm_jiaxian_duoji_clamp_pos);
  278. ZLOGI(TAG, "arm_jiaxian_duoji_clamp_torque %d", cfg.arm_jiaxian_duoji_clamp_torque);
  279. ZLOGI(TAG, "scissors_reset_pos %d", cfg.scissors_reset_pos);
  280. ZLOGI(TAG, "scissors_cut_pos %d", cfg.scissors_cut_pos);
  281. ZLOGI(TAG, "arm_hook_claws_half_pos %d", cfg.arm_hook_claws_half_pos);
  282. ZLOGI(TAG, "arm_hook_claws_full_pos %d", cfg.arm_hook_claws_full_pos);
  283. return 0;
  284. }
  285. #if 1
  286. int32_t IntelligentWindingRobotCtrl::initialize(ZModuleDeviceManager* dm, ICmdParser* cmdparse) {
  287. m_dm = dm;
  288. m_cmdparse = cmdparse;
  289. cmdparse->regCMD("app_paifei_duoji_moveto_reset", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return paifei_duoji_moveto_reset(); });
  290. cmdparse->regCMD("app_paifei_duoji_moveto_press", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return paifei_duoji_moveto_press(); });
  291. cmdparse->regCMD("app_raoxiantance_duoji_move_to_reset", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return raoxiantance_duoji_move_to_reset(); });
  292. cmdparse->regCMD("app_raoxiantance_duoji_move_to_get_thickness", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) {
  293. int32_t thickness = 0;
  294. int32_t err = raoxiantance_duoji_move_to_get_thickness(ack->getAck(1));
  295. ack->acktype = ICmdParserACK::kAckType_int32;
  296. ack->rawlen = sizeof(int32_t);
  297. });
  298. cmdparse->regCMD("app_yaxian_duoji_move_to_reset", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return yaxian_duoji_move_to_reset(); });
  299. cmdparse->regCMD("app_yaxian_duoji_move_to_press_pos", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return yaxian_duoji_move_to_press_pos(); });
  300. cmdparse->regCMD("app_yaxian_duoji_move_to_wait_for_press_pos", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return yaxian_duoji_move_to_wait_for_press_pos(); });
  301. cmdparse->regCMD("app_xianlajin_duoji_move_to_reset", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return xianlajin_duoji_move_to_reset(); });
  302. cmdparse->regCMD("app_xianlajin_duoji_move_to_line_entry_pos", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return xianlajin_duoji_move_to_line_entry_pos(); });
  303. cmdparse->regCMD("app_xianlajin_duoji_move_to_tight_line_pos", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return xianlajin_duoji_move_to_tight_line_pos(); });
  304. cmdparse->regCMD("app_xianlajin_duoji_move_to_loose_line_pos", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return xianlajin_duoji_move_to_loose_line_pos(); });
  305. cmdparse->regCMD("app_jiaxian_duoji_move_to_reset_pos", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return jiaxian_duoji_move_to_reset_pos(); });
  306. cmdparse->regCMD("app_jiaxian_duoji_move_to_clamp_pos", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return jiaxian_duoji_move_to_clamp_pos(); });
  307. cmdparse->regCMD("app_scissors_move_reset_pos", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return scissors_move_reset_pos(); });
  308. cmdparse->regCMD("app_scissors_cut", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return scissors_cut(); });
  309. cmdparse->regCMD("app_arm_jiaxian_duoji_move_to_reset_pos", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return arm_jiaxian_duoji_move_to_reset_pos(); });
  310. cmdparse->regCMD("app_arm_jiaxian_duoji_move_to_clamp_pos", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return arm_jiaxian_duoji_move_to_clamp_pos(); });
  311. cmdparse->regCMD("app_arm_hook_claws_reset", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return arm_hook_claws_reset(); });
  312. cmdparse->regCMD("app_arm_hook_claws_move_to_half_pos", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return arm_hook_claws_move_to_half_pos(); });
  313. cmdparse->regCMD("app_arm_hook_claws_move_to_full_pos", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return arm_hook_claws_move_to_full_pos(); });
  314. cmdparse->regCMD("app_main_shaft_run", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return main_shaft_run(); });
  315. cmdparse->regCMD("app_main_shaft_stop", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return main_shaft_stop(); });
  316. cmdparse->regCMD("app_xy_platform_reset", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return xy_platform_reset(); });
  317. cmdparse->regCMD("app_z_axis_reset", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return z_axis_reset(); });
  318. cmdparse->regCMD("app_z_axis_move_to", "(int32_t pos)", 1, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return z_axis_move_to(atoi(paraV[0])); });
  319. cmdparse->regCMD("app_xy_reset", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return xy_reset(); });
  320. cmdparse->regCMD("app_xy_move_to_zero", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return xy_move_to_zero(); });
  321. cmdparse->regCMD("app_xy_take_clip", "(int32_t index)", 1, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return xy_take_clip(atoi(paraV[0])); });
  322. cmdparse->regCMD("app_xy_take_line", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return xy_take_line(); });
  323. cmdparse->regCMD("app_xy_take_back_clip", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return xy_take_back_clip(); });
  324. cmdparse->regCMD("app_xy_remove_line", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return xy_remove_line(); });
  325. cmdparse->regCMD("app_start_winding", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return start_winding(); });
  326. cmdparse->regCMD("app_stop_winding", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return stop_winding(); });
  327. cmdparse->regCMD("app_reset_and_check_device", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return reset_and_check_device(); });
  328. cmdparse->regCMD("app_setcfg", "(const char* cfgname, int32_t cfgvalue)", 2, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return setcfg(paraV[0], atoi(paraV[1])); });
  329. cmdparse->regCMD("app_dumpcfg", "()", 0, [this](int32_t paramN, const char** paraV, ICmdParserACK* ack) { return dumpcfg(); });
  330. return 0;
  331. }
  332. #endif