1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 01:39:05 -05:00

Merge pull request #748 from srcejon/fixes

Feature Fixes
This commit is contained in:
Edouard Griffiths 2021-01-16 10:04:54 +01:00 committed by GitHub
commit 9147eb6046
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 60 additions and 34 deletions

View File

@ -54,10 +54,14 @@ AFC::AFC(WebAPIAdapterInterface *webAPIAdapterInterface) :
m_worker = new AFCWorker(webAPIAdapterInterface);
m_state = StIdle;
m_errorMessage = "AFC error";
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
}
AFC::~AFC()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
delete m_networkManager;
if (m_worker->isRunning()) {
stop();
}

View File

@ -174,4 +174,4 @@ private slots:
void handleInputMessages();
};
#endif // INCLUDE_FEATURE_SIMPLEPTTWORKER_H_
#endif // INCLUDE_FEATURE_AFCWORKER_H_

View File

@ -50,10 +50,14 @@ APRS::APRS(WebAPIAdapterInterface *webAPIAdapterInterface) :
m_errorMessage = "APRS error";
connect(&m_updatePipesTimer, SIGNAL(timeout()), this, SLOT(updatePipes()));
m_updatePipesTimer.start(1000);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
}
APRS::~APRS()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
delete m_networkManager;
if (m_worker->isRunning()) {
stop();
}

View File

@ -31,8 +31,8 @@ int APRSWebAPIAdapter::webapiSettingsGet(
QString& errorMessage)
{
(void) errorMessage;
response.setSimplePttSettings(new SWGSDRangel::SWGSimplePTTSettings());
response.getSimplePttSettings()->init();
response.setAprsSettings(new SWGSDRangel::SWGAPRSSettings());
response.getAprsSettings()->init();
APRS::webapiFormatFeatureSettings(response, m_settings);
return 200;

View File

@ -56,10 +56,14 @@ DemodAnalyzer::DemodAnalyzer(WebAPIAdapterInterface *webAPIAdapterInterface) :
m_worker = new DemodAnalyzerWorker();
m_state = StIdle;
m_errorMessage = "DemodAnalyzer error";
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
}
DemodAnalyzer::~DemodAnalyzer()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
delete m_networkManager;
if (m_worker->isRunning()) {
stop();
}

View File

@ -56,10 +56,14 @@ GS232Controller::GS232Controller(WebAPIAdapterInterface *webAPIAdapterInterface)
m_selectedPipe = nullptr;
connect(&m_updatePipesTimer, SIGNAL(timeout()), this, SLOT(updatePipes()));
m_updatePipesTimer.start(1000);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
}
GS232Controller::~GS232Controller()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
delete m_networkManager;
if (m_worker->isRunning()) {
stop();
}

View File

@ -31,8 +31,8 @@ int GS232ControllerWebAPIAdapter::webapiSettingsGet(
QString& errorMessage)
{
(void) errorMessage;
response.setSimplePttSettings(new SWGSDRangel::SWGSimplePTTSettings());
response.getSimplePttSettings()->init();
response.setGs232ControllerSettings(new SWGSDRangel::SWGGS232ControllerSettings());
response.getGs232ControllerSettings()->init();
GS232Controller::webapiFormatFeatureSettings(response, m_settings);
return 200;

View File

@ -49,10 +49,14 @@ Map::Map(WebAPIAdapterInterface *webAPIAdapterInterface) :
m_errorMessage = "Map error";
connect(&m_updatePipesTimer, SIGNAL(timeout()), this, SLOT(updatePipes()));
m_updatePipesTimer.start(1000);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
}
Map::~Map()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
delete m_networkManager;
}
bool Map::handleMessage(const Message& cmd)

View File

@ -31,8 +31,8 @@ int MapWebAPIAdapter::webapiSettingsGet(
QString& errorMessage)
{
(void) errorMessage;
response.setSimplePttSettings(new SWGSDRangel::SWGSimplePTTSettings());
response.getSimplePttSettings()->init();
response.setMapSettings(new SWGSDRangel::SWGMapSettings());
response.getMapSettings()->init();
Map::webapiFormatFeatureSettings(response, m_settings);
return 200;

View File

@ -20,7 +20,7 @@ To centre the map on an object or location, enter:
* Latitude and longitude. This can be in decimal degrees (E.g: -23.666413, -46.573550) or degrees, minutes and seconds (E.g: 50°40'46.461"N 95°48'26.533"W or 33d51m54.5148sS 151d12m35.6400sE).
* A Maidenhead locator (E.g: IO86av).
<h3>3: Display Names<h3>
<h3>3: Display Names</h3>
When checked, names of objects are displayed in a bubble next to each object.

View File

@ -24,7 +24,6 @@
#include "SWGFeatureSettings.h"
#include "SWGFeatureReport.h"
#include "SWGFeatureActions.h"
#include "SWGSimplePTTReport.h"
#include "SWGDeviceState.h"
#include "dsp/dspengine.h"
@ -39,18 +38,21 @@ const char* const RigCtlServer::m_featureIdURI = "sdrangel.feature.rigctlserver"
const char* const RigCtlServer::m_featureId = "RigCtlServer";
RigCtlServer::RigCtlServer(WebAPIAdapterInterface *webAPIAdapterInterface) :
Feature(m_featureIdURI, webAPIAdapterInterface),
m_ptt(false)
Feature(m_featureIdURI, webAPIAdapterInterface)
{
qDebug("RigCtlServer::RigCtlServer: webAPIAdapterInterface: %p", webAPIAdapterInterface);
setObjectName(m_featureId);
m_worker = new RigCtlServerWorker(webAPIAdapterInterface);
m_state = StIdle;
m_errorMessage = "RigCtlServer error";
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
}
RigCtlServer::~RigCtlServer()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
delete m_networkManager;
if (m_worker->isRunning()) {
stop();
}

View File

@ -122,7 +122,6 @@ private:
QThread m_thread;
RigCtlServerWorker *m_worker;
RigCtlServerSettings m_settings;
bool m_ptt;
QNetworkAccessManager *m_networkManager;
QNetworkRequest m_networkRequest;

View File

@ -31,8 +31,8 @@ int RigCtlServerWebAPIAdapter::webapiSettingsGet(
QString& errorMessage)
{
(void) errorMessage;
response.setSimplePttSettings(new SWGSDRangel::SWGSimplePTTSettings());
response.getSimplePttSettings()->init();
response.setRigCtlServerSettings(new SWGSDRangel::SWGRigCtlServerSettings());
response.getRigCtlServerSettings()->init();
RigCtlServer::webapiFormatFeatureSettings(response, m_settings);
return 200;

View File

@ -46,10 +46,14 @@ SimplePTT::SimplePTT(WebAPIAdapterInterface *webAPIAdapterInterface) :
m_worker = new SimplePTTWorker(webAPIAdapterInterface);
m_state = StIdle;
m_errorMessage = "SimplePTT error";
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
}
SimplePTT::~SimplePTT()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
delete m_networkManager;
if (m_worker->isRunning()) {
stop();
}

View File

@ -19,7 +19,7 @@ This button starts or stops the plugin. The plugin will only calculate azimuth a
Pressing this button centres the Map Feature (if open) on the current target.
<h3>3: Set latitude and longitude from My Position/h3>
<h3>3: Set latitude and longitude from My Position</h3>
When clicked, it sets the latitude, longitude and height fields to the values from SDRangel's My Position preferences.
@ -43,7 +43,7 @@ Pressing this button displays a settings dialog, that allows you to set:
* Whether to draw the Moon on the map.
* Whether to draw the target star (or galaxy) on the map.
<h3>5: Latitude/h3>
<h3>5: Latitude</h3>
Specifies the latitude in decimal degrees of the observation point (antenna location).
@ -96,7 +96,7 @@ Displays the calculated azimuth (angle in degrees, clockwise from North) to the
Displays the calculated elevation (angle in degrees - 0 to horizon and 90 to zenith) to the object.
<h3>13: Elevation vs Time Plot<h3>
<h3>13: Elevation vs Time Plot</h3>
In order to assit in determining whether and when observations of the target object may be possible, an elevation vs time plot is drawn for the 24 hours encompassing the selected date and time.
Some objects may not be visible from a particular latitude for the specified time, in which case, the grahp title will indicate the object is not visible on that particular date.
@ -105,6 +105,8 @@ Some objects may not be visible from a particular latitude for the specified tim
The Star Tracker feature can send the overhead position of the Sun, Moon and target Star to the Map. These can be enabled individually in the settings dialog. The Moon should be displayed with an approximate phase. Stars (or galaxies) are displayed as an image of a pulsar.
![StarTracker map](../../../doc/img/StarTracker_map.png)
When using the Find feature in the Map GUI, you can search for "Sun", "Moon" or "Star".
<h2>Stellarium Interface</h2>
@ -135,8 +137,6 @@ To see the rough field of view of your antenna, open the Ocular configuration wi
Set aFOV to the half-power beam width of your antenna, focal length to 100 and field stop to 0.
Then select the SDRangel telescope reticle and press Ocular view.
![StarTracker map](../../../doc/img/StarTracker_map.png)
<h2>Attribution</h2>
Icons are by Adnen Kadri and Erik Madsen, from the Noun Project Noun Project: https://thenounproject.com/

View File

@ -24,7 +24,6 @@
#include "SWGFeatureSettings.h"
#include "SWGFeatureReport.h"
#include "SWGFeatureActions.h"
#include "SWGSimplePTTReport.h"
#include "SWGDeviceState.h"
#include "dsp/dspengine.h"
@ -39,18 +38,21 @@ const char* const StarTracker::m_featureIdURI = "sdrangel.feature.startracker";
const char* const StarTracker::m_featureId = "StarTracker";
StarTracker::StarTracker(WebAPIAdapterInterface *webAPIAdapterInterface) :
Feature(m_featureIdURI, webAPIAdapterInterface),
m_ptt(false)
Feature(m_featureIdURI, webAPIAdapterInterface)
{
qDebug("StarTracker::StarTracker: webAPIAdapterInterface: %p", webAPIAdapterInterface);
setObjectName(m_featureId);
m_worker = new StarTrackerWorker(this, webAPIAdapterInterface);
m_state = StIdle;
m_errorMessage = "StarTracker error";
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
}
StarTracker::~StarTracker()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
delete m_networkManager;
if (m_worker->isRunning()) {
stop();
}

View File

@ -122,7 +122,6 @@ private:
QThread m_thread;
StarTrackerWorker *m_worker;
StarTrackerSettings m_settings;
bool m_ptt;
QNetworkAccessManager *m_networkManager;
QNetworkRequest m_networkRequest;

View File

@ -31,8 +31,8 @@ int StarTrackerWebAPIAdapter::webapiSettingsGet(
QString& errorMessage)
{
(void) errorMessage;
response.setSimplePttSettings(new SWGSDRangel::SWGSimplePTTSettings());
response.getSimplePttSettings()->init();
response.setStarTrackerSettings(new SWGSDRangel::SWGStarTrackerSettings());
response.getStarTrackerSettings()->init();
StarTracker::webapiFormatFeatureSettings(response, m_settings);
return 200;

View File

@ -90,8 +90,6 @@ private:
void applySettings(const StarTrackerSettings& settings, bool force = false);
void restartServer(bool enabled, uint32_t port);
MessageQueue *getMessageQueueToGUI() { return m_msgQueueToGUI; }
void setAzimuth(int azimuth);
void setAzimuthElevation(int azimuth, int elevation);
void updateRaDec(RADec rd, QDateTime dt);
void writeStellariumTarget(double ra, double dec);
void removeFromMap(QString id);

View File

@ -23,7 +23,6 @@
#include "SWGFeatureSettings.h"
#include "SWGFeatureReport.h"
#include "SWGFeatureActions.h"
#include "SWGSimplePTTReport.h"
#include "SWGDeviceState.h"
#include "SWGChannelReport.h"
@ -54,10 +53,14 @@ VORLocalizer::VORLocalizer(WebAPIAdapterInterface *webAPIAdapterInterface) :
m_worker = new VorLocalizerWorker(webAPIAdapterInterface);
m_state = StIdle;
m_errorMessage = "VORLocalizer error";
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
}
VORLocalizer::~VORLocalizer()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
delete m_networkManager;
if (m_worker->isRunning()) {
stop();
}
@ -415,8 +418,8 @@ int VORLocalizer::webapiSettingsGet(
QString& errorMessage)
{
(void) errorMessage;
response.setSimplePttSettings(new SWGSDRangel::SWGSimplePTTSettings());
response.getSimplePttSettings()->init();
response.setVorLocalizerSettings(new SWGSDRangel::SWGVORLocalizerSettings());
response.getVorLocalizerSettings()->init();
webapiFormatFeatureSettings(response, m_settings);
return 200;
}

View File

@ -51,7 +51,6 @@ void VORLocalizerPlugin::initPlugin(PluginAPI* pluginAPI)
{
m_pluginAPI = pluginAPI;
// register Simple PTT feature
m_pluginAPI->registerFeature(VORLocalizer::m_featureIdURI, VORLocalizer::m_featureId, this);
}

View File

@ -15,8 +15,8 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#ifndef INCLUDE_FEATURE_SIMPLEPTTPLUGIN_H
#define INCLUDE_FEATURE_SIMPLEPTTPLUGIN_H
#ifndef INCLUDE_FEATURE_VORLOCALIZERPLUGIN_H
#define INCLUDE_FEATURE_VORLOCALIZERPLUGIN_H
#include <QObject>
#include "plugin/plugininterface.h"
@ -45,4 +45,4 @@ private:
PluginAPI* m_pluginAPI;
};
#endif // INCLUDE_FEATURE_SIMPLEPTTPLUGIN_H
#endif // INCLUDE_FEATURE_VORLOCALIZERPLUGIN_H