Code example for BlockingQueue

Methods: offer

0
	} 
	 
	public void setDrivePower(int power) {
		if (power < -255) power = -255;
		else if (power > 255) power = 255;
		queue.offer("$J " + power + "\r");
	} 
	 
	public void run() { 
		try { 
			while (!die) {
				try { 
					BluetoothSocket bts = btd.createRfcommSocketToServiceRecord(
							UUID.fromString("00001101-0000-1000-8000-00805F9B34FB"));
							//UUID.fromString("94f39d29-7d6d-437d-973b-fba39e49d4ee")); 
					try { 
						bts.connect();
						OutputStream out = bts.getOutputStream();
						try { 
							Log.d("andropilot", "connected");
Contextual code suggestions in your IDE  Get Codota for Java