1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-02 14:04:46 -04:00

Use common code for creating and processing device and channel Ids.

This commit is contained in:
srcejon
2023-12-05 12:32:53 +00:00
parent 070f8077b2
commit d989561df5
10 changed files with 173 additions and 73 deletions
@@ -501,13 +501,10 @@ void StarTrackerWorker::update()
{
// Get Az/El from Satellite Tracker
double azimuth, elevation;
unsigned int satelliteTrackerFeatureSetIndex,satelliteTrackerFeatureIndex;
const QRegExp re("F([0-9]+):([0-9]+)");
if (re.indexIn(m_settings.m_target) >= 0)
if (MainCore::getFeatureIndexFromId(m_settings.m_target, satelliteTrackerFeatureSetIndex, satelliteTrackerFeatureIndex))
{
int satelliteTrackerFeatureSetIndex = re.capturedTexts()[1].toInt();
int satelliteTrackerFeatureIndex = re.capturedTexts()[2].toInt();
if (ChannelWebAPIUtils::getFeatureReportValue(satelliteTrackerFeatureSetIndex, satelliteTrackerFeatureIndex, "targetAzimuth", azimuth)
&& ChannelWebAPIUtils::getFeatureReportValue(satelliteTrackerFeatureSetIndex, satelliteTrackerFeatureIndex, "targetElevation", elevation))
{