重写图线显示

This commit is contained in:
hm
2020-08-13 12:28:38 +08:00
parent dfd6a6e08c
commit 7491439a9b
6 changed files with 262 additions and 111 deletions
@@ -484,6 +484,8 @@ void MAVLinkInspector::updateField(mavlink_message_t* msg, const mavlink_message
return;
}
uint8_t* m = (uint8_t*)&uasMessage->payload64[0];
switch (msgInfo->fields[fieldid].type)
@@ -735,7 +737,7 @@ void MAVLinkInspector::updateField(mavlink_message_t* msg, const mavlink_message
{
if(scope)
{
scope->setSerieData(item->data(0,Qt::DisplayRole).toString(),item->data(1,Qt::DisplayRole));
scope->setSerieData(QString::number(msg->sysid) + "." + item->data(0,Qt::DisplayRole).toString(),item->data(1,Qt::DisplayRole));
}
}
}
@@ -778,9 +780,15 @@ void MAVLinkInspector::on_treeWidget_itemChanged(QTreeWidgetItem *item, int colu
{
if(itemText.size() != -1)
{
//太频繁,可能会出问题
if(scope)
{
scope->removeSerie(itemText);
if(item->parent()->parent())
{
QString str = item->parent()->parent()->text(0);
str = str.mid(str.indexOf(' ') + 1);
scope->removeSerie(str + "." + item->data(0,Qt::DisplayRole).toString());
}
}
}
}