diff --git a/energy/src/energy/judge/judge_shoot.cpp b/energy/src/energy/judge/judge_shoot.cpp index cbc2660..bece200 100644 --- a/energy/src/energy/judge/judge_shoot.cpp +++ b/energy/src/energy/judge/judge_shoot.cpp @@ -40,5 +40,5 @@ void Energy::judgeShootInGimbal() { } else shoot = 2; -// cout << "yaw: " << yaw_rotation << '\t' << "pitch: " << pitch_rotation << endl; + cout << "yaw: " << yaw_rotation << '\t' << "pitch: " << pitch_rotation << endl; } diff --git a/energy/src/energy/send/send.cpp b/energy/src/energy/send/send.cpp index d35b309..10b77d3 100644 --- a/energy/src/energy/send/send.cpp +++ b/energy/src/energy/send/send.cpp @@ -87,7 +87,7 @@ void Energy::sendTarget(Serial &serial, float x, float y, uint16_t z, uint16_t u time_t t = time(nullptr); if (last_time != t) { last_time = t; - cout << "fps:" << fps << ", (" << x << "," << y << "," << z << "," << u << ")" << endl; + cout << "fps:" << fps << ", (" << x << "," << y << "," << z << ")" << endl; fps = 0; } fps += 1; diff --git a/main.cpp b/main.cpp index 16628bd..9d782a1 100644 --- a/main.cpp +++ b/main.cpp @@ -97,7 +97,7 @@ int main(int argc, char *argv[]) { if (mcuData.state == BIG_ENERGY_STATE) {//大能量机关模式 if (last_state != BIG_ENERGY_STATE) {//若上一帧不是大能量机关模式,即刚往完成切换,则需要初始化 destroyAllWindows(); - if(from_camera){ + if (from_camera) { delete video_gimbal; video_gimbal = new CameraWrapper(ENERGY_CAMERA_GAIN, 0/*, "armor"*/); if (video_gimbal->init()) { @@ -120,13 +120,13 @@ int main(int argc, char *argv[]) { if (!from_camera) extract(gimbal_src, chassis_src); if (save_video) saveVideos(gimbal_src, chassis_src);//保存视频 if (show_origin) showOrigin(gimbal_src, chassis_src);//显示原始图像 -// energy.runBig(gimbal_src, chassis_src); - energy.runBig(gimbal_src); + energy.runBig(gimbal_src, chassis_src); +// energy.runBig(gimbal_src); last_state = mcuData.state;//更新上一帧状态 } else if (mcuData.state == SMALL_ENERGY_STATE) { if (mcuData.state != SMALL_ENERGY_STATE) { destroyAllWindows(); - if(from_camera){ + if (from_camera) { delete video_gimbal; video_gimbal = new CameraWrapper(ENERGY_CAMERA_GAIN, 0/*, "armor"*/); if (video_gimbal->init()) { @@ -149,7 +149,7 @@ int main(int argc, char *argv[]) { } else { // 自瞄模式 if (last_state != ARMOR_STATE) { destroyAllWindows(); - if(from_camera){ + if (from_camera) { delete video_gimbal; video_gimbal = new CameraWrapper(ARMOR_CAMERA_GAIN, 0/*, "armor"*/); if (video_gimbal->init()) { diff --git a/others/include/config/setconfig.h b/others/include/config/setconfig.h index 5029e36..7399504 100644 --- a/others/include/config/setconfig.h +++ b/others/include/config/setconfig.h @@ -29,7 +29,7 @@ #define ARMOR_CAMERA_GAIN (30) #endif #ifndef ENERGY_CAMERA_GAIN - #define ENERGY_CAMERA_GAIN (20) + #define ENERGY_CAMERA_GAIN (30) #endif #ifndef AIM_KP #define AIM_KP (6) diff --git a/others/src/additions/additions.cpp b/others/src/additions/additions.cpp index 29946b2..85c3f38 100644 --- a/others/src/additions/additions.cpp +++ b/others/src/additions/additions.cpp @@ -37,7 +37,7 @@ 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); // LOGM("Get delta x: %d, delta y: %d!", mcuData.delta_x, mcuData.delta_y); // static int t = time(nullptr);