|
|
@@ -3,8 +3,7 @@
|
|
|
#include "libs/shark_libs.h"
|
|
|
#include "libs/circle_buffer.h"
|
|
|
#include "libs/logger.h"
|
|
|
-
|
|
|
-#define MAX_SIZE 100
|
|
|
+#define MAX_SIZE 50
|
|
|
typedef struct {
|
|
|
c_buffer_t current;
|
|
|
c_buffer_t delta_ts;
|
|
|
@@ -54,7 +53,6 @@ int soft_current_push(float current_ma){
|
|
|
circle_put_one_data(&_fifo_i2.delta_ts,delta_ts);
|
|
|
}
|
|
|
_fifo_i2.last_ts = shark_get_mseconds();
|
|
|
- float f_sum = _fifo_i2.i2t_sum*(1.0f / ((float)_fifo_i2.ts_sum/1000.0f));
|
|
|
- return (f_sum >= MAX_I2T); //ÕÛËãµ½1s
|
|
|
+ return (_fifo_i2.i2t_sum >= MAX_I2T); //ÕÛËãµ½1s
|
|
|
}
|
|
|
|