FizVizController/FizVizController/AnalyticsFizVizInterface.cs
/// <summary>
/// Do a simple conversion of current metric value to needle position, and update the FizViz accordingly
/// </summary>
/// <param name="value"></param>
Do a simple conversion of current metric value to needle position, and update the FizViz accordingly
Do a simple conversion of current metric value to needle position and update the FizViz accordingly
private void SimplePosition(float value)
        {
            value = Math.Max(value, MetricMinimum);
            value = Math.Min(value, MetricMaximum);
            uint needlePosition = (uint) ((((value - MetricMinimum) / (MetricMaximum - MetricMinimum)) * (displayPositionMaximum - displayPositionMinimum)) + displayPositionMinimum);
            FizVizCommand positionCommand = new NeedlePosition
            {
                Direction = NeedlePosition.NeedleDirectionValue.DoNotPassZero,
                Position = needlePosition
            };
            Debug.WriteLine("Set position to " + needlePosition);
            if (App.FizViz != null)
            {
                App.FizViz.SendCommand(positionCommand);
            }
        }
private void SimplePosition ( float value ) { value = Math . Max ( value , MetricMinimum ) ; value = Math . Min ( value , MetricMaximum ) ; uint needlePosition = ( uint ) ( ( ( ( value - MetricMinimum ) / ( MetricMaximum - MetricMinimum ) ) * ( displayPositionMaximum - displayPositionMinimum ) ) + displayPositionMinimum ) ; FizVizCommand positionCommand = new NeedlePosition { Direction = NeedlePosition . NeedleDirectionValue . DoNotPassZero , Position = needlePosition } ; Debug . WriteLine ( " " + needlePosition ) ; if ( App . FizViz != null ) { App . FizViz . SendCommand ( positionCommand ) ; } }
Do a simple conversion of current metric value to needle position, and update the FizViz accordingly
Do a simple conversion of current metric value to needle position and update the FizViz accordingly
value
float
None