Commit e4802ded authored by 957dd's avatar 957dd

坦克操控可以了,全部文件提交

parent 5a4d2c72
cmake_minimum_required(VERSION 3.10)
project(DeviceControlSystem
VERSION 1.1.0
VERSION 1.1.1
LANGUAGES C
)
......
......@@ -171,15 +171,20 @@ void mode_right_back(unsigned char gval) {
int tank0202_change(unsigned char *buf) {
unsigned char mode = buf[1];
unsigned char val = buf[2];
if(mode == 1 ) {
//mode_lift_flont(val);
mode_right_flont(val);
modecount=0;
}else if(mode == 2) {
}else if(mode == 2 ) {
//mode_lift_back(val);
mode_right_back(val);
modecount=1;
}else if(mode == 3) {
}
if((mode == 1||mode ==2)&&val == 0) modecount=0;
if(mode == 3) {
if(modecount == 0) mode_lift_back(val+25);
if(modecount == 1) mode_lift_flont(val+25);
}else if(mode == 4) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment