#ifndef VoltageDevice_h
#define VoltageDevice_h

#include <Arduino.h>
#include "Delay.h"

class VoltageDevice
{
private:
    byte data[25];

public:
    VoltageDevice(/* args */);
    ~VoltageDevice();

    /**
     *@brief 通过串口读取设备数据
     */
    bool ReadData();

    /**
     * @brief 字节数组转换成浮点数
     *
     * @param len 字节长度
     * @param Index 起始字节索引
     * @param bl 转换倍率
     * @return float
     */
    float DataConvert(int len, int Index, int bl = 1);
};

extern VoltageDevice MyVd;
#endif