statistics bug fix: divide by number of motes + show time ruler at zoom in/out

This commit is contained in:
fros4943 2009-12-07 11:14:02 +00:00
parent c1520a7134
commit be1c818938

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: TimeLine.java,v 1.18 2009/12/07 11:04:15 fros4943 Exp $
* $Id: TimeLine.java,v 1.19 2009/12/07 11:14:02 fros4943 Exp $
*/
package se.sics.cooja.plugins;
@ -340,6 +340,11 @@ public class TimeLine extends VisPlugin {
w, 1
);
timeline.scrollRectToVisible(r);
/* Time ruler */
mousePixelPositionX = centerPixel;
mouseDownPixelPositionX = centerPixel;
mousePixelPositionY = timeline.getHeight();
}
});
}
@ -371,6 +376,12 @@ public class TimeLine extends VisPlugin {
centerPixel - w/2, 0,
w, 1
);
/* Time ruler */
mousePixelPositionX = centerPixel;
mouseDownPixelPositionX = centerPixel;
mousePixelPositionY = timeline.getHeight();
timeline.scrollRectToVisible(r);
}
});
@ -577,7 +588,15 @@ public class TimeLine extends VisPlugin {
all.onTimeTX += stats.onTimeTX;
all.onTimeInterfered += stats.onTimeInterfered;
}
logger.info("SUMMARY");
all.onTimeBlueLED /= allStats.size();
all.onTimeGreenLED /= allStats.size();
all.onTimeBlueLED /= allStats.size();
all.radioOn /= allStats.size();
all.onTimeRX /= allStats.size();
all.onTimeTX /= allStats.size();
all.onTimeInterfered /= allStats.size();
logger.info("SIMULATION AVERAGE:");
logger.info(all.toString());
}
};