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.

59 lines
3.3 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
  1. #pragma once
  2. #include <stdint.h>
  3. #if 0
  4. namespace iflytop {
  5. using namespace std;
  6. #define CONFIG_CODE(type, subconfigindex) (type + subconfigindex)
  7. typedef enum {
  8. /*******************************************************************************
  9. * ú״̬ *
  10. *******************************************************************************/
  11. kcfg_motor_x_shift = CONFIG_CODE(100, 0), // xƫ��
  12. kcfg_motor_y_shift = CONFIG_CODE(100, 1), // yƫ��
  13. kcfg_motor_z_shift = CONFIG_CODE(100, 2), // zƫ��
  14. kcfg_motor_x_shaft = CONFIG_CODE(100, 3), // x���Ƿ���ת
  15. kcfg_motor_y_shaft = CONFIG_CODE(100, 4), // y���Ƿ���ת
  16. kcfg_motor_z_shaft = CONFIG_CODE(100, 5), // z���Ƿ���ת
  17. kcfg_motor_x_one_circle_pulse = CONFIG_CODE(100, 6), // x��һȦ������
  18. kcfg_motor_y_one_circle_pulse = CONFIG_CODE(100, 7), // y��һȦ������
  19. kcfg_motor_z_one_circle_pulse = CONFIG_CODE(100, 8), // z��һȦ������
  20. kcfg_motor_default_velocity = CONFIG_CODE(100, 9), // Ĭ���ٶ�
  21. kcfg_motor_default_acc = CONFIG_CODE(100, 10), // Ĭ�ϼ��ٶ�
  22. kcfg_motor_default_dec = CONFIG_CODE(100, 11), // Ĭ�ϼ��ٶ�
  23. kcfg_motor_default_break_dec = CONFIG_CODE(100, 12), // Ĭ�ϼ��ٶ�
  24. /*******************************************************************************
  25. * *
  26. *******************************************************************************/
  27. kcfg_motor_run_to_zero_max_x_d = CONFIG_CODE(150, 0), // x��������������
  28. kcfg_motor_run_to_zero_max_y_d = CONFIG_CODE(150, 1), // y��������������
  29. kcfg_motor_run_to_zero_max_z_d = CONFIG_CODE(150, 2), // z��������������
  30. kcfg_motor_look_zero_edge_max_x_d = CONFIG_CODE(150, 3), // x��������Ե��������
  31. kcfg_motor_look_zero_edge_max_y_d = CONFIG_CODE(150, 4), // y��������Ե��������
  32. kcfg_motor_look_zero_edge_max_z_d = CONFIG_CODE(150, 5), // z��������Ե��������
  33. kcfg_motor_run_to_zero_speed = CONFIG_CODE(150, 6), // �����ٶ�
  34. kcfg_motor_run_to_zero_dec = CONFIG_CODE(150, 7), // �������ٶ�
  35. kcfg_motor_look_zero_edge_speed = CONFIG_CODE(150, 8), // ������Ե�ٶ�
  36. kcfg_motor_look_zero_edge_dec = CONFIG_CODE(150, 9), // ������Ե���ٶ�
  37. /*******************************************************************************
  38. * *
  39. *******************************************************************************/
  40. k_cfg_stepmotor_ihold = CONFIG_CODE(200, 0),
  41. k_cfg_stepmotor_irun = CONFIG_CODE(200, 1),
  42. k_cfg_stepmotor_iholddelay = CONFIG_CODE(200, 2),
  43. /*******************************************************************************
  44. * XY_ROBOT_CONFIG *
  45. *******************************************************************************/
  46. k_cfg_xyrobot_robot_type = CONFIG_CODE(300, 0), // ���������� 0:hbot 1:corexy
  47. } config_index_t;
  48. } // namespace iflytop
  49. #endif
  50. /**
  51. * @brief
  52. *
  53. * ģͨú״̬ 0->1000
  54. * Robot/Motorͨú״̬ 1000->2000
  55. * Sensorͨú״̬ 2000->3000
  56. * PIDͨú״̬ 4000->4100
  57. */