Updated README.md
More comments
This commit is contained in:
parent
a5a8dc662b
commit
12edb52d0c
@ -26,6 +26,11 @@ qmake RepRaptor.pro
|
||||
|
||||
make
|
||||
```
|
||||
And if you want to install system-wide
|
||||
```
|
||||
sudo make install
|
||||
```
|
||||
|
||||
## Links
|
||||
- [Binary release downloads (Windows, Linux)](https://github.com/NeoTheFox/RepRaptor/releases)
|
||||
- [RepRap wiki](http://reprap.org/wiki/RepRaptor)
|
||||
|
||||
2
main.cpp
2
main.cpp
@ -5,10 +5,12 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
|
||||
//Set some props in order to fetch and save QSettings
|
||||
QCoreApplication::setOrganizationName("NeoTheFox");
|
||||
QCoreApplication::setOrganizationDomain("https://github.com/NeoTheFox");
|
||||
QCoreApplication::setApplicationName("RepRaptor");
|
||||
|
||||
//Set the priority, so the OS would not mess up serial communication
|
||||
QThread::currentThread()->setPriority(QThread::HighestPriority);
|
||||
|
||||
MainWindow w;
|
||||
|
||||
@ -38,13 +38,24 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
ui->baudbox->addItem(QString::number(500000));
|
||||
|
||||
//Create objects
|
||||
//Timers need parent to be set up
|
||||
//in order to be tied to its thread
|
||||
//and stop right
|
||||
statusTimer = new QTimer(this);
|
||||
progressSDTimer = new QTimer(this);
|
||||
//QElapsedTimers have no parents
|
||||
sinceLastTemp = new QElapsedTimer();
|
||||
sinceLastSDStatus = new QElapsedTimer();
|
||||
//Workers would be moved to ther thread,
|
||||
//so we should not set their parents. Instead,
|
||||
//we should connect QThread's finished() to
|
||||
//worker's deleteLater()
|
||||
parserWorker = new Parser();
|
||||
parserThread = new QThread(this);
|
||||
senderWorker = new Sender();
|
||||
//Setting the parent of QThread lets
|
||||
//threads to stop right, and also makes
|
||||
//them inherit parent's priority
|
||||
parserThread = new QThread(this);
|
||||
senderThread = new QThread(this);
|
||||
|
||||
//Restore settings
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user