internal SensorReadings GetSensorReadings() { if (!hasInit) { Initialize(); } SensorReadings sensorReadings = new SensorReadings(); var command = new Command(CommandType.DirecCommand, CommandByte.GetInputValues, true); command.Append((byte)port); var reply = connection.SendAndReceive(command); Error.CheckForError(reply, 16); sensorReadings.Raw = reply.GetUInt16(8); sensorReadings.Normalized = reply.GetUInt16(10); sensorReadings.Scaled = reply.GetInt16(12); return(sensorReadings); }
internal SensorReadings GetSensorReadings() { if (!hasInit) { Initialize(); } SensorReadings sensorReadings = new SensorReadings(); var command = new Command(CommandType.DirecCommand,CommandByte.GetInputValues, true); command.Append((byte) port); var reply = connection.SendAndReceive(command); Error.CheckForError(reply, 16); sensorReadings.Raw = reply.GetUInt16(8); sensorReadings.Normalized = reply.GetUInt16(10); sensorReadings.Scaled = reply.GetInt16(12); return sensorReadings; }