示例#1
0
        public virtual void ResetDeviceViaPin()
        {
            // Close the connection to the device
            DisconnectDevice();

            // Set the reset trigger pin LOW (false) to begin a reset
            SimulatorClient.DigitalWrite(ResetTriggerPin, false);

            // Give the pin some time at LOW to ensure reset
            Thread.Sleep(10);

            // Cancel the reset
            SimulatorClient.PinMode(ResetTriggerPin, PinMode.INPUT_PULLUP);

            // Re-open the connection to the device
            ConnectDevice();

            // Ensure the irrigator restarted
            WaitForText(IrrigatorStartText);
        }
示例#2
0
 public void EnsureSimulatorIsNotResettingDevice()
 {
     // Set the reset trigger pin to INPUT_PULLUP mode to avoid resetting the device
     SimulatorClient.PinMode(ResetTriggerPin, PinMode.INPUT_PULLUP);
 }