diff --git a/mainwindow.cpp b/mainwindow.cpp
index e82470b..d875991 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -72,6 +72,8 @@ MainWindow::MainWindow(QWidget *parent) :
chekingSDStatus = settings.value("core/checksdstatus", 1).toBool();
firmware = settings.value("printer/firmware", OtherFirmware).toInt();
statusTimer->setInterval(settings.value("core/statusinterval", 3000).toInt());
+ feedrate = settings.value("feedrate", 1500).toInt();
+ extruderFeedrate = settings.value("extruderfeedrate", 200).toInt();
int size = settings.beginReadArray("user/recentfiles");
for(int i = 0; i < size; ++i)
{
@@ -294,13 +296,13 @@ void MainWindow::serialconnect()
/////////////////
void MainWindow::xplus()
{
- QString command = "G91\nG1 X" + ui->stepspin->text() + "\nG90";
+ QString command = "G91\nG1 X" + ui->stepspin->text() + " F" + QString::number(feedrate) + "\nG90";
emit injectCommand(command);
}
void MainWindow::xminus()
{
- QString command = "G91\nG1 X-" + ui->stepspin->text() + "\nG90";
+ QString command = "G91\nG1 X-" + ui->stepspin->text() + " F" + QString::number(feedrate) + "\nG90";
emit injectCommand(command);
}
@@ -311,13 +313,13 @@ void MainWindow::xhome()
void MainWindow::yplus()
{
- QString command = "G91\nG1 Y" + ui->stepspin->text() + "\nG90";
+ QString command = "G91\nG1 Y" + ui->stepspin->text() + " F" + QString::number(feedrate) + "\nG90";
emit injectCommand(command);
}
void MainWindow::yminus()
{
- QString command = "G91\nG1 Y-" + ui->stepspin->text() + "\nG90";
+ QString command = "G91\nG1 Y-" + ui->stepspin->text() + " F" + QString::number(feedrate) + "\nG90";
emit injectCommand(command);
}
@@ -328,13 +330,13 @@ void MainWindow::yhome()
void MainWindow::zplus()
{
- QString command = "G91\nG1 Z" + ui->stepspin->text() + "\nG90";
+ QString command = "G91\nG1 Z" + ui->stepspin->text() + " F" + QString::number(feedrate) + "\nG90";
emit injectCommand(command);
}
void MainWindow::zminus()
{
- QString command = "G91\nG1 Z-" + ui->stepspin->text() + "\nG90";
+ QString command = "G91\nG1 Z-" + ui->stepspin->text() + " F" + QString::number(feedrate) + "\nG90";
emit injectCommand(command);
}
@@ -345,13 +347,13 @@ void MainWindow::zhome()
void MainWindow::eplus()
{
- QString command = "G91\nG1 E" + ui->estepspin->text() + "\nG90";
+ QString command = "G91\nG1 E" + ui->estepspin->text() + " F" + QString::number(extruderFeedrate) + "\nG90";
emit injectCommand(command);
}
void MainWindow::eminus()
{
- QString command = "G91\nG1 E-" + ui->estepspin->text() + "\nG90";
+ QString command = "G91\nG1 E-" + ui->estepspin->text() + " F" + QString::number(extruderFeedrate) + "\nG90";
emit injectCommand(command);
}
@@ -422,7 +424,7 @@ void MainWindow::bedcenter()
x = settings.value("printer/bedx", 200).toInt();
y = settings.value("printer/bedy", 200).toInt();
- QString command = "G1 X" + QString::number(x/2) + "Y" + QString::number(y/2);
+ QString command = "G1 X" + QString::number(x/2) + "Y" + QString::number(y/2) + " F" + QString::number(feedrate);
emit injectCommand(command);
}
diff --git a/mainwindow.h b/mainwindow.h
index fd9edc3..2271519 100644
--- a/mainwindow.h
+++ b/mainwindow.h
@@ -73,6 +73,8 @@ private:
bool echo;
bool chekingSDStatus;
int firmware;
+ int feedrate;
+ int extruderFeedrate;
int userHistoryPos;
unsigned long int sdBytes;
diff --git a/settingswindow.cpp b/settingswindow.cpp
index 3fc5996..2f5dfd9 100644
--- a/settingswindow.cpp
+++ b/settingswindow.cpp
@@ -14,6 +14,8 @@ SettingsWindow::SettingsWindow(QWidget *parent) :
ui->statusbox->setValue(settings.value("core/statusinterval", 2000).toInt());
ui->bedxbox->setValue(settings.value("printer/bedx", 200).toInt());
ui->bedybox->setValue(settings.value("printer/bedy", 200).toInt());
+ ui->feedrateBox->setValue(settings.value("printer/feedrate", 1500).toInt());
+ ui->extruderFeedrateBox->setValue(settings.value("printer/extruderfeedrate", 200).toInt());
ui->lockbox->setChecked(settings.value("core/lockcontrols", 0).toBool());
ui->checksumbox->setChecked(settings.value("core/checksums", 0).toBool());
ui->sdbox->setChecked(settings.value("core/checksdstatus", 1).toBool());
@@ -43,6 +45,8 @@ void SettingsWindow::on_buttonBox_accepted()
settings.setValue("core/statusinterval", ui->statusbox->value());
settings.setValue("printer/bedy", ui->bedybox->value());
settings.setValue("printer/bedx", ui->bedxbox->value());
+ settings.setValue("printer/feedrate", ui->feedrateBox->value());
+ settings.setValue("printer/extruderfeedrate", ui->extruderFeedrateBox->value());
settings.setValue("core/echo", ui->echobox->isChecked());
settings.setValue("core/lockcontrols", ui->lockbox->isChecked());
settings.setValue("core/checksums", ui->checksumbox->isChecked());
diff --git a/settingswindow.ui b/settingswindow.ui
index d98d0dd..d7ba232 100644
--- a/settingswindow.ui
+++ b/settingswindow.ui
@@ -6,8 +6,8 @@
0
0
- 253
- 386
+ 478
+ 285
@@ -18,78 +18,6 @@
:/icons/settings.png:/icons/settings.png
- -
-
-
-
- 0
- 0
-
-
-
- Printer
-
-
-
-
-
-
- 1
-
-
- 9999
-
-
-
- -
-
-
- X
-
-
-
- -
-
-
- 1
-
-
- 9999
-
-
-
- -
-
-
- Bed size
-
-
-
- -
-
-
- Firmware
-
-
-
- -
-
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
- QDialogButtonBox::Cancel|QDialogButtonBox::Ok
-
-
- true
-
-
-
-
@@ -164,10 +92,10 @@
- -
-
+
-
+
- Sender
+ ms
@@ -178,10 +106,17 @@
- -
-
+
-
+
- ms
+ Sender
+
+
+
+ -
+
+
+ Check SD printing status
@@ -217,16 +152,105 @@
- -
-
-
- Check SD printing status
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Printer
+
+
+
-
+
+
+ 1
+
+
+ 9999
+ -
+
+
+ X
+
+
+
+ -
+
+
+ 1
+
+
+ 9999
+
+
+
+ -
+
+
+ Bed size
+
+
+
+ -
+
+
+ Firmware
+
+
+
+ -
+
+
+ -
+
+
+ Feedrate
+
+
+
+ -
+
+
+ -
+
+
+ Extruder
+feedrate
+
+
+ 1
+
+
+
+ -
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QDialogButtonBox::Cancel|QDialogButtonBox::Ok
+
+
+ true
+
+
+