mirror of
http://172.16.0.230/r/SIF/TowerOptoSifAndSpectral.git
synced 2025-10-20 03:49:43 +08:00
任立新 温控系统
This commit is contained in:
@ -2,14 +2,31 @@
|
||||
// Created by xin on 24-12-11.
|
||||
//
|
||||
#include <iostream>
|
||||
#include <TemperaTureWoker.h>
|
||||
#include <TemperatureRegulator.h>
|
||||
#include <TimeWorker.h>
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <qthread.h>
|
||||
#include <fstream>
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
QCoreApplication aaaaa(argc, argv);
|
||||
std::cout<<"Hello World";
|
||||
TemperaTureWoker *pTemperaTureWoker = new TemperaTureWoker();
|
||||
std::cout<<"Hello World"<<std::flush;
|
||||
json j;
|
||||
std::ifstream i("/home/data/Setting/Constant_Temperature_Config.json");
|
||||
|
||||
|
||||
i>>j;
|
||||
json timeconfig=j["TimeConfig"];
|
||||
json tempconfig=j["TemperatureConfig"];
|
||||
TemperatureRegulator *temperature_regulator=new TemperatureRegulator();
|
||||
temperature_regulator->setconfig(tempconfig);
|
||||
TimeWorker *timeWorker=new TimeWorker();
|
||||
timeWorker->ReadConfig(timeconfig);
|
||||
timeWorker->SetTask(TemperatureRegulator::looptask);
|
||||
timeWorker->Start();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user