update state transfer log

This commit is contained in:
xinyang
2019-04-14 17:39:59 +08:00
parent 77e8735ac7
commit d4d4e0157e

View File

@@ -16,6 +16,7 @@
#include "camera/wrapper_head.h" #include "camera/wrapper_head.h"
#include "armor_finder/armor_finder.h" #include "armor_finder/armor_finder.h"
#include <log.h>
#include <time.h> #include <time.h>
#include <thread> #include <thread>
@@ -108,10 +109,12 @@ void uartReceive(Uart* uart){
}buffer[cnt] = 0; }buffer[cnt] = 0;
if(cnt==1 && buffer[0]=='e'){ if(cnt==1 && buffer[0]=='e'){
state = ENERGY_STATE; state = ENERGY_STATE;
LOGM("State switch to energy!");
}else if(cnt==1 && buffer[0]=='a'){ }else if(cnt==1 && buffer[0]=='a'){
state = ARMOR_STATE; state = ARMOR_STATE;
LOGM("State switch to armor!");
}else{ }else{
sscanf(buffer, "%f, %f", &yaw, &pitch); sscanf(buffer, "%f %f", &yaw, &pitch);
} }
cnt = 0; cnt = 0;
} }