Commit 707083c7 authored by 957dd's avatar 957dd

更新了bug

parent d789dfb9
No preview for this file type
......@@ -8,18 +8,19 @@ int Device_File_Init() {
sub_str[1]=readbuf[3];
sub_str[2]='\0';
printf("开始初始化了");
if(strcmp(sub_str,"02")==0){//坦克的编码
if(strcmp(sub_str,"01")==0){//车的编码
pwm_speed(); //pwm初始化,车为停止
pin_init();
AppExit_pin_pwm=1;//车的异常停止值
free(sub_str);
}else if(strcmp(sub_str,"02")==0){//坦克的编码
pin_init();
pinMode(2, OUTPUT);//pwm引脚改为普通引脚
pinMode(21, OUTPUT);//pwm引脚改为普通引脚
digitalWrite(2, LOW);
digitalWrite(21, LOW);
AppExit_pin_pwm=1;//坦克的异常停止值
free(sub_str);
}else if(strcmp(sub_str,"01")==0){//车的编码
pwm_speed(); //pwm初始化,车为停止
pin_init();
AppExit_pin_pwm=2;//车的异常停止值
AppExit_pin_pwm=2;//坦克的异常停止值
free(sub_str);
}else if(strcmp(sub_str,"03")==0){//船的编码
pwm_speed();
......
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