Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress use of space bar when in RX Only mode. #623

Merged
merged 2 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions USER_MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,7 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes
* Check for RIGCAPS_NOT_CONST in Hamlib 4.6. (PR #615)
* Make main screen gauges horizontal to work around sizing/layout issues. (PR #613)
* Fix compiler issue with certain versions of MinGW. (PR #622)
* Suppress use of space bar when in RX Only mode. (PR #623)
2. Enhancements:
* Allow serial PTT to be enabled along with OmniRig. (PR #619)
* Add 800XA to multi-RX list. (PR #617)
Expand Down
7 changes: 1 addition & 6 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3036,12 +3036,7 @@ bool MainFrame::validateSoundCardSetup()

void MainFrame::initializeFreeDVReporter_()
{
bool hamlibDisabledForRigControl =
(wxGetApp().appConfiguration.rigControlConfiguration.hamlibUseForPTT &&
(HamlibRigController::PttType)wxGetApp().appConfiguration.rigControlConfiguration.hamlibPTTType.get() == HamlibRigController::PTT_VIA_NONE);
bool receiveOnly =
wxGetApp().appConfiguration.reportingConfiguration.freedvReporterForceReceiveOnly ||
g_nSoundCards <= 1 || hamlibDisabledForRigControl;
bool receiveOnly = isReceiveOnly();

auto oldReporterObject = wxGetApp().m_sharedReporterObject;
wxGetApp().m_sharedReporterObject =
Expand Down
2 changes: 2 additions & 0 deletions src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ class MainFrame : public TopFrame
void StopPlaybackFileFromRadio();
void StopRecFileFromRadio();

bool isReceiveOnly();

protected:

void setsnrBeta(bool snrSlow);
Expand Down
2 changes: 1 addition & 1 deletion src/ongui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ int MainApp::FilterEvent(wxEvent& event)
(((wxKeyEvent&)event).GetKeyCode() == WXK_SPACE))
{
// only use space to toggle PTT if we are running and no modal dialogs (like options) up
if (frame->m_RxRunning && frame->IsActive() && wxGetApp().appConfiguration.enableSpaceBarForPTT) {
if (frame->m_RxRunning && frame->IsActive() && wxGetApp().appConfiguration.enableSpaceBarForPTT && !frame->isReceiveOnly()) {

// space bar controls rx/rx if keyer not running
if (frame->vk_state == VK_IDLE) {
Expand Down
14 changes: 14 additions & 0 deletions src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,20 @@ bool MainApp::CanAccessSerialPort(std::string portName)
return couldOpen;
}

//----------------------------------------------------------------
// isReceiveOnly()
//----------------------------------------------------------------

bool MainFrame::isReceiveOnly()
{
bool hamlibDisabledForRigControl =
(wxGetApp().appConfiguration.rigControlConfiguration.hamlibUseForPTT &&
(HamlibRigController::PttType)wxGetApp().appConfiguration.rigControlConfiguration.hamlibPTTType.get() == HamlibRigController::PTT_VIA_NONE);
return
wxGetApp().appConfiguration.reportingConfiguration.freedvReporterForceReceiveOnly ||
g_nSoundCards <= 1 || hamlibDisabledForRigControl;
}

//----------------------------------------------------------------
// OpenSerialPort()
//----------------------------------------------------------------
Expand Down
Loading