# HG changeset patch # User Daniele Nicolodi # Date 1397472323 -7200 # Node ID 920ff733b43b2b1b9afcb6b7f94655554ce046fe # Parent fcc988c6f8414c2ec348849b5396e57ef762a19c Fix Allan deviation plot diff -r fcc988c6f841 -r 920ff733b43b Allan.c --- a/Allan.c Mon Apr 14 12:43:25 2014 +0200 +++ b/Allan.c Mon Apr 14 12:45:23 2014 +0200 @@ -124,7 +124,7 @@ PlotXY(Instance->AllanPanel, ALLANPANEL_ALLANPLOT, x, y, ALLAN_NUM_DATAPOINTS, VAL_DOUBLE, VAL_DOUBLE, VAL_SCATTER, VAL_SOLID_SQUARE, VAL_SOLID, 1, DATAPOINT_COLOR); - for (i = 0; i < ALLAN_NUM_DATAPOINTS; i++) { + for (i = 0; (i < ALLAN_NUM_DATAPOINTS) & (Instance->BlocksNumber[i] > 0); i++) { error = 1 / sqrt(Instance->BlocksNumber[i]); PlotLine(Instance->AllanPanel, ALLANPANEL_ALLANPLOT, x[i], y[i] * (1 - error), x[i], y[i] * (1 + error), ERRORBAR_COLOR);