下班备份
This commit is contained in:
@@ -4,18 +4,18 @@
|
||||
#include "bsp.h"
|
||||
|
||||
|
||||
#define USE_FILE_SYSTEM 1
|
||||
#define USE_FILE_SYSTEM 1
|
||||
#define SDCARD_BLOCK_MAX (10000)
|
||||
|
||||
|
||||
#define OSC_CNT 40
|
||||
#define SLOPE_CNT 40
|
||||
#define OSC_CNT 40
|
||||
#define SLOPE_CNT 40
|
||||
|
||||
#define STOP_TIME_MS 500
|
||||
#define RUN_TIME_MS 0
|
||||
#define STOP_TIME_MS 500
|
||||
#define RUN_TIME_MS 0
|
||||
|
||||
#define BDC_STOP() Motor_Control(MOTOR_CMD_STOP)
|
||||
#define BDC_UP() Motor_Control(MOTOR_CMD_FORWARD)
|
||||
#define BDC_UP() Motor_Control(MOTOR_CMD_FORWARD)
|
||||
#define BDC_DOWN() Motor_Control(MOTOR_CMD_REVERSE)
|
||||
|
||||
typedef struct{
|
||||
@@ -26,6 +26,11 @@ typedef struct{
|
||||
int32_t RightUpVPT;//右上设备阈值
|
||||
int32_t RightLowVPT;//右下设备阈值
|
||||
|
||||
int32_t LeftUpShieldVPT; //左上屏蔽阈值
|
||||
int32_t LeftLowpShieldVPT; //左下屏蔽阈值
|
||||
int32_t RightUpShieldVPT; //右上屏蔽阈值
|
||||
int32_t RightLowShieldVPT; //右下屏蔽阈值
|
||||
|
||||
int32_t LeftUp_Org_AdZero;//左上设备原始AD零点
|
||||
int32_t LeftLow_Org_AdZero;//左下设备原始AD零点
|
||||
int32_t RightUp_Org_AdZero;//右上设备原始AD零点
|
||||
|
||||
@@ -154,8 +154,8 @@ void SupportControlHandle(int32_t *lu_ad, int32_t *ll_ad, int32_t *ru_ad, int32_
|
||||
&& (Oll_diff2 <= -App.ADTrack.LeftLowVPT)
|
||||
&& (Oll_diff3 <= -App.ADTrack.LeftLowVPT)))
|
||||
{
|
||||
if((abs(Olu_diff1) > abs(Orl_diff1) + 10000)
|
||||
&& (abs(Oll_diff1) > abs(Oru_diff1) + 10000))
|
||||
if((abs(Olu_diff1) > abs(Orl_diff1) + App.ADTrack.LeftUpShieldVPT)
|
||||
&& (abs(Oll_diff1) > abs(Oru_diff1) + App.ADTrack.LeftLowpShieldVPT))
|
||||
{
|
||||
BDC_UP();
|
||||
App.UpFlag = true;
|
||||
@@ -177,8 +177,8 @@ void SupportControlHandle(int32_t *lu_ad, int32_t *ll_ad, int32_t *ru_ad, int32_
|
||||
&& (Oll_diff1 >= App.ADTrack.LeftLowVPT)
|
||||
&& (Oll_diff1 >= App.ADTrack.LeftLowVPT)))
|
||||
{
|
||||
if((abs(Oll_diff1) > abs(Oru_diff1) + 10000)
|
||||
&& (abs(Olu_diff1) > abs(Orl_diff1) + 10000))
|
||||
if((abs(Oll_diff1) > abs(Oru_diff1) + App.ADTrack.LeftLowShieldVPT)
|
||||
&& (abs(Olu_diff1) > abs(Orl_diff1) + App.ADTrack.LeftUpShieldVPT))
|
||||
{
|
||||
BDC_DOWN();
|
||||
App.DownFlag = true;
|
||||
@@ -204,8 +204,8 @@ void SupportControlHandle(int32_t *lu_ad, int32_t *ll_ad, int32_t *ru_ad, int32_
|
||||
&& (Orl_diff2 <= -App.ADTrack.RightLowVPT)
|
||||
&& (Orl_diff3 <= -App.ADTrack.RightLowVPT)))
|
||||
{
|
||||
if((abs(Orl_diff1) > abs(Olu_diff1) + 10000)
|
||||
&& (abs(Oru_diff1) > abs(Oll_diff1) + 10000))
|
||||
if((abs(Orl_diff1) > abs(Olu_diff1) + App.ADTrack.RightLowShieldVPT)
|
||||
&& (abs(Oru_diff1) > abs(Oll_diff1) + App.ADTrack.RightUpShieldVPT))
|
||||
{
|
||||
BDC_UP();
|
||||
App.UpFlag = true;
|
||||
@@ -228,8 +228,8 @@ void SupportControlHandle(int32_t *lu_ad, int32_t *ll_ad, int32_t *ru_ad, int32_
|
||||
&& (Orl_diff3 >= App.ADTrack.RightLowVPT))
|
||||
)
|
||||
{
|
||||
if((abs(Oru_diff1) > abs(Oll_diff1) + 10000)
|
||||
&& (abs(Orl_diff1) > abs(Olu_diff1) + 10000))
|
||||
if((abs(Oru_diff1) > abs(Oll_diff1) + App.ADTrack.RightUpShieldVPT)
|
||||
&& (abs(Orl_diff1) > abs(Olu_diff1) + App.ADTrack.RightLowShieldVPT))
|
||||
{
|
||||
BDC_DOWN();
|
||||
App.DownFlag = true;
|
||||
@@ -550,7 +550,11 @@ static void AppLoopHandler(void)
|
||||
App.ADTrack.LeftUpVPT = 40000;
|
||||
App.ADTrack.LeftLowVPT = 40000;
|
||||
App.ADTrack.RightUpVPT = 40000;
|
||||
App.ADTrack.RightLowVPT = 40000;
|
||||
App.ADTrack.RightLowVPT = 40000;
|
||||
App.ADTrack.LeftUpShieldVPT = 10000;
|
||||
App.ADTrack.LeftLowpShieldVPT = 10000;
|
||||
App.ADTrack.RightUpShieldVPT = 10000;
|
||||
App.ADTrack.RightLowShieldVPT = 10000;
|
||||
|
||||
App.ADTrack.LeftUp_Org_AdZero = App.LeftUpCS1237_TrendArray[0];
|
||||
App.ADTrack.LeftLow_Org_AdZero = App.LeftLowCS1237_TrendArray[0];
|
||||
|
||||
Reference in New Issue
Block a user