//
// Created by xin on 24-12-12.
//

#ifndef TEMPERATUREWOKER_H
#define TEMPERATUREWOKER_H
#include "QObject"
#include <QtSerialPort/QSerialPort>
#include <QtSerialPort/QSerialPortInfo>
#include "nlohmann/json.hpp"
struct tempera_group
{
    float tempera[8]={0};

};
using json = nlohmann::json;
class TemperaTureWoker:public QObject {
    Q_OBJECT
public:
  TemperaTureWoker();
  //   TemperaTureWoker(json jconfig);
    void OpenCom(QString portname,int baudrate);
  QList<tempera_group> m_Tempreaturegroups;
    void ReadTempreature();
  private:
    QSerialPort *m_SerialPort= nullptr;
    bool m_isInit=false;

};



#endif //TEMPERATUREWOKER_H
