// 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(); // do not log data if times are out of sync //if (time<_startTime) return; // Update chart with new data point; _chartForm.UpdateGraph(time, currTemp, goalTemp, heaterValue, heaterPwm); // Update _startTime in case it needs to be resend after disconnection //_startTime = time; }
// 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); }
private void OnChannelFounded(ReceivedCommand arguments) { ChannelSearchCompleted = arguments.ReadBinBoolArg(); if (ChannelSearchCompleted) { return; } var channel = new Channels { Id = arguments.ReadBinUInt16Arg(), Channel = Channels.Count + 1, Gain = 1 }; Channels.Add(channel); }
// 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); }