diff --git a/main/main.cpp b/main/main.cpp index 687c751..2026319 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -37,8 +37,8 @@ extern "C" char* strptime(const char* s, #define SZEGED (0) #define SCHOENAU_KOENIGSEE (0) #define NEUHAUSER_KORNEUBURG (0) -#define NEUHAUSER_LINSINGER_MASCHINENBAU (0) -#define NEUHAUSER_NORDISCHES_AUSBILDUNGSZENTRUM (1) +#define NEUHAUSER_LINSINGER_MASCHINENBAU (1) +#define NEUHAUSER_NORDISCHES_AUSBILDUNGSZENTRUM (0) #define NEUHAUSER_BILEXA_GALTUER (0) #define NEUHAUSER_KIRCHDORF (0) @@ -561,16 +561,23 @@ int main() { QDateTime end; int marken[] = { 3*60, 5*60, 10*60}; for (int duration = 0; duration < 3; ++duration) { - for (int offset = 360; offset <= 1080; ++offset) { + for (int offset = 360; offset <= 360; ++offset) { + // for (int offset = 360; offset < 1080; ++offset) { QDateTime start = s.addSecs(offset * 60); //qCritical() << "start" << start.toString(Qt::ISODate); - double cost = Calculator::GetInstance().GetCostFromDuration(&cfg, 4, start, end, marken[duration], nextDay, prePaid); - //qCritical() << ""; - qCritical() << "start" << start.toString(Qt::ISODate) - << "end" << end.toString(Qt::ISODate) - << "duration" << marken[duration] - << "cost" << cost; + // double cost = Calculator::GetInstance().GetCostFromDuration(&cfg, 4, start, end, marken[duration], nextDay, prePaid); + + struct price_t price; + //if (compute_price_for_parking_ticket(&cfg, start, marken[duration], end, &price)) { + compute_price_for_parking_ticket(&cfg, start, marken[duration], end, &price); + double cost = price.netto; + + qCritical() << "start" << start.toString(Qt::ISODate) + << "end" << end.toString(Qt::ISODate) + << "duration" << marken[duration] + << "cost" << cost; + //} //std::string d = Calculator::GetInstance().GetDurationFromCost(&cfg, 4, start.toString(Qt::ISODate).toStdString().c_str(), cost); //qCritical() << "start" << start.toString(Qt::ISODate)