增加vofa验证
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
static bool sendTarget(Serial &serial, double yaw, uint16_t shoot_delay, bool fire) {
|
static bool sendTarget(Serial &serial, double yaw, uint16_t shoot_delay, bool fire) {
|
||||||
|
/*
|
||||||
uint8_t buff[7];
|
uint8_t buff[7];
|
||||||
|
|
||||||
#ifdef WITH_COUNT_FPS
|
#ifdef WITH_COUNT_FPS
|
||||||
@@ -36,6 +37,12 @@ static bool sendTarget(Serial &serial, double yaw, uint16_t shoot_delay, bool fi
|
|||||||
buff[5] = fire ? 1 : 0; // 1为开火 0为闭嘴
|
buff[5] = fire ? 1 : 0; // 1为开火 0为闭嘴
|
||||||
buff[6] = 'e';
|
buff[6] = 'e';
|
||||||
return serial.WriteData(buff, sizeof(buff));
|
return serial.WriteData(buff, sizeof(buff));
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Vofa串口验证 不用可以注释掉
|
||||||
|
char buff[128];
|
||||||
|
int len = sprintf(buff,"channels: %f, %f, %d\n", yaw, shoot_delay, fire);
|
||||||
|
return serial.WriteData(buff, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ArmorFinder::sendAntiTopTarget(double yaw, uint16_t shoot_delay, bool fire) {
|
bool ArmorFinder::sendAntiTopTarget(double yaw, uint16_t shoot_delay, bool fire) {
|
||||||
|
|||||||
Reference in New Issue
Block a user