mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-08-07 00:02:31 -04:00
M17 mod: APRS: alternate status and position messages when insert location button is engaged
This commit is contained in:
parent
3cf3938757
commit
71c486310a
@ -732,7 +732,7 @@
|
|||||||
<enum>QTabWidget::East</enum>
|
<enum>QTabWidget::East</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>2</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="settingsTab">
|
<widget class="QWidget" name="settingsTab">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
|
@ -1112,7 +1112,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="ButtonSwitch" name="aprsInsertPosition">
|
<widget class="ButtonSwitch" name="aprsInsertPosition">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Insert position (latitude and longitude)</string>
|
<string>Alternate status and position (latitude and longitude) packets</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>...</string>
|
<string>...</string>
|
||||||
|
@ -66,9 +66,18 @@ bool M17ModProcessor::handleMessage(const Message& cmd)
|
|||||||
M17ModAX25 modAX25;
|
M17ModAX25 modAX25;
|
||||||
QString strData;
|
QString strData;
|
||||||
|
|
||||||
if (notif.getInsertPosition()) {
|
if (notif.getInsertPosition())
|
||||||
strData += "!" + formatAPRSPosition();
|
{
|
||||||
} else {
|
if (m_insertPositionToggle) {
|
||||||
|
strData += "!" + formatAPRSPosition();
|
||||||
|
} else {
|
||||||
|
strData = notif.getData();
|
||||||
|
}
|
||||||
|
|
||||||
|
m_insertPositionToggle = !m_insertPositionToggle;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
strData = notif.getData();
|
strData = notif.getData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,6 +188,7 @@ public:
|
|||||||
|
|
||||||
MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||||
M17ModFIFO *getBasebandFifo() { return &m_basebandFifo; }
|
M17ModFIFO *getBasebandFifo() { return &m_basebandFifo; }
|
||||||
|
void resetInsertPositionToggle() { m_insertPositionToggle = true; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MessageQueue m_inputMessageQueue;
|
MessageQueue m_inputMessageQueue;
|
||||||
@ -202,6 +203,7 @@ private:
|
|||||||
int m_audioFrameIndex;
|
int m_audioFrameIndex;
|
||||||
uint16_t m_audioFrameNumber;
|
uint16_t m_audioFrameNumber;
|
||||||
struct CODEC2 *m_codec2;
|
struct CODEC2 *m_codec2;
|
||||||
|
bool m_insertPositionToggle;
|
||||||
|
|
||||||
bool handleMessage(const Message& cmd);
|
bool handleMessage(const Message& cmd);
|
||||||
void processPacket(const QString& sourceCall, const QString& destCall, uint8_t can, const QByteArray& packetBytes);
|
void processPacket(const QString& sourceCall, const QString& destCall, uint8_t can, const QByteArray& packetBytes);
|
||||||
|
@ -523,6 +523,13 @@ void M17ModSource::applySettings(const M17ModSettings& settings, bool force)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((settings.m_insertPosition != m_settings.m_insertPosition) || force)
|
||||||
|
{
|
||||||
|
if (settings.m_insertPosition) {
|
||||||
|
m_processor->resetInsertPositionToggle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
m_settings = settings;
|
m_settings = settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user