diff --git a/library/src/calculate_price.cpp b/library/src/calculate_price.cpp index 561acfd..ed5ebc9 100644 --- a/library/src/calculate_price.cpp +++ b/library/src/calculate_price.cpp @@ -430,15 +430,16 @@ int CALCULATE_LIBRARY_API compute_next_timestep(parking_tariff_t *tariff, int cu qCritical() << " compute_next_timestep() currentTimeMinutes: " << currentTimeMinutes; qCritical() << " compute_next_timestep() up/down (1=up, 0=down): " << UpDown; - std::optional paymentOption = tariff->getPaymentOptionForKey(permitType.get()); - if (!paymentOption.has_value()) { - return currentTimeMinutes; - } + // FIXME + //std::optional paymentOption = tariff->getPaymentOptionForKey(permitType.get()); + //if (!paymentOption.has_value()) { + // qCritical() << " compute_next_timestep() ERROR"; + // return currentTimeMinutes; + //} int const paymentOptionIndex = tariff->getPaymentOptionIndex(permitType); qCritical() << " compute_next_timestep() payment option index: " << paymentOptionIndex; - Configuration const *cfg = tariff; // compute payment method id (e.g. Linear=3, Steps=4) @@ -510,6 +511,7 @@ int CALCULATE_LIBRARY_API compute_next_timestep(parking_tariff_t *tariff, int cu return currentTimeMinutes; } else { + qCritical() << " compute_next_timestep() return next time step:" << stepList[currentStepIndex + 1]; return stepList[currentStepIndex + 1]; } } @@ -519,6 +521,7 @@ int CALCULATE_LIBRARY_API compute_next_timestep(parking_tariff_t *tariff, int cu return currentTimeMinutes; } else { + qCritical() << " compute_next_timestep() return next time step:" << stepList[currentStepIndex - 1]; return stepList[currentStepIndex - 1]; } }