示例#1
0
        internal bool ReadCMOSRegisters(ref BCamProperties camProperties, int maxCameraHeightSize)
        {
            if (!this.SendRegisters())
            {
                return(false);
            }
            this.camRegisters.registers[128] = (byte)2;
            if (!this.SendRegisters())
            {
                return(false);
            }
            this.camRegisters.registerTemp = Enumerable.Repeat <byte>((byte)0, 256).ToArray <byte>();
            Thread.Sleep(100);
            int len = ((IEnumerable <byte>) this.camRegisters.registerTemp).Count <byte>();

            if (!this.InEndpt.XferData(ref this.camRegisters.registerTemp, ref len))
            {
                return(false);
            }
            camProperties.sensor4M           = this.camRegisters.registerTemp[125] > (byte)60;
            this.cameraBufferHeight          = maxCameraHeightSize;
            this.camRegisters.registers[128] = (byte)0;
            return(true);
        }
示例#2
0
文件: BCam.cs 项目: Odin08/NOWS-Odin
 internal BCam(CyFX3Device cyFX3Device)
 {
     this.camProperties = new BCamProperties();
     this.camSettings   = new BCamSettings();
     this.camComLayer   = new BCamComLayer(cyFX3Device, this.camProperties.sensor4M);
 }