mirror of
http://172.16.0.230/r/SIF/TowerOptoSifAndSpectral.git
synced 2025-10-19 19:49:42 +08:00
34 lines
813 B
C++
34 lines
813 B
C++
//
|
|
// Created by xin on 24-12-11.
|
|
//
|
|
#include <iostream>
|
|
#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"<<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();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return aaaaa.exec();
|
|
} |