소스 검색

编码器结构体变量改为static类型

Signed-off-by: huhui <huhui@sharkgulf.com>
huhui 2 년 전
부모
커밋
6d7178fdaa
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Applications/foc/motor/encoder.c

+ 1 - 1
Applications/foc/motor/encoder.c

@@ -21,7 +21,7 @@
 
 
 /* 磁编码器使用一对极的磁铁,所以编码器获取的角度和机械角度相同需要转为电角度*/
 /* 磁编码器使用一对极的磁铁,所以编码器获取的角度和机械角度相同需要转为电角度*/
 
 
-encoder_t g_encoder;
+static encoder_t g_encoder;
 
 
 static __INLINE s16 _abi_count(void) {
 static __INLINE s16 _abi_count(void) {
 #ifdef ENCODER_CC_INVERT
 #ifdef ENCODER_CC_INVERT