Cleaned up old sender
This commit is contained in:
parent
8803269616
commit
5db118ebf6
@ -65,12 +65,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
sdprinting = false;
|
sdprinting = false;
|
||||||
opened = false;
|
opened = false;
|
||||||
sdBytes = 0;
|
sdBytes = 0;
|
||||||
currentLine = 0;
|
|
||||||
readyRecieve = false;
|
|
||||||
lastRecieved = 0;
|
|
||||||
userHistoryPos = 0;
|
userHistoryPos = 0;
|
||||||
totalLineNum = 0;
|
|
||||||
resendLineNum = -1;
|
|
||||||
userHistory.append("");
|
userHistory.append("");
|
||||||
|
|
||||||
//Update serial ports
|
//Update serial ports
|
||||||
@ -484,7 +479,6 @@ void MainWindow::on_sendBtn_clicked()
|
|||||||
}
|
}
|
||||||
|
|
||||||
ui->progressBar->setValue(0);
|
ui->progressBar->setValue(0);
|
||||||
currentLine = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_pauseBtn_clicked()
|
void MainWindow::on_pauseBtn_clicked()
|
||||||
@ -777,17 +771,6 @@ void MainWindow::sendEEPROMsettings(QStringList changes)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::recievedOkNum(int num)
|
|
||||||
{
|
|
||||||
readyRecieve=true;
|
|
||||||
lastRecieved = num;
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::recievedWait()
|
|
||||||
{
|
|
||||||
readyRecieve = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::EEPROMSettingRecieved(QString esetting)
|
void MainWindow::EEPROMSettingRecieved(QString esetting)
|
||||||
{
|
{
|
||||||
EEPROMSettings.append(esetting);
|
EEPROMSettings.append(esetting);
|
||||||
@ -807,17 +790,6 @@ void MainWindow::recievedSDDone()
|
|||||||
ui->fileBox->setDisabled(true);
|
ui->fileBox->setDisabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::recievedResend(int num)
|
|
||||||
{
|
|
||||||
if(!sendingChecksum) emit injectCommand("M110 N0");
|
|
||||||
else resendLineNum = num;
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::recievedStart()
|
|
||||||
{
|
|
||||||
readyRecieve = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::updateFileProgress(FileProgress p)
|
void MainWindow::updateFileProgress(FileProgress p)
|
||||||
{
|
{
|
||||||
if(p.P >= p.T)
|
if(p.P >= p.T)
|
||||||
|
|||||||
10
mainwindow.h
10
mainwindow.h
@ -75,11 +75,7 @@ private:
|
|||||||
bool sendingChecksum;
|
bool sendingChecksum;
|
||||||
bool chekingSDStatus;
|
bool chekingSDStatus;
|
||||||
int firmware;
|
int firmware;
|
||||||
long int currentLine;
|
//unsigned long int lastRecieved;
|
||||||
unsigned long int lastRecieved;
|
|
||||||
bool readyRecieve;
|
|
||||||
unsigned long int totalLineNum;
|
|
||||||
long int resendLineNum;
|
|
||||||
int userHistoryPos;
|
int userHistoryPos;
|
||||||
unsigned long int sdBytes;
|
unsigned long int sdBytes;
|
||||||
|
|
||||||
@ -101,12 +97,8 @@ private slots:
|
|||||||
void sendEEPROMsettings(QStringList changes);
|
void sendEEPROMsettings(QStringList changes);
|
||||||
void updateTemperature(TemperatureReadings r);
|
void updateTemperature(TemperatureReadings r);
|
||||||
void EEPROMSettingRecieved(QString esetting);
|
void EEPROMSettingRecieved(QString esetting);
|
||||||
void recievedOkNum(int num);
|
|
||||||
void recievedWait();
|
|
||||||
void recievedError();
|
void recievedError();
|
||||||
void recievedSDDone();
|
void recievedSDDone();
|
||||||
void recievedResend(int num);
|
|
||||||
void recievedStart();
|
|
||||||
void parseFile(QString filename);
|
void parseFile(QString filename);
|
||||||
void recentClicked();
|
void recentClicked();
|
||||||
void updateFileProgress(FileProgress);
|
void updateFileProgress(FileProgress);
|
||||||
|
|||||||
@ -88,15 +88,6 @@ void Parser::parse(QByteArray data)
|
|||||||
else if(data.startsWith("start")) emit recievedStart();
|
else if(data.startsWith("start")) emit recievedStart();
|
||||||
else if(data.startsWith("SD pr"))
|
else if(data.startsWith("SD pr"))
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
QString tmp;
|
|
||||||
QString fragment = data.split(' ').at(3);
|
|
||||||
for(int i = 0; fragment.at(i) != '/'; ++i)
|
|
||||||
{
|
|
||||||
tmp += fragment.at(i);
|
|
||||||
}
|
|
||||||
emit recievedSDUpdate(tmp.toDouble());
|
|
||||||
*/
|
|
||||||
SDProgress p;
|
SDProgress p;
|
||||||
QRegExp rxp("\\d+/\\d+");
|
QRegExp rxp("\\d+/\\d+");
|
||||||
QStringList tmp;
|
QStringList tmp;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user