参数导入名字不对问题解决
This commit is contained in:
@@ -805,7 +805,6 @@ void ParameterInspector::ParamsEncode(QString fileName)
|
|||||||
for (int i = 0; i < childCount; i++)
|
for (int i = 0; i < childCount; i++)
|
||||||
{
|
{
|
||||||
QTreeWidgetItem *childItem = p->child(i);
|
QTreeWidgetItem *childItem = p->child(i);
|
||||||
qDebug() << childItem->text(0) << childItem->text(1);
|
|
||||||
|
|
||||||
ParamsString.append("1\t");
|
ParamsString.append("1\t");
|
||||||
ParamsString.append("1\t");
|
ParamsString.append("1\t");
|
||||||
@@ -883,13 +882,18 @@ void ParameterInspector::ParamsDecode(QString fileName)
|
|||||||
mavlink_param_value_t param_value;//
|
mavlink_param_value_t param_value;//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(ItemList[2].size() < 16)
|
||||||
|
{
|
||||||
|
ItemList[2].append('\0');
|
||||||
|
}
|
||||||
|
|
||||||
char *id = ItemList[2].data();
|
char *id = ItemList[2].data();
|
||||||
|
|
||||||
|
memcpy(param_value.param_id,id,ItemList[2].size());
|
||||||
|
//memcpy(param_value.param_id,ItemList[2].data(),ItemList[2].size());
|
||||||
|
|
||||||
//memcpy(param_value.param_id,param_id(id).toLatin1().data(),ItemList[2].size());
|
|
||||||
memcpy(param_value.param_id,ItemList[2].data(),ItemList[2].size());
|
|
||||||
//memcpy(param_value.param_id,ItemList[2].data(),ItemList[2].size());
|
//memcpy(param_value.param_id,ItemList[2].data(),ItemList[2].size());
|
||||||
//memcpy(param_value.param_id+ItemList[2].size(),'\0',1);
|
//memcpy(param_value.param_id+ItemList[2].size(),'\0',1);
|
||||||
|
|
||||||
@@ -901,7 +905,7 @@ void ParameterInspector::ParamsDecode(QString fileName)
|
|||||||
param_value.param_count = LineList.size();
|
param_value.param_count = LineList.size();
|
||||||
param_value.param_index = LineList.indexOf(item);
|
param_value.param_index = LineList.indexOf(item);
|
||||||
param_value.param_type = ItemList.at(4).toInt();
|
param_value.param_type = ItemList.at(4).toInt();
|
||||||
param_value.param_value = param_getvalue(ItemList.at(3).toFloat(),param_value.param_type);
|
param_value.param_value = param_getvalue(ItemList.at(3).toDouble(),param_value.param_type);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user