compute_next_timestep():

Restrict time-step-list when time-limit has been reached: +/-_button
	does not move upward anymore.
This commit is contained in:
Gerhard Hoffmann 2024-09-30 16:55:25 +02:00
parent 4f23ab3d68
commit ab3cdb32ae

View File

@ -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<ATBPaymentOption> paymentOption = tariff->getPaymentOptionForKey(permitType.get());
//if (!paymentOption.has_value()) {