mirror of
https://github.com/wh201906/Proxmark3GUI.git
synced 2026-07-14 22:55:32 +08:00
Fix a bug
Trying to fix #22 Open client with QProcess::Text for proper newline character(s) On Raspbian, the isBusy() function will always return false, even the serial port is actually connected.
This commit is contained in:
+2
-2
@@ -70,10 +70,10 @@ void LF::getConfig()
|
||||
result = util->execCMDWithOutput("hw status", 400); // not all output from "hw status will be processed".
|
||||
result = result.right(result.length() - result.indexOf("LF Sampling config"));
|
||||
offset = result.indexOf("samples to skip");
|
||||
offset = result.indexOf("\r\n", offset);
|
||||
offset = result.indexOf("\n", offset);
|
||||
result = result.mid(0, offset + 2);
|
||||
qDebug() << "LF CONFIG GET\n" << result;
|
||||
resultList = result.split("\r\n");
|
||||
resultList = result.split("\n");
|
||||
for(int i = 0; i < resultList.length(); i++)
|
||||
{
|
||||
for(int j = 0; j < symbolList.length(); j++)
|
||||
|
||||
+3
-3
@@ -794,7 +794,7 @@ void Mifare::setParameterC()
|
||||
QMessageBox::information(parent, tr("Info"), tr("Failed to read card."));
|
||||
else
|
||||
{
|
||||
result.replace("\r\n", "");
|
||||
result.replace("\n", "");
|
||||
result.replace(QRegularExpression("\\[.\\]"), "");
|
||||
result.replace("UID", "");
|
||||
result.replace("ATQA", "");
|
||||
@@ -1071,7 +1071,7 @@ bool Mifare::data_loadDataFile(const QString& filename)
|
||||
else
|
||||
{
|
||||
QString tmp = buff.left(cardType.block_size * 34);
|
||||
QStringList tmpList = tmp.split("\r\n");
|
||||
QStringList tmpList = tmp.split("\n");
|
||||
for(int i = 0; i < cardType.block_size; i++)
|
||||
{
|
||||
dataList->replace(i, tmpList[i].toUpper());
|
||||
@@ -1174,7 +1174,7 @@ bool Mifare::data_saveDataFile(const QString& filename, bool isBin)
|
||||
for(int i = 0; i < cardType.block_size; i++)
|
||||
{
|
||||
buff += dataList->at(i);
|
||||
buff += "\r\n";
|
||||
buff += "\n";
|
||||
}
|
||||
}
|
||||
bool ret = file.write(buff) != -1;
|
||||
|
||||
Reference in New Issue
Block a user