2020-10-22 21:52:01 +08:00
|
|
|
#include "ServoSystem.h"
|
2020-10-06 17:11:59 +08:00
|
|
|
#include "ui_ServoSystem.h"
|
|
|
|
|
|
|
|
|
|
ServoSystem::ServoSystem(QWidget *parent) :
|
2021-01-07 10:55:02 +08:00
|
|
|
ToolsWidget(parent),
|
2020-10-06 17:11:59 +08:00
|
|
|
ui(new Ui::ServoSystem)
|
|
|
|
|
{
|
|
|
|
|
ui->setupUi(this);
|
2020-10-07 19:50:45 +08:00
|
|
|
|
|
|
|
|
setWindowTitle(tr("ServoSyste"));
|
|
|
|
|
|
|
|
|
|
//load qss
|
|
|
|
|
QFile file(":/qss/ServoSystem.qss");
|
|
|
|
|
file.open(QFile::ReadOnly);
|
|
|
|
|
QTextStream filetext(&file);
|
|
|
|
|
QString stylesheet = filetext.readAll();
|
|
|
|
|
this->setStyleSheet(stylesheet);
|
|
|
|
|
file.close();
|
|
|
|
|
|
|
|
|
|
//========
|
|
|
|
|
setColor(ui->checkBox_onBoard,state::success);
|
|
|
|
|
setColor(ui->checkBox_28v,state::success);
|
|
|
|
|
setColor(ui->checkBox_56v,state::success);
|
|
|
|
|
setColor(ui->checkBox_AirSpeed,state::success);
|
2020-11-05 13:44:27 +08:00
|
|
|
setColor(ui->checkBox_500W,state::failure);
|
2020-10-07 19:50:45 +08:00
|
|
|
|
2020-10-14 21:28:47 +08:00
|
|
|
//setColor(ui->label_LE_SBIT,state::failure);
|
|
|
|
|
|
|
|
|
|
|
2020-11-05 13:44:27 +08:00
|
|
|
setCheckState(6,state::failure);
|
|
|
|
|
setCheckState(7,state::failure);
|
|
|
|
|
setCheckState(8,state::failure);
|
|
|
|
|
setCheckState(9,state::failure);
|
|
|
|
|
setCheckState(10,state::failure);
|
|
|
|
|
setCheckState(11,state::failure);
|
2020-10-14 21:28:47 +08:00
|
|
|
|
|
|
|
|
|
2020-12-09 11:49:59 +08:00
|
|
|
|
|
|
|
|
|
2020-10-06 17:11:59 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ServoSystem::~ServoSystem()
|
|
|
|
|
{
|
|
|
|
|
delete ui;
|
|
|
|
|
}
|
2020-10-07 19:50:45 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
void ServoSystem::setBUMState(mavlink_bmustate_t *t)
|
|
|
|
|
{
|
|
|
|
|
|
2020-10-16 17:06:18 +08:00
|
|
|
|
2020-10-14 21:28:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ServoSystem::setCheckState(uint32_t pos,QVariant value)
|
|
|
|
|
{
|
2021-06-27 18:25:22 +08:00
|
|
|
|
2020-10-13 21:15:35 +08:00
|
|
|
}
|
2020-10-08 14:09:16 +08:00
|
|
|
|
2020-12-26 15:17:45 +08:00
|
|
|
void ServoSystem::setServoState(mavlink_servo_output_raw_t t)
|
2020-10-13 21:15:35 +08:00
|
|
|
{
|
2020-12-08 22:21:52 +08:00
|
|
|
|
2020-12-26 15:17:45 +08:00
|
|
|
|
2020-10-08 17:32:13 +08:00
|
|
|
|
2020-10-07 19:50:45 +08:00
|
|
|
}
|