mirror of
https://gitee.com/dlmu-cone/bf_original_balance_chassis
synced 2026-07-24 11:37:45 +08:00
修复了total angle计算异常的问题
This commit is contained in:
@@ -17,12 +17,17 @@
|
||||
#include "main.h"
|
||||
#include "usart.h"
|
||||
|
||||
//
|
||||
#define LAST 1
|
||||
#define TEMP 0
|
||||
|
||||
// 获取按键操作
|
||||
#define KEY_PRESS 0
|
||||
#define KEY_STATE 1
|
||||
#define KEY_PRESS_WITH_CTRL 2
|
||||
#define KEY_PRESS_WITH_SHIFT 3
|
||||
|
||||
// 检查接受值是否出错
|
||||
#define RC_CH_VALUE_MIN ((uint16_t)364)
|
||||
#define RC_CH_VALUE_OFFSET ((uint16_t)1024)
|
||||
#define RC_CH_VALUE_MAX ((uint16_t)1684)
|
||||
@@ -34,6 +39,8 @@
|
||||
#define switch_is_down(s) (s == RC_SW_DOWN)
|
||||
#define switch_is_mid(s) (s == RC_SW_MID)
|
||||
#define switch_is_up(s) (s == RC_SW_UP)
|
||||
#define LEFT_SW 1
|
||||
#define RIGHT_SW 0
|
||||
|
||||
/* ----------------------- PC Key Definition-------------------------------- */
|
||||
// 对应key[x][0~16],获取对应的键;例如通过key[KEY_PRESS][Key_W]获取W键是否按下
|
||||
|
||||
Reference in New Issue
Block a user