| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #ifndef __REMOTE_CONTROLLER_H_
- #define __REMOTE_CONTROLLER_H_
- #include "common.h"
- #include <stdint.h>
- #define RC_INPUT_CH_NUM 14
- #define RC_CALIB_CH_NUM 4
- typedef enum
- {
- // 信号正常
- RC_SIGNAL_HEALTH = 0,
- RC_SIGNAL_FAIL = 1,
- // 信号超允许范围
- RC_SIGNAL_BAD = 2
- } RcSignalHealthType;
- typedef struct
- {
- /*--------- public members ---------------*/
- comp_status link_status; /* 连接状态 */
- RcSignalHealthType signal_health; /* 信号健康标志 */
- uint16_t ch_value[14]; /* 通道值 */
- uint16_t raw_ch_value[14]; /* 通道值 未经过校准 */
- /* 前 4 通道的校准参数 */
- uint16_t calib_offset[RC_CALIB_CH_NUM];
- uint16_t calib_factor_up[RC_CALIB_CH_NUM];
- uint16_t calib_factor_down[RC_CALIB_CH_NUM];
- } RC_Data_Type;
- void RemoteController_SetCalibParams(RC_Data_Type *rc, uint8_t ch,
- uint16_t offset, uint16_t factor_up,
- uint16_t factor_down);
- #endif
|