summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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()) {