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.

60 lines
3.3 KiB

#pragma once
#include <stdint.h>
#if 0
namespace iflytop {
using namespace std;
#define CONFIG_CODE(type, subconfigindex) (type + subconfigindex)
typedef enum {
/*******************************************************************************
* 电机相关配置和状态 *
*******************************************************************************/
kcfg_motor_x_shift = CONFIG_CODE(100, 0), // x偏移
kcfg_motor_y_shift = CONFIG_CODE(100, 1), // y偏移
kcfg_motor_z_shift = CONFIG_CODE(100, 2), // z偏移
kcfg_motor_x_shaft = CONFIG_CODE(100, 3), // x轴是否反转
kcfg_motor_y_shaft = CONFIG_CODE(100, 4), // y轴是否反转
kcfg_motor_z_shaft = CONFIG_CODE(100, 5), // z轴是否反转
kcfg_motor_x_one_circle_pulse = CONFIG_CODE(100, 6), // x轴一圈脉冲数
kcfg_motor_y_one_circle_pulse = CONFIG_CODE(100, 7), // y轴一圈脉冲数
kcfg_motor_z_one_circle_pulse = CONFIG_CODE(100, 8), // z轴一圈脉冲数
kcfg_motor_default_velocity = CONFIG_CODE(100, 9), // 默认速度
kcfg_motor_default_acc = CONFIG_CODE(100, 10), // 默认加速度
kcfg_motor_default_dec = CONFIG_CODE(100, 11), // 默认减速度
kcfg_motor_default_break_dec = CONFIG_CODE(100, 12), // 默认减速度
/*******************************************************************************
* 电机找零相关配置 *
*******************************************************************************/
kcfg_motor_run_to_zero_max_x_d = CONFIG_CODE(150, 0), // x轴回零最大距离
kcfg_motor_run_to_zero_max_y_d = CONFIG_CODE(150, 1), // y轴回零最大距离
kcfg_motor_run_to_zero_max_z_d = CONFIG_CODE(150, 2), // z轴回零最大距离
kcfg_motor_look_zero_edge_max_x_d = CONFIG_CODE(150, 3), // x轴找零边缘最大距离
kcfg_motor_look_zero_edge_max_y_d = CONFIG_CODE(150, 4), // y轴找零边缘最大距离
kcfg_motor_look_zero_edge_max_z_d = CONFIG_CODE(150, 5), // z轴找零边缘最大距离
kcfg_motor_run_to_zero_speed = CONFIG_CODE(150, 6), // 回零速度
kcfg_motor_run_to_zero_dec = CONFIG_CODE(150, 7), // 回零减速度
kcfg_motor_look_zero_edge_speed = CONFIG_CODE(150, 8), // 找零边缘速度
kcfg_motor_look_zero_edge_dec = CONFIG_CODE(150, 9), // 找零边缘减速度
/*******************************************************************************
* 步进电机相关配置 *
*******************************************************************************/
k_cfg_stepmotor_ihold = CONFIG_CODE(200, 0),
k_cfg_stepmotor_irun = CONFIG_CODE(200, 1),
k_cfg_stepmotor_iholddelay = CONFIG_CODE(200, 2),
/*******************************************************************************
* XY_ROBOT_CONFIG *
*******************************************************************************/
k_cfg_xyrobot_robot_type = CONFIG_CODE(300, 0), // 机器人类型 0:hbot 1:corexy
} config_index_t;
} // namespace iflytop
#endif
/**
* @brief
*
* 模块通用配置和状态 0->1000
* Robot/Motor通用配置和状态 1000->2000
* Sensor通用配置和状态 2000->3000
* PID通用配置和状态 4000->4100
*/