Implement get_minimal_parkingtime() and get_time_steps().

This commit is contained in:
2024-01-22 15:41:20 +01:00
parent 0ce630dfa3
commit b43fa274bd
3 changed files with 73 additions and 66 deletions

View File

@@ -12,8 +12,15 @@
static Calculator calculator;
QList<int> CALCULATE_LIBRARY_API get_time_steps(Configuration *cfg, qint64 startInMinutes) {
return calculator.GetTimeSteps(cfg, startInMinutes);
QList<int> CALCULATE_LIBRARY_API get_time_steps(Configuration *cfg) {
return calculator.GetTimeSteps(cfg);
}
int CALCULATE_LIBRARY_API get_minimum_parkingtime(Configuration *cfg) {
// get_time_steps() possibly re-computes pop_min_time: see
// calculator.GetTimeSteps()
get_time_steps(cfg);
return qRound(cfg->getPaymentOptions().pop_min_time);
}
int CALCULATE_LIBRARY_API get_zone_nr(int zone)