diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2014-04-25 18:39:25 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2014-04-25 18:39:25 +0200 |
commit | 313ded275104952e930d5b11fc5382ccee731b2b (patch) | |
tree | 20516f7ddb5783b97317e2364b1509090b7b4abf | |
parent | f40d8ff14a4e51ecc255800c24ce4be291e05eca (diff) |
Fix velocity bug.
-rw-r--r-- | src/powerlist.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/powerlist.cc b/src/powerlist.cc index 86378ca..e0809ab 100644 --- a/src/powerlist.cc +++ b/src/powerlist.cc @@ -186,14 +186,14 @@ void PowerList::finalise() power = sqrt(power); - if(power > power_max) power_max = power; - sample->power = power; } #endif/*AUTO_CALCULATE_POWER*/ item.power = sample->power; + if(item.power > power_max) power_max = item.power; + DEBUG(rand, " - power: %f\n", item.power); si++; @@ -202,6 +202,8 @@ void PowerList::finalise() Sample *PowerList::get(level_t level) { + + Sample *sample = NULL; float power = 0; @@ -210,8 +212,8 @@ Sample *PowerList::get(level_t level) float lvl = box_muller_transform(mean, stddev); - DEBUG(rand, "lvl: %f (mean: %.2f, stddev: %.2f)\n", - lvl, mean, stddev); + DEBUG(rand, "level: %f, lvl: %f (mean: %.2f, stddev: %.2f)\n", + level, lvl, mean, stddev); std::vector<PowerListItem>::iterator i = samples.begin(); while(i != samples.end()) { |