summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2014-04-25 18:39:25 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2014-04-25 18:39:25 +0200
commit313ded275104952e930d5b11fc5382ccee731b2b (patch)
tree20516f7ddb5783b97317e2364b1509090b7b4abf /src
parentf40d8ff14a4e51ecc255800c24ce4be291e05eca (diff)
Fix velocity bug.
Diffstat (limited to 'src')
-rw-r--r--src/powerlist.cc10
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()) {