chargeController/APP/businessLogic/Src/bl_chargControl.c

200 lines
2.7 KiB
C
Raw Normal View History

2024-12-06 09:38:25 +00:00
#include "bl_chargControl.h"
#include "parameter.h"
#include "comm_types.h"
static void stopChargWork(void);
static int stopChargConditions(void);
static int floatChargConditions(void);
static int mpptChargConditions(void);
static int constantVChargConditions(void);
static void mpptCharge(void);
static void constantVoltageCharge(void);
static void floatCharge(void);
/**
* @brief
* @param
* @retval
*
*/
void stopChargWork(void)
{
}
/**
* @brief
* @param
* @retval TRUE
* FALSE
*
*/
BOOL stopChargConditions(void)
{
return FALSE;
}
/**
* @brief
* @param
* @retval TRUE
* FALSE
*
*/
BOOL floatChargConditions(void)
{
return FALSE;
}
/**
* @brief
* @param
* @retval TRUE
* FALSE
*
*/
BOOL mpptChargConditions(void)
{
return FALSE;
}
/**
* @brief
* @param
* @retval TRUE
* FALSE
*
*/
BOOL constantVChargConditions(void)
{
return FALSE;
}
/**
* @brief
* @param
* @retval
*
*/
int chargControlMode(void)
{
if (stopChargConditions()) {
stopChargWork();
return noWork;
}
if (floatChargConditions()) {
return floatCharg;
}
if (mpptChargConditions()) {
return MPPT;
}
if (constantVChargConditions()) {
return constantVoltage;
}
}
/**
* @brief
* @param
* @retval
*
*/
void getCVData(void)
{
}
/**
* @brief
* @param
* @retval
*
*/
void judgeYNBattery(void)
{
}
/**
* @brief
* @param
* @retval
*
*/
void noBatteryChargControl(void)
{
}
/**
* @brief
* @param
* @retval
*
*/
void mpptCharge(void)
{
}
/**
* @brief
* @param
* @retval
*
*/
void constantVoltageCharge(void)
{
}
/**
* @brief
* @param
* @retval
*
*/
void floatCharge(void)
{
}
/**
* @brief
* @param
* @retval
*
*/
void BatteryChargControl(void)
{
switch(g_otherParameter.MPPT_Mode) {
case CONSTANTCURRENT:
mpptCharge();
break;
case CONSTANTVOLTAGE:
constantVoltageCharge();
break;
case FLOAT:
floatCharge();
break;
default:
stopChargWork();
break;
}
}