victron charge power is integer
This commit is contained in:
parent
26a8809121
commit
4a51ae5038
@ -25,7 +25,7 @@ private:
|
||||
float _powerMeter3Power;
|
||||
|
||||
bool canUseDirectSolarPower();
|
||||
float getDirectSolarPower();
|
||||
uint16_t getDirectSolarPower();
|
||||
float getLoadCorrectedVoltage(std::shared_ptr<InverterAbstract> inverter);
|
||||
bool isStartThresholdReached(std::shared_ptr<InverterAbstract> inverter);
|
||||
bool isStopThresholdReached(std::shared_ptr<InverterAbstract> inverter);
|
||||
|
||||
@ -90,9 +90,9 @@ void PowerLimiterClass::loop()
|
||||
return;
|
||||
}
|
||||
|
||||
float victronChargePower = this->getDirectSolarPower();
|
||||
uint16_t victronChargePower = this->getDirectSolarPower();
|
||||
|
||||
MessageOutput.printf("[PowerLimiterClass::loop] victronChargePower: %.2f\r\n", victronChargePower);
|
||||
MessageOutput.printf("[PowerLimiterClass::loop] victronChargePower: %d\r\n", victronChargePower);
|
||||
|
||||
if (millis() - _lastPowerMeterUpdate < (30 * 1000)) {
|
||||
MessageOutput.printf("[PowerLimiterClass::loop] dcVoltage: %.2f config.PowerLimiter_VoltageStartThreshold: %.2f config.PowerLimiter_VoltageStopThreshold: %.2f inverter->isProducing(): %d\r\n",
|
||||
@ -218,13 +218,13 @@ bool PowerLimiterClass::canUseDirectSolarPower()
|
||||
return true;
|
||||
}
|
||||
|
||||
float PowerLimiterClass::getDirectSolarPower()
|
||||
uint16_t PowerLimiterClass::getDirectSolarPower()
|
||||
{
|
||||
if (!this->canUseDirectSolarPower()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return VeDirect.veFrame.PPV;
|
||||
return round(VeDirect.veFrame.PPV);
|
||||
}
|
||||
|
||||
float PowerLimiterClass::getLoadCorrectedVoltage(std::shared_ptr<InverterAbstract> inverter)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user