Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of autonomous Robot Android by
androidADB.h File Reference
This File is for the connection to te self written java android app. The connection works with the ADB class from rom Junichi Katsu. For more information see here: http://mbed.org/users/jksoft/code/MicroBridge/ More...
Go to the source code of this file.
| Functions | |
| void | Tokenize (const string &str, vector< string > &tokens, const string &delimiters=" ") | 
| Takes an string, a vector of strings for the delimited tokens. | |
| void | parseMessage (uint16_t length, uint8_t *data) | 
| Parse the Message, split and save it to the Attributes. | |
| void | connect () | 
| Connecting to android. | |
| float | getDesiredTheta () | 
| Gets the desired  value. | |
| float | getDesiredX () | 
| Gets the desired X-postition. | |
| float | getDesiredY () | 
| Gets the desired Y-postition. | |
| void | setDesiredTheta (float t) | 
| Sets the desired  value. | |
| void | init () | 
| Initialise the ADB subsystem. | |
| void | writeActualPosition (float x, float y, float t, int state_u, int state_l, int state_r, float volt_b) | 
| Write the Parameterlist to the android smartphone. | |
Detailed Description
This File is for the connection to te self written java android app. The connection works with the ADB class from rom Junichi Katsu. For more information see here: http://mbed.org/users/jksoft/code/MicroBridge/
Copyright (c) 2013 HSLU Pren Team #1 Cruising Crêpe All rights reserved.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file androidADB.h.
Function Documentation
| void connect | ( | ) | 
Connecting to android.
Definition at line 96 of file androidADB.cpp.
| float getDesiredTheta | ( | ) | 
Gets the desired value.
- Returns:
- the desired , given in [°]
Definition at line 27 of file androidADB.cpp.
| float getDesiredX | ( | ) | 
Gets the desired X-postition.
- Returns:
- the desired X-postition, given in [m]
Definition at line 17 of file androidADB.cpp.
| float getDesiredY | ( | ) | 
Gets the desired Y-postition.
- Returns:
- the desired Y-postition, given in [m]
Definition at line 22 of file androidADB.cpp.
| void init | ( | ) | 
Initialise the ADB subsystem.
Open an ADB stream on tcp port 4568.
Definition at line 103 of file androidADB.cpp.
| void parseMessage | ( | uint16_t | length, | 
| uint8_t * | data | ||
| ) | 
Parse the Message, split and save it to the Attributes.
- Parameters:
- 
  length length of the data data Data to parse 
Definition at line 71 of file androidADB.cpp.
| void setDesiredTheta | ( | float | t ) | 
Sets the desired value.
- Parameters:
- 
  t desired value, given in [°] 
Definition at line 32 of file androidADB.cpp.
| void Tokenize | ( | const string & | str, | 
| vector< string > & | tokens, | ||
| const string & | delimiters = " " | ||
| ) | 
Takes an string, a vector of strings for the delimited tokens.
Tokens is the array to separated with the delimiters.
- Parameters:
- 
  str to tokens is the vecotr array delimiters of the string 
Definition at line 37 of file androidADB.cpp.
| void writeActualPosition | ( | float | x, | 
| float | y, | ||
| float | t, | ||
| int | state_u, | ||
| int | state_l, | ||
| int | state_r, | ||
| float | volt_b | ||
| ) | 
Write the Parameterlist to the android smartphone.
- Parameters:
- 
  x Acutal X-Position y Acutal Y-Position t Acutal -Position state_u Actual State Undervoltage state_l Actual Left State state_r Actual Right State volt_b Actual battery voltage 
Definition at line 120 of file androidADB.cpp.
Generated on Tue Jul 12 2022 14:15:59 by
 1.7.2
 1.7.2 
    