Skip to content

Commit

Permalink
Merge pull request #440 from drowe67/ms-voicekeyer-ptt-color
Browse files Browse the repository at this point in the history
Fix bug causing the PTT button to stay red after the voice keyer finishes TX.
  • Loading branch information
tmiw authored Jun 16, 2023
2 parents fd53c75 + a0624f0 commit 195c047
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions USER_MANUAL.html
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,7 @@ <h2 data-number="17.1" id="v1.8.12-tbd-2023"><span class="header-section-number"
<ul>
<li>Clear audio plots when recording or playback starts. (PR #439)</li>
<li>Clear button now clears the callsign list. (PR #436)</li>
<li>Fix bug causing the PTT button to stay red after the voice keyer finishes TX. (PR #440)</li>
</ul></li>
<li>Build system:
<ul>
Expand Down
1 change: 1 addition & 0 deletions USER_MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,7 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes
1. Bugfixes:
* Clear audio plots when recording or playback starts. (PR #439)
* Clear button now clears the callsign list. (PR #436)
* Fix bug causing the PTT button to stay red after the voice keyer finishes TX. (PR #440)
2. Build system:
* Bump Codec2 version to v1.1.1. (PR #437)

Expand Down
Binary file modified USER_MANUAL.pdf
Binary file not shown.
12 changes: 9 additions & 3 deletions src/voicekeyer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,18 @@ void MainFrame::VoiceKeyerProcessEvent(int vk_event) {
// to Mic In

if (vk_event == VK_SPACE_BAR) {
m_btnTogPTT->SetValue(false); togglePTT();
m_btnTogPTT->SetValue(false);
m_btnTogPTT->SetBackgroundColour(wxNullColour);
togglePTT();
m_togBtnVoiceKeyer->SetValue(false);
next_state = VK_IDLE;
CallAfter([&]() { StopPlayFileToMicIn(); });
}

if (vk_event == VK_PLAY_FINISHED) {
m_btnTogPTT->SetValue(false); togglePTT();
m_btnTogPTT->SetValue(false);
m_btnTogPTT->SetBackgroundColour(wxNullColour);
togglePTT();
vk_repeat_counter++;
if (vk_repeat_counter > vk_repeats) {
m_togBtnVoiceKeyer->SetValue(false);
Expand Down Expand Up @@ -154,7 +158,9 @@ void MainFrame::VoiceKeyerProcessEvent(int vk_event) {
default:
// catch anything we missed

m_btnTogPTT->SetValue(false); togglePTT();
m_btnTogPTT->SetValue(false);
m_btnTogPTT->SetBackgroundColour(wxNullColour);
togglePTT();
m_togBtnVoiceKeyer->SetValue(false);
next_state = VK_IDLE;
}
Expand Down

0 comments on commit 195c047

Please sign in to comment.