comment added
This commit is contained in:
12
app/main.cpp
12
app/main.cpp
@@ -4,6 +4,9 @@
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "datamodel.h"
|
||||
#include "Controller.h"
|
||||
|
||||
|
||||
// evaluate keyboard hits
|
||||
// return 0 - no keyboard hit detected
|
||||
@@ -31,7 +34,6 @@ int kbhit() {
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#include "Controller.h"
|
||||
|
||||
|
||||
// entry point for controller app
|
||||
@@ -41,15 +43,21 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication a(argc, argv);
|
||||
|
||||
DataModel model; // create data model instance
|
||||
|
||||
Controller bbr; // create controller instance
|
||||
|
||||
bbr.initialize(&model);
|
||||
|
||||
// loop endlessly until keybord hit
|
||||
qDebug() << "Press any key to stop ...";
|
||||
while(!kbhit())
|
||||
{
|
||||
qDebug() << "Perform bbr setp";
|
||||
qDebug() << "Perform 'temperature is rising'";
|
||||
bbr.step();
|
||||
usleep(200000); // 200ms delay
|
||||
|
||||
model.getInputs()->data()->analog.Istwert_Temperatur += 0.1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user