Fix: nextTimeStep must be between minParkingTime and maxParkingTime.
This commit is contained in:
		@@ -173,9 +173,9 @@ int CALCULATE_LIBRARY_API compute_next_timestep(parking_tariff_t *tariff, int cu
 | 
			
		||||
 | 
			
		||||
        qCritical() << "     compute_next_timestep() firstDurationStep:" << firstDurationStep;
 | 
			
		||||
 | 
			
		||||
        int nextTimeStep = currentTimeMinutes + firstDurationStep;
 | 
			
		||||
        int const nextTimeStep = currentTimeMinutes + firstDurationStep;
 | 
			
		||||
 | 
			
		||||
        if (currentTimeMinutes >= minParkingTime && nextTimeStep <= maxParkingTime) {
 | 
			
		||||
        if (nextTimeStep >= minParkingTime && nextTimeStep <= maxParkingTime) {
 | 
			
		||||
            qCritical() << "          compute_next_timestep() nextTimeStep:" << nextTimeStep;
 | 
			
		||||
            return nextTimeStep;
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user