Skip to content

Commit

Permalink
Fixed the crash in a clean way.
Browse files Browse the repository at this point in the history
  • Loading branch information
g4klx committed Jun 18, 2018
1 parent 282bffb commit 14bb133
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions POCSAGControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ void CPOCSAGControl::clock(unsigned int ms)
}
} else if (m_state == PS_SENDING) {
if (m_buffer.empty()) {
m_output.push_back(POCSAG_IDLE_WORD);
m_output.push_back(POCSAG_IDLE_WORD);

bool ret = processData();
if (ret) {
m_display->writePOCSAG(m_ric, m_text);
Expand All @@ -181,17 +184,6 @@ void CPOCSAGControl::clock(unsigned int ms)

m_output.push_back(w1);
m_output.push_back(w2);

if (m_buffer.empty()) {
bool ret = processData();
if (ret) {
m_display->writePOCSAG(m_ric, m_text);
m_state = PS_WAITING;
m_count++;
} else {
m_state = PS_ENDING;
}
}
}
} else { // PS_ENDING
m_output.push_back(POCSAG_IDLE_WORD);
Expand Down

0 comments on commit 14bb133

Please sign in to comment.