Http Version - Fix to calculate the fill rate.
This commit is contained in:
parent
e1d57eae32
commit
99bc9209af
1 changed files with 1 additions and 1 deletions
|
|
@ -84,7 +84,7 @@ void RequestWorker::requestFinished(QNetworkReply *rep)
|
|||
float water_level = (float) ((float) (data_water_level) / 10.0);
|
||||
float rate_of_fill = ( float )(prev_distance - water_level) /(float) time_in_microseconds;
|
||||
rate_of_fill = rate_of_fill * 1'000'000;
|
||||
int expected_to_fill = (max_height - water_level) / rate_of_fill;
|
||||
int expected_to_fill = (water_level - min_height) / rate_of_fill;
|
||||
if(reply_number == 0) {
|
||||
rate_of_fill = 0;
|
||||
expected_to_fill = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue