Index: trunk/BNC/bnccaster.cpp
===================================================================
--- trunk/BNC/bnccaster.cpp	(revision 2311)
+++ trunk/BNC/bnccaster.cpp	(revision 2312)
@@ -303,5 +303,5 @@
 // Dump Complete Epochs
 ////////////////////////////////////////////////////////////////////////////
-void bncCaster::dumpEpochs(long minTime, long maxTime) {
+void bncCaster::dumpEpochs(long minTimeXrate, long maxTimeXrate) {
 
   const char begEpoch[] = "BEGEPOCH";
@@ -311,8 +311,8 @@
   const int endEpochNBytes = sizeof(endEpoch) - 1;
 
-  for (long sec = minTime; sec <= maxTime; sec++) {
+  for (long secXrate = minTimeXrate; secXrate <= maxTimeXrate; ++secXrate) {
 
     bool first = true;
-    QList<p_obs> allObs = _epochs->values(sec);
+    QList<p_obs> allObs = _epochs->values(secXrate);
 
     QListIterator<p_obs> it(allObs);
@@ -320,5 +320,5 @@
       p_obs obs = it.next();
 
-      if (_samplingRate == 0 || sec % _samplingRate == 0) {
+      if (_samplingRate == 0 || (secXrate/_maxRate) % _samplingRate == 0) {
 
 	if (first) {
@@ -401,5 +401,5 @@
 
       delete obs;
-      _epochs->remove(sec);
+      _epochs->remove(secXrate);
       first = false;
     }
@@ -415,8 +415,6 @@
   // Reread several options
   // ----------------------
-  _maxRate = settings.value("maxRate").toInt();
-  if (_maxRate < 1) {
-    _maxRate = 1;
-  }
+  _maxRate = 20;
+
   _samplingRate  = settings.value("binSampl").toInt();
   _waitTimeXrate = settings.value("waitTime").toInt() * _maxRate; 
Index: trunk/BNC/bnccaster.h
===================================================================
--- trunk/BNC/bnccaster.h	(revision 2311)
+++ trunk/BNC/bnccaster.h	(revision 2312)
@@ -60,5 +60,5 @@
 
  private:
-   void dumpEpochs(long minTime, long maxTime);
+   void dumpEpochs(long minTimeXrate, long maxTimeXrate);
    static int myWrite(QTcpSocket* sock, const char* buf, int bufLen);
 
