diff --git a/.metadata/.plugins/org.eclipse.egit.core/.org.eclipse.egit.core.cmp/.project b/.metadata/.plugins/org.eclipse.egit.core/.org.eclipse.egit.core.cmp/.project
deleted file mode 100644
index 3c10856..0000000
--- a/.metadata/.plugins/org.eclipse.egit.core/.org.eclipse.egit.core.cmp/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
- .org.eclipse.egit.core.cmp
-
-
-
-
-
-
-
-
diff --git a/.metadata/.plugins/org.eclipse.egit.core/.org.eclipse.egit.core.cmp/.settings/org.eclipse.core.resources.prefs b/.metadata/.plugins/org.eclipse.egit.core/.org.eclipse.egit.core.cmp/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 99f26c0..0000000
--- a/.metadata/.plugins/org.eclipse.egit.core/.org.eclipse.egit.core.cmp/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-encoding/=UTF-8
diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml
index d032c56..19601ec 100644
--- a/.settings/language.settings.xml
+++ b/.settings/language.settings.xml
@@ -5,7 +5,7 @@
-
+
@@ -17,7 +17,7 @@
-
+
diff --git a/Core/Protobuf/Proto/bsp_IV.proto b/Core/Protobuf/Proto/bsp_IV.proto
index 34b8185..5dd44a7 100644
--- a/Core/Protobuf/Proto/bsp_IV.proto
+++ b/Core/Protobuf/Proto/bsp_IV.proto
@@ -14,6 +14,7 @@ message IV_struct_define{
int32 Robot_Current_Left= 9;
int32 Robot_Current_Right= 10;
+
int32 Robot_Error_Left= 11;
int32 Robot_Error_Right= 12;
diff --git a/Core/Protobuf/Proto/bsp_PV.proto b/Core/Protobuf/Proto/bsp_PV.proto
index 4a50aef..143b948 100644
--- a/Core/Protobuf/Proto/bsp_PV.proto
+++ b/Core/Protobuf/Proto/bsp_PV.proto
@@ -2,6 +2,8 @@ syntax = "proto3";
message PV_struct_define{
int32 Robot_ChgLength= 1;
+
double Robot_AutoSpeedBase=2;
double Robot_ManualSpeedBase=3;
+
};
diff --git a/Core/Src/FSM.c b/Core/Src/FSM.c
index d0a559a..560c67f 100644
--- a/Core/Src/FSM.c
+++ b/Core/Src/FSM.c
@@ -450,11 +450,7 @@ void GF_Dispatch()//2ms调用一次 给车体速度等赋值
IV.Robot_CurrentState = CurrentMoveState;
-
action_perfrom(MoveTransitions, sizeof(MoveTransitions) / sizeof(transition_t), CurrentMoveState);//结构体数组/大小/当前状态
- // action_perfrom(SwingTransitions,sizeof(SwingTransitions) / sizeof(transition_t), CurrentSwingState);
- // action_perfrom(TiltTransitions, sizeof(TiltTransitions) / sizeof(transition_t), CurrentTiltState);
-
}
diff --git a/Core/Src/main.c b/Core/Src/main.c
index 1bede13..191a6a7 100644
--- a/Core/Src/main.c
+++ b/Core/Src/main.c
@@ -143,7 +143,7 @@ int main(void)
MX_USART6_UART_Init();
MX_TIM8_Init();
MX_LWIP_Init();
- MX_QUADSPI_Init();
+ //MX_QUADSPI_Init();
MX_LPUART1_UART_Init();
MX_ADC2_Init();
/* USER CODE BEGIN 2 */
diff --git a/Core/Src/robot_state.c b/Core/Src/robot_state.c
index 534577f..5412f5d 100644
--- a/Core/Src/robot_state.c
+++ b/Core/Src/robot_state.c
@@ -215,6 +215,21 @@ void Auto()
}
break;
case 2:
+ //水平
+ if ((AM_Pa.ExpectationAngle >= 45 && AM_Pa.ExpectationAngle <= 135))
+ {
+ AM_Pa.ExpectationAngle = 90 - GV.Right_Compensation/100.0;
+ }
+ else if ((AM_Pa.ExpectationAngle >= -135 && AM_Pa.ExpectationAngle <= -45))
+ {
+ AM_Pa.ExpectationAngle = -90 + GV.Left_Compensation/100.0;
+ }
+
+ //垂直
+ else if ((AM_Pa.ExpectationAngle > -45 && AM_Pa.ExpectationAngle < 45))
+ {
+ AM_Pa.ExpectationAngle = 0 - GV.Left_Compensation/100.0 + GV.Right_Compensation/100.0;
+ }
VehicleAutoForward(angle,
GV.Left_Compensation/100.0, GV.Right_Compensation/100.0);//自动前进
break;
@@ -247,6 +262,20 @@ void Auto()
}
break;
case 4:
+ if ((AM_Pa.ExpectationAngle >= 45 && AM_Pa.ExpectationAngle <= 135))
+ {
+ AM_Pa.ExpectationAngle = 90 + GV.Left_Compensation/100.0;
+ }
+ if ((AM_Pa.ExpectationAngle >= -135 && AM_Pa.ExpectationAngle <= -45))
+ {
+ AM_Pa.ExpectationAngle = - 90 - GV.Right_Compensation/100.0;
+ }
+
+ //垂直
+ if ((AM_Pa.ExpectationAngle > -45 && AM_Pa.ExpectationAngle < 45))
+ {
+ AM_Pa.ExpectationAngle = 0 - GV.Left_Compensation/100.0 + GV.Right_Compensation/100.0;
+ }
VehicleAutoBackward(angle,
GV.Left_Compensation/100.0, GV.Right_Compensation/100.0);//自动后退
break;