Skip to content
This repository has been archived by the owner on Aug 21, 2021. It is now read-only.

Some changes for readability #18

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Assets/WRMHL/Scripts/wrmhlRead.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

/*
This script is used to read all the data coming from the device. For instance,
If arduino send ->
If arduino sends ->
{"1",
"2",
"3",}
Expand All @@ -13,7 +13,7 @@ If arduino send ->
"2", for the second call
"3", for the thirst call

This is the perfect script for integration that need to avoid data loose.
This is the perfect script for integrations that need to avoid data loss.
If you need speed and low latency take a look to wrmhlReadLatest.
*/

Expand All @@ -35,17 +35,17 @@ public class wrmhlRead : MonoBehaviour {
public int QueueLenght = 1;

void Start () {
myDevice.set (portName, baudRate, ReadTimeout, QueueLenght); // This method set the communication with the following vars;
// Serial Port, Baud Rates, Read Timeout and QueueLenght.
myDevice.set (portName, baudRate, ReadTimeout, QueueLenght); // This method set the communication with the following vars:
// Serial Port, Baud Rates, Read Timeout and QueueLenght.
myDevice.connect (); // This method open the Serial communication with the vars previously given.
}

// Update is called once per frame
void Update () {
print (myDevice.readQueue () ); // myDevice.read() return the data coming from the device using thread.
print (myDevice.readQueue () ); // myDevice.read() returns the data coming from the device using thread.
}

void OnApplicationQuit() { // close the Thread and Serial Port
void OnApplicationQuit() { // closes the Thread and Serial Port
myDevice.close();
}
}
4 changes: 2 additions & 2 deletions Assets/WRMHL/Scripts/wrmhlWrite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ public class wrmhlWrite : MonoBehaviour {
public int QueueLenght = 1;

void Start () {
myDevice.set (portName, baudRate, ReadTimeout, QueueLenght); // This method set the communication with the following vars;
// Serial Port, Baud Rates, Read Timeout and QueueLenght.
myDevice.set (portName, baudRate, ReadTimeout, QueueLenght); // This method set the communication with the following vars:
// Serial Port, Baud Rates, Read Timeout and QueueLenght.
myDevice.connect (); // This method open the Serial communication with the vars previously given.
}

Expand Down