mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-26 15:54:15 +01:00
LP-410 misc log silencing
This commit is contained in:
parent
7e99441005
commit
8931cd48f5
@ -89,7 +89,7 @@ void AntennaTrackGadget::loadConfiguration(IUAVGadgetConfiguration *config)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_widget->dataStreamGroupBox->setHidden(false);
|
m_widget->dataStreamGroupBox->setHidden(false);
|
||||||
qDebug() << "Using Telemetry parser";
|
|
||||||
parser = new TelemetryParser();
|
parser = new TelemetryParser();
|
||||||
|
|
||||||
connect(parser, SIGNAL(position(double, double, double)), m_widget, SLOT(setPosition(double, double, double)));
|
connect(parser, SIGNAL(position(double, double, double)), m_widget, SLOT(setPosition(double, double, double)));
|
||||||
|
@ -874,7 +874,7 @@ void ConfigMultiRotorWidget::reverseMultirotorMotor()
|
|||||||
|
|
||||||
void ConfigMultiRotorWidget::updateAirframe(QString frameType)
|
void ConfigMultiRotorWidget::updateAirframe(QString frameType)
|
||||||
{
|
{
|
||||||
qDebug() << "ConfigMultiRotorWidget::updateAirframe - frame type" << frameType;
|
// qDebug() << "ConfigMultiRotorWidget::updateAirframe - frame type" << frameType;
|
||||||
|
|
||||||
QString elementId;
|
QString elementId;
|
||||||
if (frameType == "Tri" || frameType == "Tricopter Y") {
|
if (frameType == "Tri" || frameType == "Tricopter Y") {
|
||||||
|
@ -441,7 +441,7 @@ void ConnectionManager::devChanged(IConnection *connection)
|
|||||||
|
|
||||||
updateConnectionDropdown();
|
updateConnectionDropdown();
|
||||||
|
|
||||||
qDebug() << "# devices " << m_devList.count();
|
qDebug() << "ConnectionManager::devChanged - device count:" << m_devList.count();
|
||||||
emit availableDevicesChanged(m_devList);
|
emit availableDevicesChanged(m_devList);
|
||||||
|
|
||||||
|
|
||||||
@ -464,9 +464,8 @@ void ConnectionManager::updateConnectionDropdown()
|
|||||||
m_availableDevList->setCurrentIndex(m_availableDevList->count() - 1);
|
m_availableDevList->setCurrentIndex(m_availableDevList->count() - 1);
|
||||||
}
|
}
|
||||||
if (m_mainWindow->generalSettings()->autoConnect() && polling) {
|
if (m_mainWindow->generalSettings()->autoConnect() && polling) {
|
||||||
qDebug() << "Automatically opening device";
|
qDebug() << "ConnectionManager::updateConnectionDropdown - auto-connecting USB device";
|
||||||
connectDevice(d);
|
connectDevice(d);
|
||||||
qDebug() << "ConnectionManager::updateConnectionDropdown autoconnected USB device";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,6 @@
|
|||||||
#include <QtCore/QDebug>
|
#include <QtCore/QDebug>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|
||||||
|
|
||||||
using namespace Core;
|
using namespace Core;
|
||||||
|
|
||||||
static const UAVConfigVersion m_versionUAVGadgetConfigurations = UAVConfigVersion("1.2.0");
|
static const UAVConfigVersion m_versionUAVGadgetConfigurations = UAVConfigVersion("1.2.0");
|
||||||
@ -116,7 +115,7 @@ void UAVGadgetInstanceManager::readConfigs_1_2_0(QSettings *qs)
|
|||||||
|
|
||||||
configs = qs->childGroups();
|
configs = qs->childGroups();
|
||||||
foreach(QString configName, configs) {
|
foreach(QString configName, configs) {
|
||||||
qDebug() << "Loading config: " << classId << "," << configName;
|
// qDebug() << "Loading config: " << classId << "," << configName;
|
||||||
qs->beginGroup(configName);
|
qs->beginGroup(configName);
|
||||||
configInfo.read(qs);
|
configInfo.read(qs);
|
||||||
configInfo.setNameOfConfigurable(classId + "-" + configName);
|
configInfo.setNameOfConfigurable(classId + "-" + configName);
|
||||||
@ -166,7 +165,7 @@ void UAVGadgetInstanceManager::readConfigs_1_1_0(QSettings *qs)
|
|||||||
|
|
||||||
configs = qs->childGroups();
|
configs = qs->childGroups();
|
||||||
foreach(QString configName, configs) {
|
foreach(QString configName, configs) {
|
||||||
qDebug().nospace() << "Loading config: " << classId << ", " << configName;
|
// qDebug().nospace() << "Loading config: " << classId << ", " << configName;
|
||||||
qs->beginGroup(configName);
|
qs->beginGroup(configName);
|
||||||
bool locked = qs->value("config.locked").toBool();
|
bool locked = qs->value("config.locked").toBool();
|
||||||
configInfo.setNameOfConfigurable(classId + "-" + configName);
|
configInfo.setNameOfConfigurable(classId + "-" + configName);
|
||||||
@ -250,8 +249,8 @@ void UAVGadgetInstanceManager::createOptionsPages()
|
|||||||
m_pm->addObject(page);
|
m_pm->addObject(page);
|
||||||
} else {
|
} else {
|
||||||
qWarning()
|
qWarning()
|
||||||
<< "UAVGadgetInstanceManager::createOptionsPages - failed to create options page for configuration "
|
<< "UAVGadgetInstanceManager::createOptionsPages - failed to create options page for configuration"
|
||||||
+ config->classId() + ":" + config->name() + ", configuration will be removed.";
|
<< (config->classId() + ":" + config->name()) << ", configuration will be removed.";
|
||||||
// The m_optionsPages list and m_configurations list must be in synch otherwise nasty issues happen later
|
// The m_optionsPages list and m_configurations list must be in synch otherwise nasty issues happen later
|
||||||
// so if we fail to create an options page we must remove the associated configuration
|
// so if we fail to create an options page we must remove the associated configuration
|
||||||
ite.remove();
|
ite.remove();
|
||||||
|
@ -91,7 +91,6 @@ void GpsDisplayGadget::loadConfiguration(IUAVGadgetConfiguration *config)
|
|||||||
}
|
}
|
||||||
m_widget->dataStreamGroupBox->setHidden(false);
|
m_widget->dataStreamGroupBox->setHidden(false);
|
||||||
} else if (gpsDisplayConfig->connectionMode() == "Telemetry") {
|
} else if (gpsDisplayConfig->connectionMode() == "Telemetry") {
|
||||||
qDebug() << "Using Telemetry parser";
|
|
||||||
parser = new TelemetryParser();
|
parser = new TelemetryParser();
|
||||||
m_widget->disconnectButton->setHidden(true);
|
m_widget->disconnectButton->setHidden(true);
|
||||||
m_widget->connectButton->setHidden(true);
|
m_widget->connectButton->setHidden(true);
|
||||||
|
@ -67,7 +67,7 @@ QList<QQmlError> PfdQmlGadgetWidget::errors() const
|
|||||||
|
|
||||||
void PfdQmlGadgetWidget::loadConfiguration(PfdQmlGadgetConfiguration *config)
|
void PfdQmlGadgetWidget::loadConfiguration(PfdQmlGadgetConfiguration *config)
|
||||||
{
|
{
|
||||||
qDebug() << "PfdQmlGadgetWidget::loadConfiguration" << config->name();
|
// qDebug() << "PfdQmlGadgetWidget::loadConfiguration" << config->name();
|
||||||
|
|
||||||
if (!m_quickWidgetProxy) {
|
if (!m_quickWidgetProxy) {
|
||||||
m_quickWidgetProxy = new QuickWidgetProxy(this);
|
m_quickWidgetProxy = new QuickWidgetProxy(this);
|
||||||
@ -85,7 +85,7 @@ void PfdQmlGadgetWidget::loadConfiguration(PfdQmlGadgetConfiguration *config)
|
|||||||
layout()->addWidget(m_quickWidgetProxy->widget());
|
layout()->addWidget(m_quickWidgetProxy->widget());
|
||||||
}
|
}
|
||||||
|
|
||||||
setQmlFile("");
|
clear();
|
||||||
|
|
||||||
m_pfdQmlContext->loadConfiguration(config);
|
m_pfdQmlContext->loadConfiguration(config);
|
||||||
|
|
||||||
@ -110,28 +110,35 @@ void PfdQmlGadgetWidget::setQmlFile(QString fn)
|
|||||||
m_qmlFileName = fn;
|
m_qmlFileName = fn;
|
||||||
|
|
||||||
if (fn.isEmpty()) {
|
if (fn.isEmpty()) {
|
||||||
setSource(QUrl());
|
clear();
|
||||||
|
return;
|
||||||
engine()->removeImageProvider("svg");
|
|
||||||
engine()->rootContext()->setContextProperty("svgRenderer", NULL);
|
|
||||||
|
|
||||||
// calling clearComponentCache() causes crashes (see https://bugreports.qt-project.org/browse/QTBUG-41465)
|
|
||||||
// but not doing it causes almost systematic crashes when switching PFD gadget to "Model View (Without Terrain)" configuration
|
|
||||||
engine()->clearComponentCache();
|
|
||||||
} else {
|
|
||||||
SvgImageProvider *svgProvider = new SvgImageProvider(fn);
|
|
||||||
engine()->addImageProvider("svg", svgProvider);
|
|
||||||
|
|
||||||
// it's necessary to allow qml side to query svg element position
|
|
||||||
engine()->rootContext()->setContextProperty("svgRenderer", svgProvider);
|
|
||||||
|
|
||||||
QUrl url = QUrl::fromLocalFile(fn);
|
|
||||||
engine()->setBaseUrl(url);
|
|
||||||
|
|
||||||
setSource(url);
|
|
||||||
}
|
}
|
||||||
|
SvgImageProvider *svgProvider = new SvgImageProvider(fn);
|
||||||
|
engine()->addImageProvider("svg", svgProvider);
|
||||||
|
|
||||||
|
// it's necessary to allow qml side to query svg element position
|
||||||
|
engine()->rootContext()->setContextProperty("svgRenderer", svgProvider);
|
||||||
|
|
||||||
|
QUrl url = QUrl::fromLocalFile(fn);
|
||||||
|
engine()->setBaseUrl(url);
|
||||||
|
|
||||||
|
setSource(url);
|
||||||
|
|
||||||
foreach(const QQmlError &error, errors()) {
|
foreach(const QQmlError &error, errors()) {
|
||||||
qDebug() << "PfdQmlGadgetWidget - " << error.description();
|
qDebug() << "PfdQmlGadgetWidget - " << error.description();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PfdQmlGadgetWidget::clear()
|
||||||
|
{
|
||||||
|
// qDebug() << "PfdQmlGadgetWidget::clear";
|
||||||
|
|
||||||
|
setSource(QUrl());
|
||||||
|
|
||||||
|
engine()->removeImageProvider("svg");
|
||||||
|
engine()->rootContext()->setContextProperty("svgRenderer", NULL);
|
||||||
|
|
||||||
|
// calling clearComponentCache() causes crashes (see https://bugreports.qt-project.org/browse/QTBUG-41465)
|
||||||
|
// but not doing it causes almost systematic crashes when switching PFD gadget to "Model View (Without Terrain)" configuration
|
||||||
|
engine()->clearComponentCache();
|
||||||
|
}
|
||||||
|
@ -50,16 +50,18 @@ public:
|
|||||||
void restoreState(QSettings *);
|
void restoreState(QSettings *);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
QuickWidgetProxy *m_quickWidgetProxy;
|
||||||
|
|
||||||
|
PfdQmlContext *m_pfdQmlContext;
|
||||||
|
QString m_qmlFileName;
|
||||||
|
|
||||||
void setQmlFile(QString);
|
void setQmlFile(QString);
|
||||||
|
void clear();
|
||||||
|
|
||||||
void setSource(const QUrl &url);
|
void setSource(const QUrl &url);
|
||||||
QQmlEngine *engine() const;
|
QQmlEngine *engine() const;
|
||||||
QList<QQmlError> errors() const;
|
QList<QQmlError> errors() const;
|
||||||
|
|
||||||
QuickWidgetProxy *m_quickWidgetProxy;
|
|
||||||
|
|
||||||
PfdQmlContext *m_pfdQmlContext;
|
|
||||||
QString m_qmlFileName;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* PFDQMLGADGETWIDGET_H_ */
|
#endif /* PFDQMLGADGETWIDGET_H_ */
|
||||||
|
@ -73,12 +73,12 @@ void SerialPluginConfiguration::restoresettings()
|
|||||||
{
|
{
|
||||||
settings->beginGroup(QLatin1String("SerialConnection"));
|
settings->beginGroup(QLatin1String("SerialConnection"));
|
||||||
QString str = (settings->value(QLatin1String("speed"), tr("")).toString());
|
QString str = (settings->value(QLatin1String("speed"), tr("")).toString());
|
||||||
qDebug() << "SerialPluginConfiguration::restoresettings - speed" << str;
|
|
||||||
if (str.isEmpty()) {
|
if (str.isEmpty()) {
|
||||||
m_speed = "57600";
|
m_speed = "57600";
|
||||||
} else {
|
} else {
|
||||||
m_speed = str;
|
m_speed = str;
|
||||||
}
|
}
|
||||||
|
// qDebug() << "SerialPluginConfiguration::restoresettings - speed" << str;
|
||||||
settings->endGroup();
|
settings->endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,7 +59,9 @@ UAVTalk::UAVTalk(QIODevice *iodev, UAVObjectManager *objMngr) : io(iodev), objMn
|
|||||||
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
||||||
Core::Internal::GeneralSettings *settings = pm->getObject<Core::Internal::GeneralSettings>();
|
Core::Internal::GeneralSettings *settings = pm->getObject<Core::Internal::GeneralSettings>();
|
||||||
useUDPMirror = settings->useUDPMirror();
|
useUDPMirror = settings->useUDPMirror();
|
||||||
qDebug() << "USE UDP:::::::::::." << useUDPMirror;
|
if (useUDPMirror) {
|
||||||
|
qDebug() << "UAVTalk::UAVTalk -*** UDP mirror is enabled ***";
|
||||||
|
}
|
||||||
if (useUDPMirror) {
|
if (useUDPMirror) {
|
||||||
udpSocketTx = new QUdpSocket(this);
|
udpSocketTx = new QUdpSocket(this);
|
||||||
udpSocketRx = new QUdpSocket(this);
|
udpSocketRx = new QUdpSocket(this);
|
||||||
|
@ -66,7 +66,7 @@ void RunningDeviceWidget::populate()
|
|||||||
myDevice->lblDeviceID->setText(QString("Device ID: ") + QString::number(id, 16));
|
myDevice->lblDeviceID->setText(QString("Device ID: ") + QString::number(id, 16));
|
||||||
myDevice->lblBoardName->setText(deviceDescriptorStruct::idToBoardName(id));
|
myDevice->lblBoardName->setText(deviceDescriptorStruct::idToBoardName(id));
|
||||||
myDevice->lblHWRev->setText(QString(tr("HW Revision: ")) + QString::number(id & 0x00FF, 16));
|
myDevice->lblHWRev->setText(QString(tr("HW Revision: ")) + QString::number(id & 0x00FF, 16));
|
||||||
qDebug() << "CRC" << utilMngr->getFirmwareCRC();
|
// qDebug() << "CRC" << utilMngr->getFirmwareCRC();
|
||||||
myDevice->lblCRC->setText(QString(tr("Firmware CRC: ")) + QVariant(utilMngr->getFirmwareCRC()).toString());
|
myDevice->lblCRC->setText(QString(tr("Firmware CRC: ")) + QVariant(utilMngr->getFirmwareCRC()).toString());
|
||||||
// DeviceID tells us what sort of HW we have detected:
|
// DeviceID tells us what sort of HW we have detected:
|
||||||
// display a nice icon:
|
// display a nice icon:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user