Skip to content

Commit

Permalink
Corrected some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
grabinow2 committed May 13, 2020
1 parent 8b621c7 commit 6ca5eb7
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

/**
* This singleton class represents the main component of the library.
* It can be used to easily set a stable connection with an Arduino and to send data to it using the Serial Monitor.
* It can be used to easily set a stable connection with an Arduino and to send/receive data to/from it using the Serial Monitor.
*
* <p>The first thing you need is to create or get an instance of {@link Ardutooth} using something like
* {@code Ardutooth mArdutooth = Ardutooth.getInstance(this)} where parameter represents the instance of
Expand Down Expand Up @@ -70,7 +70,7 @@ public boolean isConnected() {
} catch (Exception e) {
Log.d(Ardutooth.TAG, "An error occurred while retrieving connection", e);
}
return mBtHandler.connected;
return BluetoothHandler.connected;
}

/**
Expand Down Expand Up @@ -213,11 +213,11 @@ public void sendBoolean(boolean value) {
}

/**
* Reads a single byte from the Arduino, casts it into a {@link char}, and returns it.
* Reads a single character, as defined by {@link BufferedReader}'s readLine method,
* from the Arduino, casts it into a {@link char}, and returns it.
*
* @return {@link char} value read
* @return char value read
*/
@RequiresApi(api = Build.VERSION_CODES.KITKAT)
public char receiveChar(){
char c = 0;
if (mBtHandler.getSocket() != null)
Expand All @@ -230,12 +230,11 @@ public char receiveChar(){
}

/**
* Reads from the Arduino until a return character ("\n") is read, and returns the full line.
* Reads a line, as defined by {@link BufferedReader}'s readLine method, from the Arduino.
*
* @return {@link String} line read
*/
@RequiresApi(api = Build.VERSION_CODES.KITKAT)
public String receiveLn(){
public String receiveLine(){
String result = "";
if (mBtHandler.getSocket() != null)
try {
Expand Down

0 comments on commit 6ca5eb7

Please sign in to comment.