杆量打印
This commit is contained in:
@@ -42,7 +42,7 @@ static bool sendTarget(Serial &serial, double yaw, double pitch, double dist, ui
|
|||||||
time_t t = time(nullptr);
|
time_t t = time(nullptr);
|
||||||
if (last_time != t) {
|
if (last_time != t) {
|
||||||
last_time = t;
|
last_time = t;
|
||||||
cout << "Armor: fps:" << fps << ", (" << yaw << "," << pitch << "," << dist << ")" << endl;
|
cout << "Armor: fps:" << fps << ", yaw:" << yaw << ", pitch:" << pitch << ", dist:" << dist << endl;
|
||||||
fps = 0;
|
fps = 0;
|
||||||
}
|
}
|
||||||
fps += 1;
|
fps += 1;
|
||||||
@@ -61,6 +61,10 @@ static bool sendTarget(Serial &serial, double yaw, double pitch, double dist, ui
|
|||||||
feed = 660; // 开火
|
feed = 660; // 开火
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 打印发送的杆量值
|
||||||
|
LOGM(STR_CTR(WORD_BLUE, "Armor Send: x_move=%d, y_move=%d, yaw=%d, pitch=%d, feed=%d, key=%d"),
|
||||||
|
x_move, y_move, yaw_val, pitch_val, feed, key);
|
||||||
|
|
||||||
uint8_t frame[FRAME_LENGTH];
|
uint8_t frame[FRAME_LENGTH];
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -84,6 +84,10 @@ void Energy::sendTarget(Serial &serial, float yaw, float pitch, int16_t feed, ui
|
|||||||
MINMAX(yaw_val, -660, 660);
|
MINMAX(yaw_val, -660, 660);
|
||||||
MINMAX(pitch_val, -660, 660);
|
MINMAX(pitch_val, -660, 660);
|
||||||
|
|
||||||
|
// 打印发送的杆量值
|
||||||
|
LOGM(STR_CTR(WORD_LIGHT_PURPLE, "Energy Send: x_move=%d, y_move=%d, yaw=%d, pitch=%d, feed=%d, key=%d"),
|
||||||
|
x_move, y_move, yaw_val, pitch_val, feed, key);
|
||||||
|
|
||||||
uint8_t frame[FRAME_LENGTH];
|
uint8_t frame[FRAME_LENGTH];
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user