mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-08-13 23:14:01 -04:00
Add delta lock -- lock modem relative to center frequency
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user