/*
 * @Date: 2025-06-23 09:02:52
 * @Author: mypx
 * @LastEditors: mypx mypx_coder@163.com
 * @LastEditTime: 2025-10-27 14:18:40
 * @FilePath: user_config.h
 * @Description: 
 * Copyright (c) 2025 by mypx, All Rights Reserved.
 */
#ifndef __USER_CONFIG_H__
#define __USER_CONFIG_H__

#define PM_DEVICE_MODE "PM1"
#define PM_DEVICE_VER_MAJOR 1
#define PM_DEVICE_VER_MINOR 1
#define PM_DEVICE_VER_REV 0
#define PM_DEVICE_VER_BUILD 0

#define USING_SOFT_SPI 0
#define USING_SOFT_ENCODER 0

#define ENABLE_SV630P 1

#define TEST_ENCODER_PLUSE 0

#define DEBUG_SERVO_ENABLE 0
#define DEBUG_MB_ENABLE 0
#define DEBUG_LIGHT_DATA_ONLY 0

#define ENABLE_IIR_FILTER 0

#define DATA_PROCESS_UNIT_COUNT 1000

#define MOTOR_TO_ENCODER_FACTOR 1
#define MOTOR_TO_ENCODER_RATIO (80 * MOTOR_TO_ENCODER_FACTOR) //80 // 电机转速与编码器转速的比率
#define ENCODER_TO_POLARIZER_RATIO 180
#define MOTOR_TO_POLARIZER_RATIO (MOTOR_TO_ENCODER_RATIO * ENCODER_TO_POLARIZER_RATIO) // 电机转速与偏振片速的比率
#define CALIB_OSCI_ANGLE 180.0f

#define DC_OFFSET_ADC_VALUE 2043.48 //1990  // 

#define ENABLE_CALIB_DOUBLE_DIR 0
#define CALIB_OFFSET 0.0f  //4.995f
#define CALIB_ONE_DIR 1  // -1: 逆时针, 1: 顺时针

#define CALIB_TO_FIX_STAGE 0

#define MEASURE_DEF_DIR 1

#define TREND_BUFFER_SIZE 10

#define TEC_TEMPER_PRECISE 0.1f

// speed设置为正数，编码器正向增加，则系数为1， 反之为-1
#define ENCODER_MOTOR_DIR_FACTOR  1  // -1 or 1

#endif /* __USER_CONFIG_H__ */
