能源管控程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

33 lines
566 B

  1. #ifndef VoltageDevice_h
  2. #define VoltageDevice_h
  3. #include <Arduino.h>
  4. #include "Delay.h"
  5. class VoltageDevice
  6. {
  7. private:
  8. byte data[25];
  9. public:
  10. VoltageDevice(/* args */);
  11. ~VoltageDevice();
  12. /**
  13. *@brief 通过串口读取设备数据
  14. */
  15. bool ReadData();
  16. /**
  17. * @brief 字节数组转换成浮点数
  18. *
  19. * @param len 字节长度
  20. * @param Index 起始字节索引
  21. * @param bl 转换倍率
  22. * @return float
  23. */
  24. float DataConvert(int len, int Index, int bl = 1);
  25. };
  26. extern VoltageDevice MyVd;
  27. #endif