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.

57 lines
2.7 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
  1. #pragma once
  2. #include <stdint.h>
  3. namespace iflytop {
  4. using namespace std;
  5. #define CONFIG_CODE(type, subconfigindex) (type + subconfigindex)
  6. typedef enum {
  7. kcfg_motor_x_shift = CONFIG_CODE(100, 0), // xƫ��
  8. kcfg_motor_y_shift = CONFIG_CODE(100, 1), // yƫ��
  9. kcfg_motor_z_shift = CONFIG_CODE(100, 2), // zƫ��
  10. kcfg_motor_x_shaft = CONFIG_CODE(100, 3), // x���Ƿ���ת
  11. kcfg_motor_y_shaft = CONFIG_CODE(100, 4), // y���Ƿ���ת
  12. kcfg_motor_z_shaft = CONFIG_CODE(100, 5), // z���Ƿ���ת
  13. kcfg_motor_x_one_circle_pulse = CONFIG_CODE(100, 6), // x��һȦ������
  14. kcfg_motor_y_one_circle_pulse = CONFIG_CODE(100, 7), // y��һȦ������
  15. kcfg_motor_z_one_circle_pulse = CONFIG_CODE(100, 8), // z��һȦ������
  16. kcfg_motor_default_velocity = CONFIG_CODE(100, 9), // Ĭ���ٶ�
  17. kcfg_motor_default_acc = CONFIG_CODE(100, 10), // Ĭ�ϼ��ٶ�
  18. kcfg_motor_default_dec = CONFIG_CODE(100, 11), // Ĭ�ϼ��ٶ�
  19. kcfg_motor_default_break_dec = CONFIG_CODE(100, 12), // Ĭ�ϼ��ٶ�
  20. /*******************************************************************************
  21. * *
  22. *******************************************************************************/
  23. kcfg_motor_run_to_zero_max_x_d = CONFIG_CODE(150, 0), // x��������������
  24. kcfg_motor_run_to_zero_max_y_d = CONFIG_CODE(150, 1), // y��������������
  25. kcfg_motor_run_to_zero_max_z_d = CONFIG_CODE(150, 2), // z��������������
  26. kcfg_motor_look_zero_edge_max_x_d = CONFIG_CODE(150, 3), // x��������Ե��������
  27. kcfg_motor_look_zero_edge_max_y_d = CONFIG_CODE(150, 4), // y��������Ե��������
  28. kcfg_motor_look_zero_edge_max_z_d = CONFIG_CODE(150, 5), // z��������Ե��������
  29. kcfg_motor_run_to_zero_speed = CONFIG_CODE(150, 6), // �����ٶ�
  30. kcfg_motor_run_to_zero_dec = CONFIG_CODE(150, 7), // �������ٶ�
  31. kcfg_motor_look_zero_edge_speed = CONFIG_CODE(150, 8), // ������Ե�ٶ�
  32. kcfg_motor_look_zero_edge_dec = CONFIG_CODE(150, 9), // ������Ե���ٶ�
  33. /*******************************************************************************
  34. * *
  35. *******************************************************************************/
  36. k_cfg_stepmotor_ihold = CONFIG_CODE(200, 0),
  37. k_cfg_stepmotor_irun = CONFIG_CODE(200, 1),
  38. k_cfg_stepmotor_iholddelay = CONFIG_CODE(200, 2),
  39. /*******************************************************************************
  40. * XY_ROBOT_CONFIG *
  41. *******************************************************************************/
  42. k_cfg_xyrobot_robot_type = CONFIG_CODE(300, 0), // ���������� 0:hbot 1:corexy
  43. } config_index_t;
  44. } // namespace iflytop