Commit dffc01d6 authored by Alejandro's avatar Alejandro

Working in SLUGS widgets for debug

parent 3b928588
......@@ -452,3 +452,6 @@ win32:exists(src/lib/opalrt/OpalApi.h):exists(C:/OPAL-RT/RT-LAB7.2.4/Common/bin)
FORMS += src/ui/OpalLinkSettings.ui
DEFINES += OPAL_RT
}
TRANSLATIONS += es-MX.ts \
en-US.ts
......@@ -7,7 +7,8 @@ SlugsMAV::SlugsMAV(MAVLinkProtocol* mavlink, int id) :
// Place other initializers here
{
widgetTimer = new QTimer (this);
widgetTimer->setInterval(SLUGS_UPDATE_RATE);
widgetTimer->setInterval(200);//SLUGS_UPDATE_RATE);
qDebug() << "SLUGS_UPDATE_RATE: " << SLUGS_UPDATE_RATE;
connect (widgetTimer, SIGNAL(timeout()),
this, SLOT(emitSignals()));
......@@ -71,6 +72,7 @@ void SlugsMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
#ifdef MAVLINK_ENABLED_SLUGS
case MAVLINK_MSG_ID_RAW_IMU:
//mavlink_raw_imu_t t;
mavlink_msg_raw_imu_decode(&message, &mlRawImuData);
break;
......
......@@ -244,7 +244,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
mavlink_msg_sys_status_decode(&message, &state);
// FIXME
qDebug() << "1 SYSTEM STATUS:" << state.status;
//qDebug() << "1 SYSTEM STATUS:" << state.status;
QString audiostring = "System " + QString::number(this->getUASID());
QString stateAudio = "";
......@@ -260,12 +260,13 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
emit statusChanged(this, uasState, stateDescription);
emit statusChanged(this->status);
emit loadChanged(this,state.load/10.0f);
emit valueChanged(uasId, "Load", "%", ((float)state.load)/1000.0f, MG::TIME::getGroundTimeNow());
stateAudio = " changed status to " + uasState;
}
qDebug() << "1 SYSTEM MODE:" << state.mode;
qDebug() << "1 THIS MODE:" << this->mode;
//qDebug() << "1 SYSTEM MODE:" << state.mode;
//qDebug() << "1 THIS MODE:" << this->mode;
if (this->mode != static_cast<unsigned int>(state.mode))
{
modechanged = true;
......@@ -308,7 +309,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
emit modeChanged(this->getUASID(), mode, "");
qDebug() << "2 SYSTEM MODE:" << mode;
//qDebug() << "2 SYSTEM MODE:" << mode;
modeAudio = " is now in " + mode;
}
......@@ -333,6 +334,16 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
// COMMUNICATIONS DROP RATE
emit dropRateChanged(this->getUASID(), state.packet_drop/1000.0f);
//add for development
emit remoteControlRSSIChanged(state.packet_drop/1000.0f);
float en = state.packet_drop/1000.0f;
emit remoteControlChannelRawChanged(0, en);//MAVLINK_MSG_ID_RC_CHANNELS_RAW
emit remoteControlChannelScaledChanged(0, en/100.0f);//MAVLINK_MSG_ID_RC_CHANNELS_SCALED
//qDebug() << __FILE__ << __LINE__ << "RCV LOSS: " << state.packet_drop;
// AUDIO
......
......@@ -537,30 +537,30 @@ void MainWindow::buildSlugsWidgets()
addToToolsMenu (rcViewDockWidget, tr("Radio Control"), SLOT(showToolWidget(bool)), MENU_RC_VIEW, Qt::BottomDockWidgetArea);
}
// if (!slugsDataWidget)
// {
// // Dialog widgets
// slugsDataWidget = new QDockWidget(tr("Slugs Data"), this);
// slugsDataWidget->setWidget( new SlugsDataSensorView(this));
// slugsDataWidget->setObjectName("SLUGS_DATA_DOCK_WIDGET");
// addToToolsMenu (slugsDataWidget, tr("Telemetry Data"), SLOT(showToolWidget()), MENU_SLUGS_DATA, Qt::RightDockWidgetArea);
// }
if (!slugsDataWidget)
{
// Dialog widgets
slugsDataWidget = new QDockWidget(tr("Slugs Data"), this);
slugsDataWidget->setWidget( new SlugsDataSensorView(this));
slugsDataWidget->setObjectName("SLUGS_DATA_DOCK_WIDGET");
addToToolsMenu (slugsDataWidget, tr("Telemetry Data"), SLOT(showToolWidget(bool)), MENU_SLUGS_DATA, Qt::RightDockWidgetArea);
}
// if (!slugsPIDControlWidget)
// {
// slugsPIDControlWidget = new QDockWidget(tr("Slugs PID Control"), this);
// slugsPIDControlWidget->setWidget(new SlugsPIDControl(this));
// slugsPIDControlWidget->setObjectName("SLUGS_PID_CONTROL_DOCK_WIDGET");
// addToToolsMenu (slugsPIDControlWidget, tr("PID Configuration"), SLOT(showToolWidget()), MENU_SLUGS_PID, Qt::LeftDockWidgetArea);
// }
if (!slugsPIDControlWidget)
{
slugsPIDControlWidget = new QDockWidget(tr("Slugs PID Control"), this);
slugsPIDControlWidget->setWidget(new SlugsPIDControl(this));
slugsPIDControlWidget->setObjectName("SLUGS_PID_CONTROL_DOCK_WIDGET");
addToToolsMenu (slugsPIDControlWidget, tr("PID Configuration"), SLOT(showToolWidget(bool)), MENU_SLUGS_PID, Qt::LeftDockWidgetArea);
}
// if (!slugsHilSimWidget)
// {
// slugsHilSimWidget = new QDockWidget(tr("Slugs Hil Sim"), this);
// slugsHilSimWidget->setWidget( new SlugsHilSim(this));
// slugsHilSimWidget->setObjectName("SLUGS_HIL_SIM_DOCK_WIDGET");
// addToToolsMenu (slugsHilSimWidget, tr("HIL Sim Configuration"), SLOT(showToolWidget()), MENU_SLUGS_HIL, Qt::LeftDockWidgetArea);
// }
if (!slugsHilSimWidget)
{
slugsHilSimWidget = new QDockWidget(tr("Slugs Hil Sim"), this);
slugsHilSimWidget->setWidget( new SlugsHilSim(this));
slugsHilSimWidget->setObjectName("SLUGS_HIL_SIM_DOCK_WIDGET");
addToToolsMenu (slugsHilSimWidget, tr("HIL Sim Configuration"), SLOT(showToolWidget(bool)), MENU_SLUGS_HIL, Qt::LeftDockWidgetArea);
}
// if (!slugsCamControlWidget)
// {
......@@ -1024,7 +1024,10 @@ void MainWindow::connectSlugsWidgets()
slugsDataWidget->widget(), SLOT(setActiveUAS(UASInterface*)));
}
if (slugsPIDControlWidget && slugsPIDControlWidget->widget()){
connect(UASManager::instance(), SIGNAL(activeUASSet(UASInterface*)),
slugsPIDControlWidget->widget(), SLOT(activeUasSet(UASInterface*)));
}
}
void MainWindow::arrangeCommonCenterStack()
......@@ -1547,6 +1550,15 @@ void MainWindow::UASCreated(UASInterface* uas)
// Connect Slugs Actions
connectSlugsActions();
// if(slugsDataWidget)
// {
// SlugsDataSensorView *mm = dynamic_cast<SlugsDataSensorView*>(slugsDataWidget->widget());
// if(mm)
// {
// mm->addUAS(uas);
// }
// }
// FIXME: This type checking might be redundant
// // if (slugsDataWidget) {
// // SlugsDataSensorView* dataWidget = dynamic_cast<SlugsDataSensorView*>(slugsDataWidget->widget());
......
......@@ -43,33 +43,17 @@ QGCRemoteControlView::QGCRemoteControlView(QWidget *parent) :
uasId(-1),
rssi(0.0f),
updated(false),
channelLayout(new QVBoxLayout()),
ui(new Ui::QGCRemoteControlView)
channelLayout(new QVBoxLayout())//,
//ui(new Ui::QGCRemoteControlView)
{
//ui->setupUi(this);
ui->setupUi(this);
QGridLayout* layout = new QGridLayout(this);
layout->addLayout(channelLayout, 1, 0, 1, 2);
// Name label
nameLabel = new QLabel(this);
nameLabel->setText("No MAV selected yet..");
layout->addWidget(nameLabel, 0, 0, 1, 2);
// RSSI bar
// Create new layout
QHBoxLayout* rssiLayout = new QHBoxLayout();
rssiLayout->setSpacing(5);
// Add content
rssiLayout->addWidget(new QLabel(tr("Signal"), this));
// Append raw label
// Append progress bar
rssiBar = new QProgressBar(this);
rssiBar->setMinimum(0);
rssiBar->setMaximum(100);
rssiBar->setValue(0);
rssiLayout->addWidget(rssiBar);
layout->addItem(rssiLayout, 2, 0, 1, 2);
setVisible(false);
this->setVisible(false);
//setVisible(false);
calibrate = new QPushButton(tr("Calibrate"), this);
QHBoxLayout *calibrateButtonLayout = new QHBoxLayout();
......@@ -112,13 +96,13 @@ void QGCRemoteControlView::setUASId(int id)
nameLabel->setText(QString("RC Input of %1").arg(newUAS->getUASName()));
calibrationWindow->setUASId(id);
connect(newUAS, SIGNAL(radioCalibrationReceived(const QPointer<RadioCalibrationData>&)), calibrationWindow, SLOT(receive(const QPointer<RadioCalibrationData>&)));
connect(newUAS, SIGNAL(remoteControlRSSIChanged(float)), this, SLOT(setRemoteRSSI(float)));
connect(newUAS, SIGNAL(remoteControlRSSIChanged(float)), this, SLOT(setRemoteRSSI(float)));
connect(newUAS, SIGNAL(remoteControlChannelRawChanged(int,float)), this, SLOT(setChannelRaw(int,float)));
// connect(newUAS, SIGNAL(remoteControlChannelRawChanged(int,float)), calibrationWindow, SLOT(setChannelRaw(int,float)));
connect(newUAS, SIGNAL(remoteControlChannelScaledChanged(int,float)), this, SLOT(setChannelScaled(int,float)));
// connect(newUAS, SIGNAL(remoteControlChannelScaledChanged(int,float)), calibrationWindow, SLOT(setChannelScaled(int,float)));
//now comment//connect(newUAS, SIGNAL(remoteControlChannelRawChanged(int,float)), calibrationWindow, SLOT(setChannelRaw(int,float)));
//connect(newUAS, SIGNAL(remoteControlChannelScaledChanged(int,float)), this, SLOT(setChannelScaled(int,float)));
//now comment//connect(newUAS, SIGNAL(remoteControlChannelScaledChanged(int,float)), calibrationWindow, SLOT(setChannelScaled(int,float)));
}
}
......@@ -129,7 +113,7 @@ void QGCRemoteControlView::setChannelRaw(int channelId, float raw)
{
// This is a new channel, append it
this->raw.append(raw);
this->normalized.append(0);
//this->normalized.append(0);
appendChannelWidget(channelId);
}
else
......@@ -143,25 +127,25 @@ void QGCRemoteControlView::setChannelRaw(int channelId, float raw)
redraw();
}
void QGCRemoteControlView::setChannelScaled(int channelId, float normalized)
{
if (this->raw.size() <= channelId) // using raw vector as size indicator
{
// This is a new channel, append it
this->normalized.append(normalized);
this->raw.append(0);
appendChannelWidget(channelId);
}
else
{
// This is an existing channel, update it
this->normalized[channelId] = normalized;
}
updated = true;
//void QGCRemoteControlView::setChannelScaled(int channelId, float normalized)
//{
// if (this->raw.size() <= channelId) // using raw vector as size indicator
// {
// // This is a new channel, append it
// this->normalized.append(normalized);
// this->raw.append(0);
// appendChannelWidget(channelId);
// }
// else
// {
// // This is an existing channel, update it
// this->normalized[channelId] = normalized;
// }
// updated = true;
// FIXME Will be timer based in the future
redraw();
}
// // FIXME Will be timer based in the future
// redraw();
//}
void QGCRemoteControlView::setRemoteRSSI(float rssiNormalized)
{
......@@ -195,15 +179,19 @@ void QGCRemoteControlView::redraw()
if(isVisible() && updated)
{
// Update raw values
for(int i = 0; i < rawLabels.count(); i++)
{
rawLabels.at(i)->setText(QString("%1 us").arg(raw.at(i), 4, 10, QChar('0')));
}
//for(int i = 0; i < rawLabels.count(); i++)
//{
//rawLabels.at(i)->setText(QString("%1 us").arg(raw.at(i), 4, 10, QChar('0')));
//}
// Update percent bars
for(int i = 0; i < progressBars.count(); i++)
{
progressBars.at(i)->setValue(normalized.at(i)*100.0f);
rawLabels.at(i)->setText(QString("%1 us").arg(raw.at(i), 4, 10, QChar('0')));
//int vv = normalized.at(i)*100.0f;
//progressBars.at(i)->setValue(vv);
int vv = raw.at(i)*1.0f;
progressBars.at(i)->setValue(vv);
}
updated = false;
}
......
......@@ -53,7 +53,7 @@ public:
public slots:
void setUASId(int id);
void setChannelRaw(int channelId, float raw);
void setChannelScaled(int channelId, float normalized);
//void setChannelScaled(int channelId, float normalized);
void setRemoteRSSI(float rssiNormalized);
void redraw();
......
......@@ -6,327 +6,13 @@
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
<width>155</width>
<height>106</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<widget class="QPushButton" name="pushButton">
<property name="geometry">
<rect>
<x>300</x>
<y>260</y>
<width>93</width>
<height>27</height>
</rect>
</property>
<property name="text">
<string>Calibrate</string>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>10</x>
<y>270</y>
<width>171</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Remote Control detected</string>
</property>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>71</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Channel 1</string>
</property>
</widget>
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>71</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Channel 2</string>
</property>
</widget>
<widget class="QLabel" name="label_4">
<property name="geometry">
<rect>
<x>10</x>
<y>50</y>
<width>71</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Channel 3</string>
</property>
</widget>
<widget class="QLabel" name="label_5">
<property name="geometry">
<rect>
<x>10</x>
<y>70</y>
<width>71</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Channel 4</string>
</property>
</widget>
<widget class="QLabel" name="label_6">
<property name="geometry">
<rect>
<x>10</x>
<y>90</y>
<width>71</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Channel 5</string>
</property>
</widget>
<widget class="QLabel" name="label_7">
<property name="geometry">
<rect>
<x>10</x>
<y>110</y>
<width>71</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Channel 6</string>
</property>
</widget>
<widget class="QLabel" name="label_8">
<property name="geometry">
<rect>
<x>10</x>
<y>130</y>
<width>71</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Channel 7</string>
</property>
</widget>
<widget class="QLabel" name="label_9">
<property name="geometry">
<rect>
<x>10</x>
<y>150</y>
<width>71</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Channel 8</string>
</property>
</widget>
<widget class="QLabel" name="label_10">
<property name="geometry">
<rect>
<x>10</x>
<y>170</y>
<width>62</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>RSSI</string>
</property>
</widget>
<widget class="QProgressBar" name="chan1ProgressBar">
<property name="geometry">
<rect>
<x>200</x>
<y>10</y>
<width>118</width>
<height>16</height>
</rect>
</property>
<property name="minimum">
<number>-100</number>
</property>
<property name="value">
<number>0</number>
</property>
<property name="textVisible">
<bool>true</bool>
</property>
<property name="invertedAppearance">
<bool>false</bool>
</property>
<property name="format">
<string>%v%</string>
</property>
</widget>
<widget class="QProgressBar" name="chan2ProgressBar">
<property name="geometry">
<rect>
<x>200</x>
<y>30</y>
<width>118</width>
<height>16</height>
</rect>
</property>
<property name="minimum">
<number>-100</number>
</property>
<property name="value">
<number>0</number>
</property>
<property name="format">
<string>%v%</string>
</property>
</widget>
<widget class="QProgressBar" name="chan3ProgressBar">
<property name="geometry">
<rect>
<x>200</x>
<y>50</y>
<width>118</width>
<height>16</height>
</rect>
</property>
<property name="minimum">
<number>-100</number>
</property>
<property name="value">
<number>0</number>
</property>
<property name="format">
<string>%v%</string>
</property>
</widget>
<widget class="QProgressBar" name="chan4ProgressBar">
<property name="geometry">
<rect>
<x>200</x>
<y>70</y>
<width>118</width>
<height>16</height>
</rect>
</property>
<property name="minimum">
<number>-100</number>
</property>
<property name="value">
<number>0</number>
</property>
<property name="format">
<string>%v%</string>
</property>
</widget>
<widget class="QProgressBar" name="chan5ProgressBar">
<property name="geometry">
<rect>
<x>200</x>
<y>90</y>
<width>118</width>
<height>16</height>
</rect>
</property>
<property name="minimum">
<number>-100</number>
</property>
<property name="value">
<number>0</number>
</property>
<property name="format">
<string>%v%</string>
</property>
</widget>
<widget class="QProgressBar" name="chan6ProgressBar">
<property name="geometry">
<rect>
<x>200</x>
<y>110</y>
<width>118</width>
<height>16</height>
</rect>
</property>
<property name="minimum">
<number>-100</number>
</property>
<property name="value">
<number>0</number>
</property>
<property name="format">
<string>%v%</string>
</property>
</widget>
<widget class="QProgressBar" name="chan7ProgressBar">
<property name="geometry">
<rect>
<x>200</x>
<y>130</y>
<width>118</width>
<height>16</height>
</rect>
</property>
<property name="minimum">
<number>-100</number>
</property>
<property name="value">
<number>0</number>
</property>
<property name="format">
<string>%v%</string>
</property>
</widget>
<widget class="QProgressBar" name="chan8ProgressBar">
<property name="geometry">
<rect>
<x>200</x>
<y>150</y>
<width>118</width>
<height>16</height>
</rect>
</property>
<property name="minimum">
<number>-100</number>
</property>
<property name="value">
<number>0</number>
</property>
<property name="format">
<string>%v%</string>
</property>
</widget>
<widget class="QLabel" name="label_11">
<property name="geometry">
<rect>
<x>90</x>
<y>10</y>
<width>41</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>1120</string>
</property>
</widget>
</widget>
<resources/>
<connections/>
......
......@@ -43,13 +43,11 @@ void SlugsDataSensorView::addUAS(UASInterface* uas)
connect(slugsMav, SIGNAL(globalPositionChanged(UASInterface*,double,double,double,quint64)), this, SLOT(slugsGlobalPositionChanged(UASInterface*,double,double,double,quint64)));
connect(slugsMav,SIGNAL(slugsGPSCogSog(int,double,double)),this,SLOT(slugsGPSCogSog(int,double,double)));
//connect slugs especial messages
connect(slugsMav, SIGNAL(slugsSensorBias(int,const mavlink_sensor_bias_t&)), this, SLOT(slugsSensorBiasChanged(int,const mavlink_sensor_bias_t&)));
connect(slugsMav, SIGNAL(slugsDiagnostic(int,const mavlink_diagnostic_t&)), this, SLOT(slugsDiagnosticMessageChanged(int,const mavlink_diagnostic_t&)));
connect(slugsMav, SIGNAL(slugsCPULoad(int,const mavlink_cpu_load_t&)), this, SLOT(slugsCpuLoadChanged(int,const mavlink_cpu_load_t&)));
connect(slugsMav, SIGNAL(slugsNavegation(int,const mavlink_slugs_navigation_t&)),this,SLOT(slugsNavegationChanged(int,const mavlink_slugs_navigation_t&)));
connect(slugsMav, SIGNAL(slugsDataLog(int,const mavlink_data_log_t&)), this, SLOT(slugsDataLogChanged(int,const mavlink_data_log_t&)));
connect(slugsMav, SIGNAL(slugsPWM(int,const mavlink_pwm_commands_t&)),this,SLOT(slugsPWMChanged(int,const mavlink_pwm_commands_t&)));
......@@ -86,6 +84,7 @@ void SlugsDataSensorView::slugRawDataChanged(int uasId, const mavlink_raw_imu_t
void SlugsDataSensorView::setActiveUAS(UASInterface* uas){
activeUAS = uas;
addUAS(activeUAS);
}
#ifdef MAVLINK_ENABLED_SLUGS
......@@ -98,8 +97,6 @@ void SlugsDataSensorView::slugsGlobalPositionChanged(UASInterface *uas,
Q_UNUSED(uas);
Q_UNUSED(time);
ui->m_GpsLatitude->setText(QString::number(lat));
ui->m_GpsLongitude->setText(QString::number(lon));
ui->m_GpsHeight->setText(QString::number(alt));
......@@ -116,9 +113,10 @@ void SlugsDataSensorView::slugLocalPositionChanged(UASInterface* uas,
Q_UNUSED(uas);
Q_UNUSED(time);
ui->ed_x->setPlainText(QString::number(x));
ui->ed_y->setPlainText(QString::number(y));
ui->ed_z->setPlainText(QString::number(z));
ui->ed_x->setText(QString::number(x));
ui->ed_y->setText(QString::number(y));
ui->ed_z->setText(QString::number(z));
//qDebug()<<"Local Position = "<<x<<" - "<<y<<" - "<<z;
......@@ -132,9 +130,9 @@ void SlugsDataSensorView::slugSpeedLocalPositionChanged(UASInterface* uas,
Q_UNUSED( uas);
Q_UNUSED(time);
ui->ed_vx->setPlainText(QString::number(vx));
ui->ed_vy->setPlainText(QString::number(vy));
ui->ed_vz->setPlainText(QString::number(vz));
ui->ed_vx->setText(QString::number(vx));
ui->ed_vy->setText(QString::number(vy));
ui->ed_vz->setText(QString::number(vz));
//qDebug()<<"Speed Local Position = "<<vx<<" - "<<vy<<" - "<<vz;
......@@ -150,9 +148,9 @@ void SlugsDataSensorView::slugAttitudeChanged(UASInterface* uas,
Q_UNUSED( uas);
Q_UNUSED(time);
ui->m_Roll->setPlainText(QString::number(slugroll));
ui->m_Pitch->setPlainText(QString::number(slugpitch));
ui->m_Yaw->setPlainText(QString::number(slugyaw));
ui->m_Roll->setText(QString::number(slugroll));
ui->m_Pitch->setText(QString::number(slugpitch));
ui->m_Yaw->setText(QString::number(slugyaw));
// qDebug()<<"Attitude change = "<<slugroll<<" - "<<slugpitch<<" - "<<slugyaw;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -151,6 +151,8 @@ void SlugsHilSim::activeUasSet(UASInterface* uas){
if (uas != NULL) {
activeUas = static_cast <UAS *>(uas);
//connect(uas, SIGNAL())
}
}
......
......@@ -23,12 +23,12 @@ SlugsPIDControl::SlugsPIDControl(QWidget *parent) :
setGreenColorStyle();
refreshTimerGet = new QTimer(this);
refreshTimerGet->setInterval(100); // 10 Hz
refreshTimerGet->setInterval(200);//100); // 10 Hz
connect(refreshTimerGet, SIGNAL(timeout()), this, SLOT(slugsGetGeneral()));
refreshTimerSet = new QTimer(this);
refreshTimerSet->setInterval(100); // 20 Hz
refreshTimerSet->setInterval(200);//100); // 20 Hz
connect(refreshTimerSet, SIGNAL(timeout()), this, SLOT(slugsSetGeneral()));
......
......@@ -201,6 +201,9 @@ void UASInfoWidget::refresh()
ui.sendLossBar->setValue(sendLoss);
ui.sendLossLabel->setText(QString::number(sendLoss, 'f', 2));
ui.label_5->setText(QString::number(this->load, 'f', loadDecimals));
ui.progressBar->setValue(qMax(0, qMin(static_cast<int>(this->load), 100)));
QString errorString;
QMapIterator<QString, int> i(errors);
while (i.hasNext())
......
......@@ -194,7 +194,7 @@ void UASView::updateMode(int sysId, QString status, QString description)
{
Q_UNUSED(description);
int aa=this->uas->getUASID();
//int aa=this->uas->getUASID();
if (sysId == this->uas->getUASID()) m_ui->modeLabel->setText(status);
m_ui->modeLabel->setText(status);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment