Code example for DataOutputStream

Methods: flushwriteBytewriteFloat

0
	} 
	 
	public void steer(float turnRate) {
		Log.i(TAG, "Steer called: " + turnRate);
		try { 
			mOs.writeByte(COMMAND_STEER);
			mOs.writeFloat(turnRate);
			mOs.flush();
		} catch (Exception e) {
			Log.e(TAG, "Could not send commands (" + e.getMessage() + ")");
		} 
	} 
} 
Experience pair programming with AI  Get Codota for Java