From 3802273b806697c8adf0c1f72fedc07d8254dc1c Mon Sep 17 00:00:00 2001 From: Cornelius Claussen Date: Mon, 18 Dec 2023 14:52:54 +0100 Subject: [PATCH] fix type; add .value to total_power Signed-off-by: Cornelius Claussen --- modules/EnergyManager/BrokerFastCharging.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/EnergyManager/BrokerFastCharging.cpp b/modules/EnergyManager/BrokerFastCharging.cpp index 22b8511d32..1db1d84f1e 100644 --- a/modules/EnergyManager/BrokerFastCharging.cpp +++ b/modules/EnergyManager/BrokerFastCharging.cpp @@ -194,7 +194,7 @@ bool BrokerFastCharging::buy_ampere(const types::energy::ScheduleReqEntry& _offe // we have an additional watt limit if (total_power.has_value()) { - if (total_power > 0) { + if (total_power.value() > 0) { // is the watt limit high enough? if (total_power.value() >= max_current.value() * max_phases * local_market.nominal_ac_voltage()) { // yes, buy both ampere and watt @@ -216,7 +216,7 @@ bool BrokerFastCharging::buy_ampere(const types::energy::ScheduleReqEntry& _offe return true; } } else { - // Don't buy anything it the total power limit is 0 + // Don't buy anything if the total power limit is 0 return false; } } else {