remove wrong debug-out-put. Use ceil() instead on floor() to prevent rounding error.:w
This commit is contained in:
@@ -59,13 +59,13 @@ CalcState CALCULATE_LIBRARY_API init_tariff(parking_tariff_t **tariff, char cons
|
||||
|
||||
QString json = fname.readAll();
|
||||
if (! (*tariff)->ParseJson(*tariff, json.toStdString().c_str())) {
|
||||
calcState.m_status = CalcState::State::ERROR_PARSING_TARIFF;
|
||||
return calcState.set(CalcState::State::ERROR_PARSING_TARIFF);
|
||||
}
|
||||
} else {
|
||||
calcState.m_status = CalcState::State::ERROR_LOADING_TARIFF;
|
||||
return calcState.set(CalcState::State::ERROR_LOADING_TARIFF);
|
||||
}
|
||||
|
||||
qCritical() << "init_tariff: Parsing tariff config (" << confFile << ") failed!";
|
||||
qCritical() << "init_tariff: Parsing tariff config (" << confFile << ")";
|
||||
|
||||
return calcState;
|
||||
}
|
||||
|
@@ -509,6 +509,6 @@ double Calculator::GetCostFromDuration(Configuration* cfg, uint8_t payment_optio
|
||||
|
||||
double ret_val = total_cost;
|
||||
total_cost = 0.0f;
|
||||
// return ceil(ret_val);
|
||||
return floor(ret_val);
|
||||
return ceil(ret_val);
|
||||
// return floor(ret_val);
|
||||
}
|
||||
|
Reference in New Issue
Block a user