diff --git a/library/src/calculate_price.cpp b/library/src/calculate_price.cpp index 6c8b119..0cd5f59 100644 --- a/library/src/calculate_price.cpp +++ b/library/src/calculate_price.cpp @@ -484,6 +484,15 @@ int CALCULATE_LIBRARY_API compute_next_timestep(parking_tariff_t *tariff, int cu qCritical() << __LINE__ << "compute_next_timestep() currentTimeMinutes: " << currentTimeMinutes; qCritical() << __LINE__ << "compute_next_timestep() up/down (1=up, 0=down): " << UpDown; + if (UpDown == 1) { + if (Calculator::GetInstance().timeLimitReached()) { + qCritical() << __LINE__ << "compute_next_timestep() time limit reached"; + Calculator::GetInstance().setTimeLimitReached(false); + Calculator::GetInstance().resetCostAtTimeLimit(); + return currentTimeMinutes; + } + } + // FIXME //std::optional paymentOption = tariff->getPaymentOptionForKey(permitType.get()); //if (!paymentOption.has_value()) {