添加INS,添加舵机指令,修正舵机位置
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#include "StatusUI.h"
|
||||
#include "StatusUI.h"
|
||||
#include "ui_StatusUI.h"
|
||||
|
||||
StatusUI::StatusUI(QWidget *parent) :
|
||||
@@ -182,6 +182,92 @@ void StatusUI::setDlink(uint32_t pos,QVariant value)
|
||||
}
|
||||
}
|
||||
|
||||
void StatusUI::setAttitude1(uint32_t pos,QVariant value)
|
||||
{
|
||||
switch (pos) {
|
||||
case 1:
|
||||
ui->label_ax1->setText(value.toString());
|
||||
break;
|
||||
case 2:
|
||||
ui->label_ay1->setText(value.toString());
|
||||
break;
|
||||
case 3:
|
||||
ui->label_az1->setText(value.toString());
|
||||
break;
|
||||
case 4:
|
||||
ui->label_gx1->setText(value.toString());
|
||||
break;
|
||||
case 5:
|
||||
ui->label_gy1->setText(value.toString());
|
||||
break;
|
||||
case 6:
|
||||
ui->label_gz1->setText(value.toString());
|
||||
break;
|
||||
case 7:
|
||||
ui->label_rol1->setText(value.toString());
|
||||
break;
|
||||
case 8:
|
||||
ui->label_pit1->setText(value.toString());
|
||||
break;
|
||||
case 9:
|
||||
ui->label_yaw1->setText(value.toString());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void StatusUI::setAttitude2(uint32_t pos,QVariant value)
|
||||
{
|
||||
switch (pos) {
|
||||
case 1:
|
||||
ui->label_ax2->setText(value.toString());
|
||||
break;
|
||||
case 2:
|
||||
ui->label_ay2->setText(value.toString());
|
||||
break;
|
||||
case 3:
|
||||
ui->label_az2->setText(value.toString());
|
||||
break;
|
||||
case 4:
|
||||
ui->label_gx2->setText(value.toString());
|
||||
break;
|
||||
case 5:
|
||||
ui->label_gy2->setText(value.toString());
|
||||
break;
|
||||
case 6:
|
||||
ui->label_gz2->setText(value.toString());
|
||||
break;
|
||||
case 7:
|
||||
ui->label_rol2->setText(value.toString());
|
||||
break;
|
||||
case 8:
|
||||
ui->label_pit2->setText(value.toString());
|
||||
break;
|
||||
case 9:
|
||||
ui->label_yaw2->setText(value.toString());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void StatusUI::setGPS(uint32_t pos,QVariant value)
|
||||
{
|
||||
switch (pos) {
|
||||
case 1:
|
||||
ui->label_lat->setText(value.toString());
|
||||
break;
|
||||
case 2:
|
||||
ui->label_lng->setText(value.toString());
|
||||
break;
|
||||
case 3:
|
||||
ui->label_alt->setText(value.toString());
|
||||
break;
|
||||
case 4:
|
||||
ui->label_sp->setText(value.toString());
|
||||
break;
|
||||
case 5:
|
||||
ui->label_sta->setText(value.toString());
|
||||
break;
|
||||
case 6:
|
||||
ui->label_head->setText(value.toString());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user