修复了total angle计算异常的问题

This commit is contained in:
NeoZng
2022-12-08 12:08:49 +08:00
parent 2dd39f9815
commit f043d5e265
4 changed files with 70 additions and 67 deletions

View File

@@ -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键是否按下