Sensors now work over broadcast pipe

Added Polynomal actor
Added Item adding dialog
Added Factor Actor
This commit is contained in:
Carl Klemm 2020-02-04 22:56:10 +01:00
parent f6aaebafc6
commit 772d21a982
63 changed files with 1450 additions and 225 deletions

View file

@ -97,6 +97,9 @@ int main(int argc, char *argv[])
if(!microPort->open(QIODevice::ReadWrite)) std::cout<<"Can not open serial port "<<microPort->portName().toStdString()<<". Continueing in demo mode"<<'\n';
masterIODevice = microPort;
}
MainObject mainObject(masterIODevice, parser.isSet(settingsPathOption) ? parser.value(settingsPathOption) : "", !parser.isSet(secondaryOption));
#else
QTcpSocket* microSocket = new QTcpSocket;
microSocket->connectToHost("10.0.0.1", 6856, QIODevice::ReadWrite);
@ -106,14 +109,16 @@ int main(int argc, char *argv[])
return 1;
}
masterIODevice = microSocket;
MainObject mainObject(masterIODevice, parser.isSet(settingsPathOption) ? parser.value(settingsPathOption) : "", !parser.isSet(secondaryOption));
#endif
MainObject mainObject(masterIODevice, parser.isSet(settingsPathOption) ? parser.value(settingsPathOption) : "", !parser.isSet(secondaryOption));
//mainwindow
MainWindow w(&mainObject.micro, &mainObject.powerItem, &mainObject.items, &mainObject.sensors, !parser.isSet(secondaryOption));
MainWindow w(&mainObject);
QObject::connect(&mainObject.micro, SIGNAL(textRecived(QString)), &w, SLOT(changeHeaderLableText(QString)));
QObject::connect(&w, &MainWindow::sigBrodcast, &mainObject, &MainObject::sendJson);
QObject::connect(&w, &MainWindow::createdItem, &mainObject.items, &ItemStore::addItem);
if(!mainObject.micro.connected()) w.changeHeaderLableText("No io debug only!");
w.show();