Example #1
0
        bool _Ready;                    // Drive is ready for operation

        protected void set_error(ErrorCode1541 error)
        {
            if (error_ptr_buf != null)
            {
                error_ptr_buf.Dispose();
            }

            unsafe
            {
                error_ptr_buf = Errors_1541[(int)error];
                error_ptr     = error_ptr_buf;
                error_len     = Errors_1541[(int)error].Length;
            }

            // Set drive condition
            if (error != ErrorCode1541.ERR_OK)
            {
                if (error == ErrorCode1541.ERR_STARTUP)
                {
                    LED = DriveLEDState.DRVLED_OFF;
                }
                else
                {
                    LED = DriveLEDState.DRVLED_ERROR;
                }
            }
            else if (LED == DriveLEDState.DRVLED_ERROR)
            {
                LED = DriveLEDState.DRVLED_OFF;
            }

            the_iec.UpdateLEDs();
        }
Example #2
0
        protected void set_error(ErrorCode1541 error)
        {
            if (error_ptr_buf != null)
            {
                error_ptr_buf.Dispose();
            }

            unsafe
            {
                error_ptr_buf = Errors_1541[(int)error];
                error_ptr = error_ptr_buf;
                error_len = Errors_1541[(int)error].Length;
            }

            // Set drive condition
            if (error != ErrorCode1541.ERR_OK)
                if (error == ErrorCode1541.ERR_STARTUP)
                    LED = DriveLEDState.DRVLED_OFF;
                else
                    LED = DriveLEDState.DRVLED_ERROR;
            else if (LED == DriveLEDState.DRVLED_ERROR)
                LED = DriveLEDState.DRVLED_OFF;

            the_iec.UpdateLEDs();
        }
Example #3
0
        protected void set_error(ErrorCode1541 error)
        {
            _errors1541.CurrentItemIndex = (int)error;

            #region Old Code
            //if (error_ptr_buf != null)
            //{
            //    error_ptr_buf.Dispose();
            //}

            //unsafe
            //{
            //    error_ptr_buf = Errors_1541[(int)error];
            //    error_ptr = error_ptr_buf;
            //    error_len = Errors_1541[(int)error].Length;
            //}

            #endregion

            // Set drive condition
            if (error != ErrorCode1541.ERR_OK)
                if (error == ErrorCode1541.ERR_STARTUP)
                    LED = DriveLEDState.LedOff;
                else
                    LED = DriveLEDState.LedError;
            else if (LED == DriveLEDState.LedError)
                LED = DriveLEDState.LedOff;

            the_iec.UpdateLEDs();
        }