Add delta lock -- lock modem relative to center frequency

This commit is contained in:
Charles J. Cliffe
2016-02-15 17:43:10 -05:00
parent 7bf0ad47c5
commit 93d2c73fb9
11 changed files with 141 additions and 8 deletions
+16
View File
@@ -373,6 +373,22 @@ void DemodulatorInstance::setTracking(bool tracking) {
this->tracking = tracking;
}
bool DemodulatorInstance::isDeltaLock() {
return deltaLock.load();
}
void DemodulatorInstance::setDeltaLock(bool lock) {
deltaLock.store(lock);
}
void DemodulatorInstance::setDeltaLockOfs(int lockOfs) {
deltaLockOfs.store(lockOfs);
}
int DemodulatorInstance::getDeltaLockOfs() {
return deltaLockOfs.load();
}
bool DemodulatorInstance::isMuted() {
return demodulatorThread->isMuted();
}
+8 -1
View File
@@ -80,7 +80,12 @@ public:
bool isTracking();
void setTracking(bool tracking);
bool isDeltaLock();
void setDeltaLock(bool lock);
void setDeltaLockOfs(int lockOfs);
int getDeltaLockOfs();
bool isMuted();
void setMuted(bool muted);
@@ -122,6 +127,8 @@ private:
std::atomic_bool active;
std::atomic_bool squelch;
std::atomic_bool muted;
std::atomic_bool deltaLock;
std::atomic_int deltaLockOfs;
std::atomic_int currentOutputDevice;
std::atomic<float> currentAudioGain;
+10 -1
View File
@@ -11,7 +11,7 @@ bool inactiveCompare (DemodulatorInstance *i, DemodulatorInstance *j) { return (
DemodulatorMgr::DemodulatorMgr() :
activeDemodulator(NULL), lastActiveDemodulator(NULL), activeVisualDemodulator(NULL), lastBandwidth(DEFAULT_DEMOD_BW), lastDemodType(
DEFAULT_DEMOD_TYPE), lastSquelchEnabled(false), lastSquelch(-100), lastGain(1.0), lastMuted(false) {
DEFAULT_DEMOD_TYPE), lastSquelchEnabled(false), lastSquelch(-100), lastGain(1.0), lastMuted(false), lastDeltaLock(false) {
}
DemodulatorMgr::~DemodulatorMgr() {
@@ -284,6 +284,15 @@ void DemodulatorMgr::setLastGain(float lastGain) {
this->lastGain = lastGain;
}
bool DemodulatorMgr::getLastDeltaLock() const {
return lastDeltaLock;
}
void DemodulatorMgr::setLastDeltaLock(bool lock) {
lastDeltaLock = lock;
}
float DemodulatorMgr::getLastSquelchLevel() const {
return lastSquelch;
}
+4
View File
@@ -37,6 +37,9 @@ public:
float getLastGain() const;
void setLastGain(float lastGain);
bool getLastDeltaLock() const;
void setLastDeltaLock(bool lock);
float getLastSquelchLevel() const;
void setLastSquelchLevel(float lastSquelch);
@@ -67,6 +70,7 @@ private:
float lastSquelch;
float lastGain;
bool lastMuted;
bool lastDeltaLock;
std::map<std::string, ModemSettings> lastModemSettings;
};