引入mqtt 引入cjson

This commit is contained in:
2584532475@qq.com committed 2023-11-30 08:10:01 +08:00
1 parent a69c1a58d6
commit f8591b8b99
86 files changed
+12141 -2157

No files matched your search

+55
View File
@@ -0,0 +1,55 @@
#include "data.h"
#include "math.h"
#include "easyflash.h"
#include "stdlib.h"
// 两点法计算k,b
//uint16_t math_k(uint32_t x0,uint32_t y0,uint32_t x1,uint32_t y1)
//{
// uint16_t k;
// k = (y0-x0)/(y1-x1);
// return k;
//}
//uint16_t math_k(uint32_t x0,uint32_t y0,uint32_t x1,uint32_t y1)
//{
// uint16_t k;
// k = (y0-x0)/(y1-x1);
// return k;
//}
//WaterLeveInfo_t Info = {
// .Y[0] = 2,
//};
// 水位流量关系表
//uint16_t WaterLeveCalc(int leve,int Open)
//{
// for (int i =0;i< 100;i++)
// {
// if (LeveInfo.X[i] > Open)
// {
// for (int j =0;j < 100;i++)
// {
// if (LeveInfo.Key[i].Y[j] >leve)
// {
// return LeveInfo.Key[i].Key[j];
// }
// }
// }
// }
// return 0;
//}
int32_t ParShallCalc(int index,double leve)
{
char * p;
double flow = 0;
flow = ParShallTale[index].c * pow(leve,ParShallTale[index].m);
return (int32_t )(flow *100);
}