1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- #include "SPM.h"
- void SPM_Init(void)
- {
- SOH_Init();
- BLC_Init();
- CDM_Init();
- SOC_Init();
- PIM_Init();
- SOE_Init();
- SOR_Init();
- SOP_Init();
- spmd_flg_firstRun = true;
- }
- void SPM(void)
- {
- static uint16_T spmn_num_cellNr;
- uint8_T Feq = 30;
- if (spmd_flg_firstRun)
- {
- spmn_num_cellNr = 0;
- cand_idx_cellNr = 1;
- }
- spmn_num_cellNr = spmn_num_cellNr + 1;
- if (spmn_num_cellNr % Feq == 0)
- {
- cand_idx_cellNr ++;
- }
- else if (spmn_num_cellNr > 60000)
- {
- spmn_num_cellNr = 0;
- }
- if (cand_idx_cellNr > cmnc_num_cellUNum)
- {
- cand_idx_cellNr = 1;
- }
- //调用SOX算法
- SOH();
- BLC();
- if (ihd_flg_urtRecFlg && sfmd_V_cellUMin != 0)
- {
- CDM();
- SOC();
- PIM();
- SOE();
- SOR();
- SOP();
- }
- // 循环发送数组
- cand_Q_cellCap = sohv_Q_cellCapArrEo[cand_idx_cellNr-1];
- cand_V_chrgStartStat = sohv_V_chrgStartStatEo[cand_idx_cellNr-1];
- cand_Q_blcReqCp = blcv_Q_reqCpEo[cand_idx_cellNr-1];
- cand_Q_blcTotalCp = blcv_Q_totalCpEo[cand_idx_cellNr-1];
-
- spmd_flg_firstRun = false;
- }
|