Buffer all directed free text

This commit is contained in:
Jordan Sherer 2018-10-03 14:37:34 -04:00
parent 6bb3c22bec
commit b5d7aa8fa8
2 changed files with 3 additions and 1 deletions

View File

@ -3748,6 +3748,7 @@ void MainWindow::readFromStdout() //readFromStdout
d.extra = parts.length() > 2 ? parts.mid(3).join(" ") : "";
// if the command is a buffered command OR we have from or to in a separate message (compound)
if(Varicode::isCommandBuffered(d.cmd) || d.from == "<....>" || d.to == "<....>"){
qDebug() << "buffering cmd" << d.cmd << d.from << d.to;
m_messageBuffer[d.freq/10*10].cmd = d;

View File

@ -918,7 +918,7 @@ bool Varicode::isCommandAllowed(const QString &cmd){
}
bool Varicode::isCommandBuffered(const QString &cmd){
return directed_cmds.contains(cmd) && buffered_cmds.contains(directed_cmds[cmd]);
return directed_cmds.contains(cmd) && (cmd.contains(" ") || buffered_cmds.contains(directed_cmds[cmd]));
}
int Varicode::isCommandChecksumed(const QString &cmd){
@ -1655,6 +1655,7 @@ QStringList Varicode::buildMessageFrames(
line = line + " " + Varicode::checksum16(line);
} else if (checksumSize == 0) {
// pass
qDebug() << "no checksum required for cmd" << dirCmd;
}
qDebug() << "after:" << line;
}