Permalink
Browse files

Bug fix in the speed array filling

  • Loading branch information...
get-a-clue committed May 4, 2015
1 parent fb895ba commit 2f7445e62e9f23c5cd704e3a168422ec50f2a1bf
Showing with 6 additions and 10 deletions.
  1. +5 −9 src/corefilters/filtercnt.cpp
  2. +1 −1 src/utm/utm.h
@@ -74,25 +74,21 @@ void filtercnt::do_refresh(unsigned int total_points, unsigned int next_point)
if (delta < 0)
{
cnt_speed = static_cast<unsigned int>(delta / -REFRESH_INTERVAL);
}
else
{
cnt_speed = static_cast<unsigned int>(delta / REFRESH_INTERVAL);
delta = -delta;
}
cnt_speed = static_cast<unsigned int>(delta / REFRESH_INTERVAL);
cnt_set[next_point] = filtercnt::pack_speed(cnt_speed);
cnt_prev = cnt;
if (delta != 0)
{
cnt_set[next_point] = filtercnt::pack_speed(cnt_speed);
// For XML Traffic Reports
cnt_xml += delta;
cnt_xml2 += delta;
// For Database Traffic Reports
cnt_logdb += delta;
cnt_prev = cnt_prev + delta;
}
// Calc average speed for last N points
@@ -6,7 +6,7 @@
#endif
#ifndef UTM_VERSION
#define UTM_VERSION "15.0.58"
#define UTM_VERSION "15.0.59"
#endif
#ifdef UTM_WIN

0 comments on commit 2f7445e

Please sign in to comment.