Esempio n. 1
0
 public void SetAnalogMode(AnalogMode mode, SensorPort port)
 {
     byte [] modes = new byte[SensorManager.NumberOfSensorPorts];
     for (int i = 0; i < modes.Length; i++)
     {
         modes[i] = (byte)AnalogMode.None;
     }
     modes[(int)port] = (byte)mode;
     DeviceManager.Write(modes);
 }
 public override void readAnalogInput(byte pin, AnalogMode mode)
 {
     readRegister(mode.register, pin);
 }
Esempio n. 3
0
 public static ErrorCode SetAnalogMode(void *handle, AnalogMode mode)
 {
     return(driver.c_SparkMax_SetAnalogMode(handle, mode));
 }
Esempio n. 4
0
		protected void SetMode(AnalogMode mode)
	    {
	        this.AnalogMode = mode;
	        SensorManager.Instance.SetAnalogMode(mode,port);
	    }
Esempio n. 5
0
 /**
  * Read the value of an analog pin.
  * When the data is ready, GPIO.receivedAnalogInputAsAbsValue will be called if the analog mode
  * is set to ABSOLUTE_VALUE.  If mode is set to SUPPLY_RATIO, GPIO.receivedAnalogInputAsSupplyRatio
  * will be called instead
  * @param pin Pin to read
  * @param mode Read mode on the pin
  * @see Callbacks#receivedAnalogInputAsAbsValue(short)
  * @see Callbacks#receivedAnalogInputAsSupplyRatio(short)
  */
 public abstract void readAnalogInput(byte pin, AnalogMode mode);
Esempio n. 6
0
 protected void SetMode(AnalogMode mode)
 {
     this.AnalogMode = mode;
     SensorManager.Instance.SetAnalogMode(mode, port);
 }
Esempio n. 7
0
	    public void SetAnalogMode(AnalogMode mode, SensorPort port)
	    {
	        byte [] modes = new byte[SensorManager.NumberOfSensorPorts];
	        for(int i = 0; i < modes.Length; i++)
	            modes[i] = (byte)AnalogMode.None;
	        modes[(int)port] = (byte)mode;
	        DeviceManager.Write(modes);
	    }