Go to idle state if MPPT power is too low

This commit is contained in:
Thomas Kolb 2020-04-12 17:31:45 +02:00
parent c00f9f2f74
commit efca8d7e1a
1 changed files with 2 additions and 4 deletions

View File

@ -953,10 +953,8 @@ int main(void)
timer_set_oc_value(TIM1, TIM_CH_CONV, pwm);
if(time_in_state > 5000 && power_state.current_avg < CURRENT_THRESHOLD) {
operState = Bootstrap;
nextState = ConvMPP;
mpp_state.testIdx = -1;
if(time_in_state > 1000 && power_state.power_avg < POWER_THR_MPP_TO_IDLE) {
operState = Idle;
}
if(power_state.vout_avg > VOLTAGE_THR_MPP_TO_CV) {