energy change

This commit is contained in:
sun
2019-07-17 10:17:51 +08:00
parent 0814522e46
commit 6e87cfe4db
10 changed files with 139 additions and 51 deletions

View File

@@ -37,9 +37,19 @@ void uartReceive(Serial *pSerial) {
pSerial->ReadData((uint8_t *) buffer, sizeof(mcuData)+1);
if (buffer[sizeof(mcuData)] == '\n') {
memcpy(&mcuData, buffer, sizeof(mcuData));
LOGM("Get, state:%c, mark:%d!", mcuData.state, (int) mcuData.mark);
// LOGM("Get, state:%c, mark:%d!", mcuData.state, (int) mcuData.mark);
// LOGM("Get yaw: %f, pitch: %f!", mcuData.curr_yaw, mcuData.curr_pitch);
// static int t = time(nullptr);
// static int cnt = 0;
// if(time(nullptr) > t){
// t = time(nullptr);
// LOGM("fps:%d", cnt);
// cnt = 0;
// }else{
// cnt++;
// }
}else{
LOGW("corrupt data!");
// LOGW("corrupt data!");
}
}
}