//
// Created by xin on 2022/4/24.
//

#ifndef ESP32MAINBOARD_SENSOROPTOSKY_H
#define ESP32MAINBOARD_SENSOROPTOSKY_H
;
#include "optoskybase.h"
typedef void (*PRINTFUNC)(String );
class SensorOptoSky {
public:
    STRSensorInfo SensorInfo;
    OptoSky IS1Sensor;
    bool initSensor(int id = 2);
    STRSensorInfo GetSensorInfo();
    void SetShutter(int id);// 0 dark 1 green 2 blue
    void GetOneDate(int msc);
    unsigned short *DATABUFF;
    int shutterup,shutterdown;
    unsigned short *DownData;
    unsigned short *UpData;
    void shortLittletoBiG( unsigned short *data,int lenth);
    int OptSnenser(int percent);
    int Getmaxvalue(unsigned short *data,int lenth);
    void TakeOneJob();
    PRINTFUNC PrintFunc;
    //int shutterup,shutterdown;

};


#endif //ESP32MAINBOARD_SENSOROPTOSKY_H
