DEFINES += LIVINGDESKTOPLIBRARY_LIBRARY
-SOURCES += livingdesktoplibrary.cpp\
- ErrorMessage.cpp \
- XYPlotter.cpp
+SOURCES +=\
+ ErrorMessage.cpp \
+ XYPlotter.cpp
-HEADERS += livingdesktoplibrary.h\
+HEADERS +=\
livingdesktoplibrary_global.h\
- ErrorMessage.h \
- XYPlotter.h
+ ErrorMessage.h \
+ XYPlotter.h
unix {
target.path = /usr/lib
#include <QString>
+const int XYPlotter::toolDistance = 70;
+
XYPlotter::XYPlotter(QString port)
: serialPort(new QSerialPort(port)), connected(false), posX(0), posY(0), toolUp(false)
{
{
QString buffer = "G01X" + QString::number(x) +
"Y" + QString::number(y) +
- "Z" + QString::number(toolup) +
+ "Z" + QString::number(toolup * toolDistance) +
"F50000\n";
serialPort->write(buffer.toStdString().data(), strlen(buffer.toStdString().data()));
posX = x;
unsigned int posX, posY;
bool toolUp;
+
+ static const int toolDistance;
};
#endif // XYPLOTTER_H
+++ /dev/null
-#include "livingdesktoplibrary.h"
-
-LivingDesktopLibrary::LivingDesktopLibrary()
-{
-}
+++ /dev/null
-#ifndef LIVINGDESKTOPLIBRARY_H
-#define LIVINGDESKTOPLIBRARY_H
-
-#include "livingdesktoplibrary_global.h"
-
-class LIVINGDESKTOPLIBRARYSHARED_EXPORT LivingDesktopLibrary
-{
-
- public:
- LivingDesktopLibrary();
-};
-
-#endif // LIVINGDESKTOPLIBRARY_H