修改flag
This commit is contained in:
+21
-16
@@ -1015,7 +1015,6 @@ void MainWindow::beep(int id)
|
||||
if(map->getUAVCurrent() == id)
|
||||
{
|
||||
QApplication::beep();
|
||||
//Beep(455,50);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1033,11 +1032,8 @@ void MainWindow::setTTS(QVariant state)
|
||||
|
||||
void MainWindow::TTSsay(QString str)
|
||||
{
|
||||
//qDebug() << u8"播报语音";
|
||||
//把要说的话加入队列
|
||||
if(isEnableTTS)
|
||||
{
|
||||
//qDebug() << u8"把要说的话加入到队列";
|
||||
if(!tts)
|
||||
{
|
||||
tts = new QTextToSpeech();
|
||||
@@ -1045,8 +1041,6 @@ void MainWindow::TTSsay(QString str)
|
||||
|
||||
if(tts->state() == QTextToSpeech::Ready)
|
||||
{
|
||||
//qDebug() << u8"准备开始播放语音";
|
||||
//TTS有问题,可能会导致死机
|
||||
tts->say(str);
|
||||
}
|
||||
}
|
||||
@@ -1966,18 +1960,29 @@ void MainWindow::updateUI()//事件驱动式更新数据
|
||||
}
|
||||
|
||||
|
||||
qreal la_command = dir_la.toInt() * ((int16_t)vehicle.servo_output_raw.servo14_raw)/32767.0 * max_la.toDouble()/scale_la.toDouble() + bias_la.toDouble() * 57.295;
|
||||
qreal la_angle = dir_la.toInt() * ((int16_t)vehicle.servo_output_raw.servo4_raw) /32767.0 * max_la.toDouble()/scale_la.toDouble() + bias_la.toDouble() * 57.295;
|
||||
qreal ra_command = dir_ra.toInt() * ((int16_t)vehicle.servo_output_raw.servo11_raw)/32767.0 * max_ra.toDouble()/scale_ra.toDouble() + bias_ra.toDouble() * 57.295;
|
||||
qreal ra_angle = dir_ra.toInt() * ((int16_t)vehicle.servo_output_raw.servo5_raw)/ 32767.0 * max_ra.toDouble()/scale_ra.toDouble() + bias_ra.toDouble() * 57.295;
|
||||
qreal la_command = dir_la.toDouble() * ((int16_t)vehicle.servo_output_raw.servo14_raw)/32767.0 * max_la.toDouble()/scale_la.toDouble() + bias_la.toDouble() * 57.295;
|
||||
qreal la_angle = dir_la.toDouble() * ((int16_t)vehicle.servo_output_raw.servo4_raw) /32767.0 * max_la.toDouble()/scale_la.toDouble() + bias_la.toDouble() * 57.295;
|
||||
qreal ra_command = dir_ra.toDouble() * ((int16_t)vehicle.servo_output_raw.servo11_raw)/32767.0 * max_ra.toDouble()/scale_ra.toDouble() + bias_ra.toDouble() * 57.295;
|
||||
qreal ra_angle = dir_ra.toDouble() * ((int16_t)vehicle.servo_output_raw.servo5_raw)/ 32767.0 * max_ra.toDouble()/scale_ra.toDouble() + bias_ra.toDouble() * 57.295;
|
||||
|
||||
qreal le_command = dir_le.toInt() * ((int16_t)vehicle.servo_output_raw.servo15_raw)/32767.0 * max_le.toDouble()/scale_le.toDouble() + bias_le.toDouble() * 57.295;
|
||||
qreal le_angle = dir_le.toInt() * ((int16_t)vehicle.servo_output_raw.servo1_raw) /32767.0 * max_le.toDouble()/scale_le.toDouble() + bias_le.toDouble() * 57.295;
|
||||
qreal re_command = dir_re.toInt() * ((int16_t)vehicle.servo_output_raw.servo12_raw)/32767.0 * max_re.toDouble()/scale_re.toDouble() + bias_re.toDouble() * 57.295;
|
||||
qreal re_angle = dir_re.toInt() * ((int16_t)vehicle.servo_output_raw.servo2_raw) /32767.0 * max_re.toDouble()/scale_re.toDouble() + bias_re.toDouble() * 57.295;
|
||||
qreal le_command = dir_le.toDouble() * ((int16_t)vehicle.servo_output_raw.servo15_raw)/32767.0 * max_le.toDouble()/scale_le.toDouble() + bias_le.toDouble() * 57.295;
|
||||
qreal le_angle = dir_le.toDouble() * ((int16_t)vehicle.servo_output_raw.servo1_raw) /32767.0 * max_le.toDouble()/scale_le.toDouble() + bias_le.toDouble() * 57.295;
|
||||
qreal re_command = dir_re.toDouble() * ((int16_t)vehicle.servo_output_raw.servo12_raw)/32767.0 * max_re.toDouble()/scale_re.toDouble() + bias_re.toDouble() * 57.295;
|
||||
qreal re_angle = dir_re.toDouble() * ((int16_t)vehicle.servo_output_raw.servo2_raw) /32767.0 * max_re.toDouble()/scale_re.toDouble() + bias_re.toDouble() * 57.295;
|
||||
|
||||
qreal ru_command = dir_ru.toInt() * ((int16_t)vehicle.servo_output_raw.servo13_raw)/32767.0 * max_ru.toDouble()/scale_ru.toDouble() + bias_ru.toDouble() * 57.295;
|
||||
qreal ru_angle = dir_ru.toInt() * ((int16_t)vehicle.servo_output_raw.servo3_raw) /32767.0 * max_ru.toDouble()/scale_ru.toDouble() + bias_ru.toDouble() * 57.295;
|
||||
qreal ru_command = dir_ru.toDouble() * ((int16_t)vehicle.servo_output_raw.servo13_raw)/32767.0 * max_ru.toDouble()/scale_ru.toDouble() + bias_ru.toDouble() * 57.295;
|
||||
qreal ru_angle = dir_ru.toDouble() * ((int16_t)vehicle.servo_output_raw.servo3_raw) /32767.0 * max_ru.toDouble()/scale_ru.toDouble() + bias_ru.toDouble() * 57.295;
|
||||
|
||||
qDebug() << la_command
|
||||
<< la_angle
|
||||
<< ra_command
|
||||
<< ra_angle
|
||||
<< le_command
|
||||
<< le_angle
|
||||
<< re_command
|
||||
<< re_angle
|
||||
<< ru_command
|
||||
<< ru_angle ;
|
||||
|
||||
|
||||
statusui->setServo(1,QString::number(la_command,'f',2),
|
||||
|
||||
@@ -1278,7 +1278,7 @@ void MavLinkNode::StatusParse(mavlink_message_t msg)
|
||||
|
||||
_showinfo info;
|
||||
|
||||
info.flag = 0x23F8;
|
||||
info.flag = 0x24a8;
|
||||
info.id = infoExportID;//1
|
||||
info.time = (int32_t)vehicle.ins1.time;//(second+min*60+hour*3600)*1000
|
||||
info.lng = vehicle.ins1.lon * 10000000;//*10000000
|
||||
|
||||
@@ -154,10 +154,12 @@ void DLink::setExportInfo(QVariant value,QVariant id, QHostAddress addr, qint32
|
||||
Export_addr = addr;
|
||||
Export_port = port;
|
||||
|
||||
/*
|
||||
qDebug() << "isExportInfo" << value
|
||||
<< id
|
||||
<< addr
|
||||
<< port;
|
||||
*/
|
||||
}
|
||||
|
||||
int DLink::SendMessageToExport(quint8 ch, quint8 *msg, quint16 len)
|
||||
|
||||
Reference in New Issue
Block a user