修正舵机显示器的最后一个没有数据问题
This commit is contained in:
@@ -729,10 +729,10 @@ void ParameterInspector::ParamsEncode(QString fileName)
|
||||
|
||||
QByteArray ParamsString;
|
||||
|
||||
ParamsString.append("# Onboard parameters for Vehicle %1\r\n");
|
||||
ParamsString.append("# Onboard parameters for Vehicle \r\n");
|
||||
ParamsString.append("#\r\n");
|
||||
ParamsString.append("# Stack: MAVLink General\r\n");
|
||||
ParamsString.append("# Vehicle: VTOL\r\n");
|
||||
ParamsString.append("# Vehicle: \r\n");
|
||||
ParamsString.append("# Version: 1.4.1 dev\r\n");
|
||||
ParamsString.append("# Git Revision: \r\n");
|
||||
ParamsString.append("#\r\n");
|
||||
@@ -745,13 +745,43 @@ void ParameterInspector::ParamsEncode(QString fileName)
|
||||
|
||||
for(int i = 0;i < Count; i++)
|
||||
{
|
||||
|
||||
QString systemStr = ui->treeWidget->topLevelItem(i)->text(0);
|
||||
int index = systemStr.indexOf(' ');
|
||||
|
||||
QString selectid = ui->treeWidget->topLevelItem(i)->text(0).mid(index);
|
||||
Vehicle_Id = selectid;
|
||||
|
||||
p = ui->treeWidget->topLevelItem(i);
|
||||
|
||||
/*
|
||||
if(ui->treeWidget->topLevelItem(i)->text(0) == ui->pushButton_system->text())
|
||||
{
|
||||
Vehicle_Id = ui->treeWidget->topLevelItem(i)->text(0);
|
||||
Vehicle_Id = QString::number(m_sysid);
|
||||
p = ui->treeWidget->topLevelItem(i);
|
||||
//break;
|
||||
}
|
||||
qDebug() << i << Count;
|
||||
*/
|
||||
|
||||
//读取参数
|
||||
|
||||
int childCount = p->childCount();
|
||||
for (int i = 0; i < childCount; i++)
|
||||
{
|
||||
QTreeWidgetItem *childItem = p->child(i);
|
||||
|
||||
ParamsString.append(Vehicle_Id + "\t");
|
||||
ParamsString.append("1\t");
|
||||
ParamsString.append(childItem->text(0) + "\t");
|
||||
ParamsString.append(childItem->text(1) + "\t");
|
||||
ParamsString.append(QString::number(param_gettype(childItem->data(2,Qt::DisplayRole)),'f',0) + "\r\n");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//读取参数
|
||||
|
||||
@@ -324,7 +324,7 @@ void tools_Index4::setRange(QJsonArray min,QJsonArray max)
|
||||
|
||||
void tools_Index4::setChannel(int port,QMap<int,uint16_t> pwm)
|
||||
{
|
||||
for (int var = 1; var < 16; ++var) {
|
||||
for (int var = 1; var <= 16; ++var) {
|
||||
QProgressBar *progress = barlist.value(port * 16 + var);
|
||||
|
||||
if(progress)
|
||||
|
||||
Reference in New Issue
Block a user