mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-23 04:08:36 -05:00
Record muted, toggle-all recording /w shift-R, status texts
This commit is contained in:
parent
b9e4f6aeba
commit
5c45c1cf6b
@ -2643,7 +2643,11 @@ int AppFrame::OnGlobalKeyUp(wxKeyEvent &event) {
|
|||||||
return 1;
|
return 1;
|
||||||
break;
|
break;
|
||||||
case 'R':
|
case 'R':
|
||||||
toggleActiveDemodRecording();
|
if (event.ShiftDown()) {
|
||||||
|
toggleAllActiveDemodRecording();
|
||||||
|
} else {
|
||||||
|
toggleActiveDemodRecording();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'P':
|
case 'P':
|
||||||
wxGetApp().getSpectrumProcessor()->setPeakHold(!wxGetApp().getSpectrumProcessor()->getPeakHold());
|
wxGetApp().getSpectrumProcessor()->setPeakHold(!wxGetApp().getSpectrumProcessor()->getPeakHold());
|
||||||
@ -2701,7 +2705,31 @@ void AppFrame::toggleActiveDemodRecording() {
|
|||||||
wxGetApp().getBookmarkMgr().updateActiveList();
|
wxGetApp().getBookmarkMgr().updateActiveList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AppFrame::toggleAllActiveDemodRecording() {
|
||||||
|
if (!wxGetApp().getConfig()->verifyRecordingPath()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto activeDemods = wxGetApp().getDemodMgr().getDemodulators();
|
||||||
|
|
||||||
|
bool stateToSet = true;
|
||||||
|
|
||||||
|
for (auto i : activeDemods) {
|
||||||
|
if (i->isActive() && i->isRecording()) {
|
||||||
|
stateToSet = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (auto i : activeDemods) {
|
||||||
|
if (i->isActive() && i->isRecording() != stateToSet) {
|
||||||
|
i->setRecording(stateToSet);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void AppFrame::setWaterfallLinesPerSecond(int lps) {
|
void AppFrame::setWaterfallLinesPerSecond(int lps) {
|
||||||
waterfallSpeedMeter->setUserInputValue(sqrt(lps));
|
waterfallSpeedMeter->setUserInputValue(sqrt(lps));
|
||||||
|
@ -116,6 +116,7 @@ public:
|
|||||||
int OnGlobalKeyUp(wxKeyEvent &event);
|
int OnGlobalKeyUp(wxKeyEvent &event);
|
||||||
|
|
||||||
void toggleActiveDemodRecording();
|
void toggleActiveDemodRecording();
|
||||||
|
void toggleAllActiveDemodRecording();
|
||||||
|
|
||||||
void setWaterfallLinesPerSecond(int lps);
|
void setWaterfallLinesPerSecond(int lps);
|
||||||
void setSpectrumAvgSpeed(double avg);
|
void setSpectrumAvgSpeed(double avg);
|
||||||
|
@ -201,7 +201,7 @@ void DemodulatorThread::run() {
|
|||||||
signalLevel = signalLevel + (currentSignalLevel - signalLevel) * 0.05 * sampleTime * 30.0;
|
signalLevel = signalLevel + (currentSignalLevel - signalLevel) * 0.05 * sampleTime * 30.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool squelched = (muted.load() || (squelchEnabled && (signalLevel < squelchLevel)));
|
bool squelched = squelchEnabled && (signalLevel < squelchLevel);
|
||||||
|
|
||||||
if (squelchEnabled) {
|
if (squelchEnabled) {
|
||||||
if (!squelched && !squelchBreak) {
|
if (!squelched && !squelchBreak) {
|
||||||
|
@ -119,7 +119,8 @@ void PrimaryGLContext::DrawDemodInfo(DemodulatorInstancePtr demod, RGBA4f color,
|
|||||||
|
|
||||||
// TODO: Better recording indicator... pulsating red circle?
|
// TODO: Better recording indicator... pulsating red circle?
|
||||||
if (isRecording) {
|
if (isRecording) {
|
||||||
labelBg.g = 1.0f;
|
auto t = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now().time_since_epoch()).count();
|
||||||
|
labelBg.g = sinf(2.0f * M_PI * (float(t) / 1000.0f)) * 0.25f + 0.75f;
|
||||||
}
|
}
|
||||||
|
|
||||||
glColor4f(labelBg.r, labelBg.g, labelBg.b, labelBg.a);
|
glColor4f(labelBg.r, labelBg.g, labelBg.b, labelBg.a);
|
||||||
|
@ -565,25 +565,25 @@ void WaterfallCanvas::updateHoverState() {
|
|||||||
|
|
||||||
mouseTracker.setVertDragLock(true);
|
mouseTracker.setVertDragLock(true);
|
||||||
mouseTracker.setHorizDragLock(false);
|
mouseTracker.setHorizDragLock(false);
|
||||||
setStatusText("Click and drag to change demodulator bandwidth. SPACE or numeric key for direct frequency input. [, ] to nudge, M for mute, D to delete, C to center, E to edit label, R to record.");
|
setStatusText("Drag to change bandwidth. SPACE or 0-9 for direct frequency input. [, ] to nudge, M for mute, D to delete, C to center, E to edit label, R to record.");
|
||||||
} else {
|
} else {
|
||||||
SetCursor(wxCURSOR_SIZING);
|
SetCursor(wxCURSOR_SIZING);
|
||||||
nextDragState = WF_DRAG_FREQUENCY;
|
nextDragState = WF_DRAG_FREQUENCY;
|
||||||
|
|
||||||
mouseTracker.setVertDragLock(true);
|
mouseTracker.setVertDragLock(true);
|
||||||
mouseTracker.setHorizDragLock(false);
|
mouseTracker.setHorizDragLock(false);
|
||||||
setStatusText("Click and drag to change demodulator frequency; SPACE or numeric key for direct input. [, ] to nudge, M for mute, D to delete, C to center, E to edit label, R to record.");
|
setStatusText("Drag to change frequency; SPACE or 0-9 for direct input. [, ] to nudge, M for mute, D to delete, C to center, E to edit label, R to record.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SetCursor(wxCURSOR_CROSS);
|
SetCursor(wxCURSOR_CROSS);
|
||||||
nextDragState = WF_DRAG_NONE;
|
nextDragState = WF_DRAG_NONE;
|
||||||
if (shiftDown) {
|
if (shiftDown) {
|
||||||
setStatusText("Click to create a new demodulator or hold ALT to drag range, SPACE or numeric key for direct center frequency input.");
|
setStatusText("Click to create a new demodulator or hold ALT to drag new range.");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
setStatusText(
|
setStatusText(
|
||||||
"Click to set active demodulator frequency or hold ALT to drag range; hold SHIFT to create new. Right drag or wheel to Zoom. Arrow keys to navigate/zoom, C to center.");
|
"Click to set demodulator frequency or hold ALT to drag range; hold SHIFT to create new. Right drag or wheel to Zoom. Arrow keys to navigate/zoom, C to center. Shift-R record/stop all.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user