Changeset 27 for trunk/Form


Ignore:
Timestamp:
Apr 6, 2016, 7:45:46 AM (9 years ago)
Author:
chronos
Message:
  • Modified: Improved average value in speed measurement.
  • Added: Show Min and Max values with different colors in speed chart.
Location:
trunk/Form
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Form/UFormMain.lfm

    r25 r27  
    397397        Align = alClient
    398398        BorderSpacing.Around = 4
    399         object ChartSpeedLineSeries1: TLineSeries
    400           LinePen.Color = clWhite
     399        object ChartSpeedLineSeriesAvg: TLineSeries
     400          LinePen.Color = clGreen
     401        end
     402        object ChartSpeedLineSeriesMin: TLineSeries
     403          LinePen.Color = clBlue
     404        end
     405        object ChartSpeedLineSeriesMax: TLineSeries
     406          LinePen.Color = clRed
    401407        end
    402408      end
  • trunk/Form/UFormMain.pas

    r26 r27  
    3939    ButtonScan2: TButton;
    4040    ChartSpeed: TChart;
    41     ChartSpeedLineSeries1: TLineSeries;
     41    ChartSpeedLineSeriesAvg: TLineSeries;
     42    ChartSpeedLineSeriesMin: TLineSeries;
     43    ChartSpeedLineSeriesMax: TLineSeries;
    4244    ComboBoxDrive: TComboBox;
    4345    Image1: TImage;
     
    540542    ChartSpeed.BottomAxis.Range.UseMax := True;
    541543    ChartSpeed.BottomAxis.Range.Max := Length(SpeedSteps);
    542     ChartSpeedLineSeries1.Clear;
     544    ChartSpeedLineSeriesAvg.Clear;
     545    ChartSpeedLineSeriesMin.Clear;
     546    ChartSpeedLineSeriesMax.Clear;
    543547    for I := 0 to Length(SpeedSteps) - 1 do
    544     if not SpeedSteps[I].Null then
    545       ChartSpeedLineSeries1.AddXY(I, SpeedSteps[I].Average / (1024 * 1024));
     548    if not SpeedSteps[I].Null then begin
     549      ChartSpeedLineSeriesAvg.AddXY(I, SpeedSteps[I].Average / (1024 * 1024));
     550      ChartSpeedLineSeriesMin.AddXY(I, SpeedSteps[I].Min / (1024 * 1024));
     551      ChartSpeedLineSeriesMax.AddXY(I, SpeedSteps[I].Max / (1024 * 1024));
     552    end;
    546553  end;
    547554end;
Note: See TracChangeset for help on using the changeset viewer.