Index: /trunk/FACT++/gui/FactGui.h
===================================================================
--- /trunk/FACT++/gui/FactGui.h	(revision 16691)
+++ /trunk/FACT++/gui/FactGui.h	(revision 16692)
@@ -811,17 +811,35 @@
         }
 
-        if (!CheckSize(d, 82*sizeof(float)))
-            return;
-
-        const float *ptr = d.ptr<float>();
+        if (!CheckSize(d, sizeof(uint16_t)+40*sizeof(float)))
+            return;
+
+        const float *ptr = d.ptr<float>(2);
 
         fFadTempMin->setEnabled(true);
         fFadTempMax->setEnabled(true);
 
-        fFadTempMin->setValue(ptr[0]);
-        fFadTempMax->setValue(ptr[41]);
-
-        handleFadToolTip(d.time, fFadTempMin, ptr+1);
-        handleFadToolTip(d.time, fFadTempMax, ptr+42);
+        float min =  FLT_MAX;
+        float max = -FLT_MAX;
+
+        vector<float> mn(40,  FLT_MAX);
+        vector<float> mx(40, -FLT_MAX);
+        for (int i=0; i<160; i++)
+        {
+            if (ptr[i]<min)
+                min = ptr[i];
+            if (ptr[i]>max)
+                max = ptr[i];
+
+            if (ptr[i]<mn[i/4])
+                mn[i/4] = ptr[i];
+            if (ptr[i]>mx[i/4])
+                mx[i/4] = ptr[i];
+        }
+
+        fFadTempMin->setValue(min);
+        fFadTempMax->setValue(max);
+
+        handleFadToolTip(d.time, fFadTempMin, mn.data());
+        handleFadToolTip(d.time, fFadTempMax, mx.data());
     }
 
@@ -836,16 +854,26 @@
         }
 
-        if (!CheckSize(d, 42*sizeof(uint32_t)))
-            return;
-
-        const uint32_t *ptr = d.ptr<uint32_t>();
+        if (!CheckSize(d, sizeof(uint16_t)+160*sizeof(float)))
+            return;
+
+        const float *ptr = d.ptr<float>(2);
 
         fFadRefClockMin->setEnabled(true);
         fFadRefClockMax->setEnabled(true);
 
-        fFadRefClockMin->setValue(ptr[40]*2.048);
-        fFadRefClockMax->setValue(ptr[41]*2.048);
-
-        const int64_t diff = int64_t(ptr[41]) - int64_t(ptr[40]);
+        float min =  FLT_MAX;
+        float max = -FLT_MAX;
+        for (int i=0; i<40; i++)
+        {
+            if (ptr[i]<min)
+                min = ptr[i];
+            if (ptr[i]>max)
+                max = ptr[i];
+        }
+
+        fFadRefClockMin->setValue(min);
+        fFadRefClockMax->setValue(max);
+
+        const int64_t diff = int64_t(max) - int64_t(min);
 
         SetLedColor(fFadLedRefClock, abs(diff)>3?kLedRed:kLedGreen, d.time);
