Added feedrate settings
This commit is contained in:
parent
16b3adf8dc
commit
7831246599
@ -72,6 +72,8 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
chekingSDStatus = settings.value("core/checksdstatus", 1).toBool();
|
chekingSDStatus = settings.value("core/checksdstatus", 1).toBool();
|
||||||
firmware = settings.value("printer/firmware", OtherFirmware).toInt();
|
firmware = settings.value("printer/firmware", OtherFirmware).toInt();
|
||||||
statusTimer->setInterval(settings.value("core/statusinterval", 3000).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");
|
int size = settings.beginReadArray("user/recentfiles");
|
||||||
for(int i = 0; i < size; ++i)
|
for(int i = 0; i < size; ++i)
|
||||||
{
|
{
|
||||||
@ -294,13 +296,13 @@ void MainWindow::serialconnect()
|
|||||||
/////////////////
|
/////////////////
|
||||||
void MainWindow::xplus()
|
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);
|
emit injectCommand(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::xminus()
|
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);
|
emit injectCommand(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -311,13 +313,13 @@ void MainWindow::xhome()
|
|||||||
|
|
||||||
void MainWindow::yplus()
|
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);
|
emit injectCommand(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::yminus()
|
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);
|
emit injectCommand(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -328,13 +330,13 @@ void MainWindow::yhome()
|
|||||||
|
|
||||||
void MainWindow::zplus()
|
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);
|
emit injectCommand(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::zminus()
|
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);
|
emit injectCommand(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -345,13 +347,13 @@ void MainWindow::zhome()
|
|||||||
|
|
||||||
void MainWindow::eplus()
|
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);
|
emit injectCommand(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::eminus()
|
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);
|
emit injectCommand(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -422,7 +424,7 @@ void MainWindow::bedcenter()
|
|||||||
x = settings.value("printer/bedx", 200).toInt();
|
x = settings.value("printer/bedx", 200).toInt();
|
||||||
y = settings.value("printer/bedy", 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);
|
emit injectCommand(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -73,6 +73,8 @@ private:
|
|||||||
bool echo;
|
bool echo;
|
||||||
bool chekingSDStatus;
|
bool chekingSDStatus;
|
||||||
int firmware;
|
int firmware;
|
||||||
|
int feedrate;
|
||||||
|
int extruderFeedrate;
|
||||||
int userHistoryPos;
|
int userHistoryPos;
|
||||||
unsigned long int sdBytes;
|
unsigned long int sdBytes;
|
||||||
|
|
||||||
|
|||||||
@ -14,6 +14,8 @@ SettingsWindow::SettingsWindow(QWidget *parent) :
|
|||||||
ui->statusbox->setValue(settings.value("core/statusinterval", 2000).toInt());
|
ui->statusbox->setValue(settings.value("core/statusinterval", 2000).toInt());
|
||||||
ui->bedxbox->setValue(settings.value("printer/bedx", 200).toInt());
|
ui->bedxbox->setValue(settings.value("printer/bedx", 200).toInt());
|
||||||
ui->bedybox->setValue(settings.value("printer/bedy", 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->lockbox->setChecked(settings.value("core/lockcontrols", 0).toBool());
|
||||||
ui->checksumbox->setChecked(settings.value("core/checksums", 0).toBool());
|
ui->checksumbox->setChecked(settings.value("core/checksums", 0).toBool());
|
||||||
ui->sdbox->setChecked(settings.value("core/checksdstatus", 1).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("core/statusinterval", ui->statusbox->value());
|
||||||
settings.setValue("printer/bedy", ui->bedybox->value());
|
settings.setValue("printer/bedy", ui->bedybox->value());
|
||||||
settings.setValue("printer/bedx", ui->bedxbox->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/echo", ui->echobox->isChecked());
|
||||||
settings.setValue("core/lockcontrols", ui->lockbox->isChecked());
|
settings.setValue("core/lockcontrols", ui->lockbox->isChecked());
|
||||||
settings.setValue("core/checksums", ui->checksumbox->isChecked());
|
settings.setValue("core/checksums", ui->checksumbox->isChecked());
|
||||||
|
|||||||
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>253</width>
|
<width>478</width>
|
||||||
<height>386</height>
|
<height>285</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -18,78 +18,6 @@
|
|||||||
<normaloff>:/icons/settings.png</normaloff>:/icons/settings.png</iconset>
|
<normaloff>:/icons/settings.png</normaloff>:/icons/settings.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QGroupBox" name="groupBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Printer</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QSpinBox" name="bedxbox">
|
|
||||||
<property name="minimum">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>9999</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<widget class="QLabel" name="label_6">
|
|
||||||
<property name="text">
|
|
||||||
<string>X</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="3">
|
|
||||||
<widget class="QSpinBox" name="bedybox">
|
|
||||||
<property name="minimum">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>9999</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_5">
|
|
||||||
<property name="text">
|
|
||||||
<string>Bed size</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_8">
|
|
||||||
<property name="text">
|
|
||||||
<string>Firmware</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1" colspan="3">
|
|
||||||
<widget class="QComboBox" name="firmwarecombo"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="standardButtons">
|
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
|
||||||
</property>
|
|
||||||
<property name="centerButtons">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QGroupBox" name="internalGroup">
|
<widget class="QGroupBox" name="internalGroup">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@ -164,10 +92,10 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="2">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label_3">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Sender</string>
|
<string>ms</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -178,10 +106,17 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="2">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>ms</string>
|
<string>Sender</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0" colspan="3">
|
||||||
|
<widget class="QCheckBox" name="sdbox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Check SD printing status</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -217,16 +152,105 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0" colspan="3">
|
</layout>
|
||||||
<widget class="QCheckBox" name="sdbox">
|
</widget>
|
||||||
<property name="text">
|
</item>
|
||||||
<string>Check SD printing status</string>
|
<item row="0" column="1">
|
||||||
|
<widget class="QGroupBox" name="groupBox">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Printer</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QSpinBox" name="bedxbox">
|
||||||
|
<property name="minimum">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>9999</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="text">
|
||||||
|
<string>X</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="3">
|
||||||
|
<widget class="QSpinBox" name="bedybox">
|
||||||
|
<property name="minimum">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>9999</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_5">
|
||||||
|
<property name="text">
|
||||||
|
<string>Bed size</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_8">
|
||||||
|
<property name="text">
|
||||||
|
<string>Firmware</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1" colspan="3">
|
||||||
|
<widget class="QComboBox" name="firmwarecombo"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_9">
|
||||||
|
<property name="text">
|
||||||
|
<string>Feedrate</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1" colspan="2">
|
||||||
|
<widget class="QSpinBox" name="feedrateBox"/>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label_10">
|
||||||
|
<property name="text">
|
||||||
|
<string>Extruder
|
||||||
|
feedrate</string>
|
||||||
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1" colspan="2">
|
||||||
|
<widget class="QSpinBox" name="extruderFeedrateBox"/>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
|
</property>
|
||||||
|
<property name="centerButtons">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user