private void SendToBluetooth(ConnectThread thread, int cmd) { if (thread != null) { thread.write(cmd); } }