Ejemplo n.º 1
0
        // Callback function that plots a data point for the current temperature, the goal temperature,
        // the heater steer value and the Pulse Width Modulated (PWM) value.
        private void OnPlotDataPoint(ReceivedCommand arguments)
        {
            var time = arguments.ReadBinFloatArg();
            var currTemp = arguments.ReadBinFloatArg();
            var goalTemp = arguments.ReadBinFloatArg();
            var heaterValue = arguments.ReadBinFloatArg();
            var heaterPwm = arguments.ReadBinBoolArg();

            _chartForm.UpdateGraph(time, currTemp, goalTemp, heaterValue, heaterPwm);
        }
        // Callback function that plots a data point for the current temperature, the goal temperature,
        // the heater steer value and the Pulse Width Modulated (PWM) value.
        private void OnPlotDataPoint(ReceivedCommand arguments)
        {   
            // Plot data if we are accepting data
            if (!AcceptData) return;

            // Get all arguments from plot data point command
            var time        = arguments.ReadBinFloatArg();
            time        = (TimeUtils.Millis-_startTime)/1000.0f;
            var currTemp    = arguments.ReadBinFloatArg();
            var goalTemp    = arguments.ReadBinFloatArg();
            var heaterValue = arguments.ReadBinFloatArg();
            var heaterPwm   = arguments.ReadBinBoolArg();

            // Update chart with new data point;
            _chartForm.UpdateGraph(time, currTemp, goalTemp, heaterValue, heaterPwm);
        }