|
|
@@ -283,9 +283,21 @@ static __inline__ int can_modify_min_when_full(void){
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+static bool is_force_full = false;
|
|
|
+static u32 force_full_time = 0;
|
|
|
+bool soc_is_force_full(void) {
|
|
|
+ if (is_force_full) {
|
|
|
+ if (shark_get_seconds() >= 5 + force_full_time) {
|
|
|
+ is_force_full = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return is_force_full;
|
|
|
+}
|
|
|
|
|
|
static void _force_capacity_full(void){
|
|
|
_soc.capacity = 100;
|
|
|
+ is_force_full = true;
|
|
|
+ force_full_time = shark_get_seconds();
|
|
|
if (can_modify_min_when_full()) { //前面出现过电芯欠压, 当前容量没到最大容量
|
|
|
double curr_real_cap = start_charger_coulomb + _soc.charger_coulomb;
|
|
|
double curr_min_cap = 0.0f;
|