update state transfer log
This commit is contained in:
5
main.cpp
5
main.cpp
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user