2024-12-07 09:52:46 +00:00
|
|
|
|
|
|
|
#include "abnormalManage.h"
|
|
|
|
#include "parameter.h"
|
|
|
|
#include "capture.h"
|
2024-12-10 10:29:05 +00:00
|
|
|
#include "checkTime.h"
|
2024-12-11 09:51:48 +00:00
|
|
|
#include "FM_GPIO.h"
|
2024-12-07 09:52:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
void checkAbnormal(void)
|
|
|
|
{
|
2024-12-10 10:29:05 +00:00
|
|
|
// checkTimeInit();
|
2024-12-07 09:52:46 +00:00
|
|
|
/* 滤波 */
|
|
|
|
adcCaptureFir();
|
|
|
|
|
|
|
|
/* 转换 */
|
|
|
|
setChargCurrent();
|
|
|
|
setDischargCurrent();
|
|
|
|
setOutputVoltage();
|
|
|
|
setSolarInCircuitVoltage();
|
|
|
|
|
2024-12-11 09:51:48 +00:00
|
|
|
/* 判断 */
|
|
|
|
|
|
|
|
/* 是否打开充电理想二极管 */
|
|
|
|
if (get_CHG_CURR() > 2.0f) {
|
|
|
|
FFMOS_CON_Open();
|
|
|
|
}
|
|
|
|
else if (get_CHG_CURR() < 1.0f) {
|
|
|
|
FFMOS_CON_Close();
|
|
|
|
}
|
|
|
|
|
2024-12-07 09:52:46 +00:00
|
|
|
|
|
|
|
|
2024-12-11 09:51:48 +00:00
|
|
|
// checkAbnormalTime = getCheckTime();
|
2024-12-07 09:52:46 +00:00
|
|
|
}
|
|
|
|
|