|
@@ -698,15 +698,17 @@ unsigned char footPDR(uint32_t num, float *gyr, float *acc, uint16_t front_press
|
|
|
{
|
|
|
unsigned char movement_e = 0;
|
|
|
|
|
|
- dt = 0.00258f;
|
|
|
-// dt = (float)(num - last_timestamp) * 0.000001133f;
|
|
|
-//
|
|
|
-// if(num < last_timestamp || dt > 0.006f)
|
|
|
-// {
|
|
|
-// //dt =(float)(4294967295 - last_timestamp + num) * 0.000001f;
|
|
|
-// dt = 0.00272f;
|
|
|
-// }
|
|
|
-//
|
|
|
+ //dt = 0.00258f;
|
|
|
+ //Ö±½Ó³ËÒÔ0.000001fÊÇ·ñÓзçÏÕ£¿
|
|
|
+ dt = (float)(num - last_timestamp) * 0.001032f;
|
|
|
+ dt *= 0.001f;
|
|
|
+
|
|
|
+ if(num < last_timestamp)
|
|
|
+ {
|
|
|
+ //dt =(float)(4294967295 - last_timestamp + num) * 0.000001f;
|
|
|
+ dt = 0.0026f;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
last_timestamp = num;
|
|
|
|