WS #1
|
@ -30,7 +30,7 @@ void sts_weight_scale_init(void)
|
||||||
{
|
{
|
||||||
HX711_Init();
|
HX711_Init();
|
||||||
Get_GrossWeight();
|
Get_GrossWeight();
|
||||||
HAL_Delay(500);
|
HAL_Delay(10);
|
||||||
Get_GrossWeight();
|
Get_GrossWeight();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ void Get_GrossWeight(void)
|
||||||
{
|
{
|
||||||
gross_weight = HX711_Read();
|
gross_weight = HX711_Read();
|
||||||
gross_weight = KalmanFilter(gross_weight);
|
gross_weight = KalmanFilter(gross_weight);
|
||||||
APP_LOG(TS_OFF, VLEVEL_M, "\r\n ##### Gross Weight =%d <<<<<< \r\n",gross_weight);
|
//APP_LOG(TS_OFF, VLEVEL_M, "\r\n ##### Gross Weight =%d <<<<<< \r\n",gross_weight);
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************
|
//****************************************************
|
||||||
|
@ -168,8 +168,8 @@ void Get_NetWeight(void)
|
||||||
//因为不同的传感器特性曲线不一样,因此,每一个传感器需要矫正这里的GapValue这个除数。
|
//因为不同的传感器特性曲线不一样,因此,每一个传感器需要矫正这里的GapValue这个除数。
|
||||||
//当发现测试出来的重量偏大时,增加该数值。
|
//当发现测试出来的重量偏大时,增加该数值。
|
||||||
|
|
||||||
net_weight = KalmanFilter(net_weight);
|
//net_weight = KalmanFilter(net_weight);
|
||||||
APP_LOG(TS_OFF, VLEVEL_M, "\r\n ##### Net Weight =%d \r\n", net_weight);//如果测试出来的重量偏小时,减小改数值。
|
//APP_LOG(TS_OFF, VLEVEL_M, "\r\n ##### Net Weight =%d \r\n", net_weight);//如果测试出来的重量偏小时,减小改数值。
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -579,7 +579,7 @@ static void SendTxData(void)
|
||||||
EnvSensors_Read(&sensor_data);
|
EnvSensors_Read(&sensor_data);
|
||||||
#ifdef STS_WS
|
#ifdef STS_WS
|
||||||
sts_weight_scale(&sts_sensor_data);
|
sts_weight_scale(&sts_sensor_data);
|
||||||
APP_LOG(TS_ON, VLEVEL_M, "Weigt Scale : %d\r\n", sts_sensor_data.weight_scale_value);
|
APP_LOG(TS_ON, VLEVEL_M, "Weight Scale : %d\r\n", sts_sensor_data.weight_scale_value);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
APP_LOG(TS_ON, VLEVEL_M, "VDDA: %d\r\n", batteryLevel);
|
APP_LOG(TS_ON, VLEVEL_M, "VDDA: %d\r\n", batteryLevel);
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue