From 69e16f11a67903929a1f47d514c35cf519613fc8 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Mon, 12 Sep 2011 15:14:14 +1000 Subject: [PATCH] PB % Calculation fix --- SleepLib/day.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SleepLib/day.cpp b/SleepLib/day.cpp index a845122e..adcc42d1 100644 --- a/SleepLib/day.cpp +++ b/SleepLib/day.cpp @@ -315,8 +315,8 @@ EventDataType Day::sph(ChannelID code) EventDataType sum=0; EventDataType h=0; for (int i=0;im_sph.contains(code)) continue; - sum+=sessions[i]->sph(code)*sessions[i]->hours(); + if (!sessions[i]->m_sum.contains(code)) continue; + sum+=sessions[i]->sum(code)/3600.0;//*sessions[i]->hours(); //h+=sessions[i]->hours(); } h=hours();