mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
small fix and some cleaning
This commit is contained in:
parent
5e43f85cc4
commit
761da06b6f
@ -148,6 +148,7 @@ QIODevice *SerialConnection::openDevice(const QString &deviceName)
|
||||
//we need to handle port settings here...
|
||||
PortSettings set;
|
||||
set.BaudRate = stringToBaud(m_config->speed());
|
||||
qDebug()<<"Serial telemetry running at "<<m_config->speed();
|
||||
set.DataBits = DATA_8;
|
||||
set.Parity = PAR_NONE;
|
||||
set.StopBits = STOP_1;
|
||||
@ -227,6 +228,8 @@ BaudRateType SerialConnection::stringToBaud(QString str)
|
||||
return BAUD460800;
|
||||
else if(str== "921600")
|
||||
return BAUD921600;
|
||||
else
|
||||
return BAUD56000;
|
||||
}
|
||||
|
||||
SerialPlugin::SerialPlugin()
|
||||
|
@ -1,14 +1,14 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file dialpluginconfiguration.cpp
|
||||
* @file serialpluginconfiguration.cpp
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @see The GNU Public License (GPL) Version 3
|
||||
* @addtogroup GCSPlugins GCS Plugins
|
||||
* @{
|
||||
* @addtogroup DialPlugin Dial Plugin
|
||||
* @addtogroup SerialPlugin Serial Connection Plugin
|
||||
* @{
|
||||
* @brief Plots flight information rotary style dials
|
||||
* @brief Impliments serial connection to the flight hardware for Telemetry
|
||||
*****************************************************************************/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -62,13 +62,12 @@ void SerialPluginConfiguration::saveConfig(QSettings* settings) const {
|
||||
void SerialPluginConfiguration::restoresettings()
|
||||
{
|
||||
settings->beginGroup(QLatin1String("SerialConnection"));
|
||||
|
||||
QString str=(settings->value(QLatin1String("speed"), tr("")).toString());
|
||||
if(str.isEmpty())
|
||||
m_speed="57600";
|
||||
else
|
||||
m_speed=str;
|
||||
settings->endGroup();
|
||||
QString str=(settings->value(QLatin1String("speed"), tr("")).toString());
|
||||
if(str.isEmpty())
|
||||
m_speed="57600";
|
||||
else
|
||||
m_speed=str;
|
||||
settings->endGroup();
|
||||
|
||||
}
|
||||
void SerialPluginConfiguration::savesettings() const
|
||||
@ -77,3 +76,6 @@ void SerialPluginConfiguration::savesettings() const
|
||||
settings->setValue(QLatin1String("speed"), m_speed);
|
||||
settings->endGroup();
|
||||
}
|
||||
SerialPluginConfiguration::~SerialPluginConfiguration()
|
||||
{
|
||||
}
|
||||
|
@ -6,9 +6,9 @@
|
||||
* @see The GNU Public License (GPL) Version 3
|
||||
* @addtogroup GCSPlugins GCS Plugins
|
||||
* @{
|
||||
* @addtogroup SerialPlugin Serial Plugin
|
||||
* @addtogroup SerialPlugin Serial Connection Plugin
|
||||
* @{
|
||||
* @brief Plots flight information rotary style Serials
|
||||
* @brief Impliments serial connection to the flight hardware for Telemetry
|
||||
*****************************************************************************/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -46,7 +46,7 @@ public:
|
||||
IUAVGadgetConfiguration *clone();
|
||||
void savesettings() const;
|
||||
void restoresettings();
|
||||
|
||||
virtual ~SerialPluginConfiguration();
|
||||
private:
|
||||
QString m_speed;
|
||||
QSettings* settings;
|
||||
|
@ -1,16 +1,16 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file dialpluginoptionspage.cpp
|
||||
* @file serialpluginoptionspage.cpp
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @see The GNU Public License (GPL) Version 3
|
||||
* @addtogroup GCSPlugins GCS Plugins
|
||||
* @{
|
||||
* @addtogroup DialPlugin Dial Plugin
|
||||
* @addtogroup SerialPlugin Serial Connection Plugin
|
||||
* @{
|
||||
* @brief Plots flight information rotary style dials
|
||||
* @brief Impliments serial connection to the flight hardware for Telemetry
|
||||
*****************************************************************************/
|
||||
/*
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
@ -67,5 +67,5 @@ void SerialPluginOptionsPage::apply()
|
||||
|
||||
void SerialPluginOptionsPage::finish()
|
||||
{
|
||||
delete m_config;
|
||||
delete options_page;
|
||||
}
|
||||
|
@ -1,16 +1,16 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file Serialpluginoptionspage.h
|
||||
* @file serialpluginoptionspage.h
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @see The GNU Public License (GPL) Version 3
|
||||
* @addtogroup GCSPlugins GCS Plugins
|
||||
* @{
|
||||
* @addtogroup SerialPlugin Serial Plugin
|
||||
* @addtogroup SerialPlugin Serial Connection Plugin
|
||||
* @{
|
||||
* @brief Plots flight information rotary style Serials
|
||||
* @brief Impliments serial connection to the flight hardware for Telemetry
|
||||
*****************************************************************************/
|
||||
/*
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
|
Loading…
Reference in New Issue
Block a user