From 3227e9ce23545a0cd2b4529a88019337d7f1090a Mon Sep 17 00:00:00 2001 From: heyuanjie87 <943313837@qq.com> Date: Fri, 7 May 2021 17:35:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96modem?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Modem/Modem.cpp | 2 +- Modem/Modem.h | 2 +- Modem/Ymodem.cpp | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Modem/Modem.cpp b/Modem/Modem.cpp index 5ee02be..4980ba8 100644 --- a/Modem/Modem.cpp +++ b/Modem/Modem.cpp @@ -12,7 +12,7 @@ Modem::Modem(QWidget *parent) : ui->setupUi(this); ym = new Ymodem(this); - connect(ym, SIGNAL(showTransfer()), this, SLOT(showTransfer())); + connect(ym, SIGNAL(showTransfer(int, int, float)), this, SLOT(showTransfer(int, int, float))); connect(ym, SIGNAL(finished()), this, SLOT(closed())); } diff --git a/Modem/Modem.h b/Modem/Modem.h index 8a5705a..c0c2091 100644 --- a/Modem/Modem.h +++ b/Modem/Modem.h @@ -20,7 +20,7 @@ class Modem : public QDialog void setFile(QString &name); void getFile(QString &name); - void startTransfer(char type = 'x'); + void startTransfer(char type = 'y'); void showStatus(const char *s); void showStatus(QString &s); diff --git a/Modem/Ymodem.cpp b/Modem/Ymodem.cpp index a2e0519..9219bfc 100644 --- a/Modem/Ymodem.cpp +++ b/Modem/Ymodem.cpp @@ -282,6 +282,9 @@ void Ymodem::run() msgq_push(mcACK); } break; + case mcREQ: + Stage = msFirst; + break; } } break;