 	}
 	
 	func FlashErase(Enable:Bool) {
+		if (isDeviceReady() == false) {
+			return
+		}
+		
 		var pkbuf = [UInt8](count:20, repeatedValue:0)
 		
 		pkbuf[0] = 0x41

	}
	
	func FlashRecord(Enable:Bool) {
		var pkbuf = [UInt8](count:20, repeatedValue:0)
		
		pkbuf[0] = 0x41

	
	func MagStream(Enable:Bool)
	{
		if (isDeviceReady() == false) {
			return
		}
		
		var pkbuf = [UInt8](count:20, repeatedValue:0)
		
		pkbuf[0] = 0x41
