DPL limit scaling: prevent division by zero
this check was removed on error when moving the scaling code into its own function.
This commit is contained in:
parent
b0795a2131
commit
c42d68812c
@ -655,7 +655,7 @@ static int32_t scalePowerLimit(std::shared_ptr<InverterAbstract> inverter, int32
|
||||
}
|
||||
}
|
||||
|
||||
if (dcProdChnls == dcTotalChnls) { return newLimit; }
|
||||
if (dcProdChnls == 0 || dcProdChnls == dcTotalChnls) { return newLimit; }
|
||||
|
||||
MessageOutput.printf("[DPL::scalePowerLimit] %d channels total, %d producing "
|
||||
"channels, scaling power limit\r\n", dcTotalChnls, dcProdChnls);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user