/// <summary>
        /// Returns copy of SingleTact object
        /// </summary>
        public SingleTact Clone()
        {
            SingleTact clone = new SingleTact();

            clone.arduino_     = this.arduino_;
            clone.lastFrame_   = this.lastFrame_;
            clone.isFirst      = this.isFirst;
            clone.startTime    = this.startTime;
            clone.i2cAddress_  = this.i2cAddress_;
            clone.itr_         = this.itr_;
            clone.isConnected  = this.isConnected;
            clone.isCalibrated = this.isCalibrated;
            return(clone);
        }
Exemple #2
0
 public bool Initialise(string portName)
 {
     try
     {
         _frameList  = new List <SingleTactFrame>();
         _singleTact = new SingleTact();
         _arduino    = new ArduinoSingleTactDriver();
         _arduino.Initialise(portName); //Start Arduino driver
         _singleTact.Initialise(_arduino);
         _singleTact.I2cAddressForCommunications = ((byte)(4));
         isCalibrated = _singleTact.isCalibrated;
         return(true);
     }
     catch
     {
         return(false);
     }
 }