|
@@ -414,11 +414,11 @@ static float Power_management(float mV_Battery, float mV_Charge)
|
|
|
battercb->sta = 1; //放电过程
|
|
|
//初始化滤波器波器
|
|
|
battercb->preBestResult_Voltage2power = mV_Battery / 10;
|
|
|
- #ifdef PIN_BATFULL
|
|
|
- if ((battercb->P1 > 99.1f) && (charge_in()) && (nrf_gpio_pin_read(PIN_BATFULL) == 0))
|
|
|
- #else
|
|
|
+// #ifdef PIN_BATFULL
|
|
|
+// if ((battercb->P1 > 99.1f) && (charge_in()) && (nrf_gpio_pin_read(PIN_BATFULL) == 0))
|
|
|
+// #else
|
|
|
if ((battercb->P1 > 99.1f) && (charge_in()))
|
|
|
- #endif
|
|
|
+// #endif
|
|
|
{
|
|
|
battercb->P1 = 100.0f;
|
|
|
}
|
|
@@ -508,10 +508,11 @@ static void hal_battery_Process(void)
|
|
|
len = sprintf(buff, "%4d ,%4d ,%4d,%f\r\n", TIME_GetTicks(), volTemp, volTemp_CHARGMEASURE, battercb->adc_tp4056_power);
|
|
|
send_bytes_client((unsigned char*)buff, len);
|
|
|
#endif
|
|
|
- if (cprign % 600 == 0)
|
|
|
- {
|
|
|
+ if (cprign % 600 == 0)//600
|
|
|
+ {
|
|
|
log("%4d,%4d,%4d,%2.1f,%d,%2.1f,%2.1f,%2.1f\n", TIME_GetTicks(), volTemp, volTemp_CHARGMEASURE, battercb->adc_tp4056_power, battercb->sta, battercb->P_mAh, battercb->P2, battercb->kg);
|
|
|
logbuftemp[logbuftemp_len] = 0;
|
|
|
+// SEGGER_RTT_Write(0,logbuftemp,logbuftemp_len);
|
|
|
Except_TxError(EXCEPT_DATA_BATTERY, logbuftemp);
|
|
|
}
|
|
|
cprign++;
|