chargeController/APP/businessLogic/Src/bl_chargControl.c

201 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);
2024-12-06 13:23:28 +00:00
static BOOL stopChargConditions(void);
static BOOL floatChargConditions(void);
static BOOL mpptChargConditions(void);
static BOOL constantVChargConditions(void);
2024-12-06 09:38:25 +00:00
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
2024-12-06 13:23:28 +00:00
* @retval
2024-12-06 09:38:25 +00:00
*
*/
2024-12-06 13:23:28 +00:00
void chargControlMode(void)
2024-12-06 09:38:25 +00:00
{
if (stopChargConditions()) {
stopChargWork();
setMPPT_Mode(noWork);
2024-12-06 09:38:25 +00:00
}
if (floatChargConditions()) {
setMPPT_Mode(floatCharg);
2024-12-06 09:38:25 +00:00
}
if (mpptChargConditions()) {
setMPPT_Mode(MPPT);
2024-12-06 09:38:25 +00:00
}
if (constantVChargConditions()) {
setMPPT_Mode(constantVoltage);
2024-12-06 09:38:25 +00:00
}
}
/**
* @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(getMPPT_Mode()) {
2024-12-06 09:38:25 +00:00
2024-12-06 13:23:28 +00:00
case MPPT:
2024-12-06 09:38:25 +00:00
mpptCharge();
break;
2024-12-06 13:23:28 +00:00
case constantVoltage:
2024-12-06 09:38:25 +00:00
constantVoltageCharge();
break;
2024-12-06 13:23:28 +00:00
case floatCharg:
2024-12-06 09:38:25 +00:00
floatCharge();
break;
default:
setMPPT_Mode(noWork);
2024-12-06 09:38:25 +00:00
stopChargWork();
break;
}
}