nxtlib/src/Protocol.cs
/// <summary>
/// [Native] Set a sensor's state.  This is REQUIRED
///  to read realistic values through GetSensorValues().
/// </summary>
/// <param name="port">The port of the attached sensor.</param>
/// <param name="type">The type of the attached sensor.</param>
/// <param name="mode">The mode of the attached sensor.</param>
[Native] Set a sensor's state.  This is REQUIRED
to read realistic values through GetSensorValues().
[ Native ] Set a sensor ' s state . This is REQUIRED to read realistic values through GetSensorValues () .
public void SetSensorMode(SensorPort port,
            SensorType type, SensorMode mode)
        {
            byte[] request = new byte[] {
            (byte) (0x00),
            (byte) (DirectCommand.SetInputMode),
            (byte) port,
            (byte) type,
            (byte) mode
            };
            CompleteRequest(request);
            return;
        }
public void SetSensorMode ( SensorPort port , SensorType type , SensorMode mode ) { byte [ ] request = new byte [ ] { ( byte ) ( 0x00 ) , ( byte ) ( DirectCommand . SetInputMode ) , ( byte ) port , ( byte ) type , ( byte ) mode } ; CompleteRequest ( request ) ; return ; }
[Native] Set a sensor's state.
[ Native ] Set a sensor ' s state .
port
SensorPort
The port of the attached sensor.
The port of the attached sensor .
type
SensorType
The type of the attached sensor.
The type of the attached sensor .
mode
SensorMode
The mode of the attached sensor.
The mode of the attached sensor .