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 autonomousRobotAndroid by
MicroBridge/androidADB.h@17:f0a973f17917, 2013-05-03 (annotated)
- Committer:
- chrigelburri
- Date:
- Fri May 03 06:30:46 2013 +0000
- Revision:
- 17:f0a973f17917
bastel mit adb
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
chrigelburri | 17:f0a973f17917 | 1 | //#ifndef _ANDROIDADB_H_ |
chrigelburri | 17:f0a973f17917 | 2 | //#define _ANDROIDADB_H_ |
chrigelburri | 17:f0a973f17917 | 3 | |
chrigelburri | 17:f0a973f17917 | 4 | //#include "mbed.h" |
chrigelburri | 17:f0a973f17917 | 5 | #include "Adb.h" |
chrigelburri | 17:f0a973f17917 | 6 | //#include "define.h" |
chrigelburri | 17:f0a973f17917 | 7 | |
chrigelburri | 17:f0a973f17917 | 8 | #include <string> |
chrigelburri | 17:f0a973f17917 | 9 | #include <sstream> |
chrigelburri | 17:f0a973f17917 | 10 | #include <vector> |
chrigelburri | 17:f0a973f17917 | 11 | #include <iostream> |
chrigelburri | 17:f0a973f17917 | 12 | #include <stdlib.h> |
chrigelburri | 17:f0a973f17917 | 13 | |
chrigelburri | 17:f0a973f17917 | 14 | Connection * connection; |
chrigelburri | 17:f0a973f17917 | 15 | |
chrigelburri | 17:f0a973f17917 | 16 | //Serial pc(USBTX, USBRX); |
chrigelburri | 17:f0a973f17917 | 17 | |
chrigelburri | 17:f0a973f17917 | 18 | |
chrigelburri | 17:f0a973f17917 | 19 | /** @brief Desired position in meters for x-coordinate, given by android */ |
chrigelburri | 17:f0a973f17917 | 20 | float androidx; |
chrigelburri | 17:f0a973f17917 | 21 | |
chrigelburri | 17:f0a973f17917 | 22 | /** @brief Desired position in meters for y-coordinate, given by android */ |
chrigelburri | 17:f0a973f17917 | 23 | float androidy; |
chrigelburri | 17:f0a973f17917 | 24 | |
chrigelburri | 17:f0a973f17917 | 25 | /** @brief Desired position in degrees for theta, given by android */ |
chrigelburri | 17:f0a973f17917 | 26 | float androidtheta; |
chrigelburri | 17:f0a973f17917 | 27 | |
chrigelburri | 17:f0a973f17917 | 28 | /** @brief Indicates if a ADB connection to a android phone is established */ |
chrigelburri | 17:f0a973f17917 | 29 | boolean androidConnected = false; |
chrigelburri | 17:f0a973f17917 | 30 | |
chrigelburri | 17:f0a973f17917 | 31 | /** |
chrigelburri | 17:f0a973f17917 | 32 | * @brief Takes an string, a vector of strings for the delimited tokens, and a with the |
chrigelburri | 17:f0a973f17917 | 33 | * @param str |
chrigelburri | 17:f0a973f17917 | 34 | * @param tokens |
chrigelburri | 17:f0a973f17917 | 35 | * @param delimiters |
chrigelburri | 17:f0a973f17917 | 36 | */ |
chrigelburri | 17:f0a973f17917 | 37 | void Tokenize(const string& str, |
chrigelburri | 17:f0a973f17917 | 38 | vector<string>& tokens, |
chrigelburri | 17:f0a973f17917 | 39 | const string& delimiters = " "); |
chrigelburri | 17:f0a973f17917 | 40 | |
chrigelburri | 17:f0a973f17917 | 41 | void parseMessage(uint16_t length, uint8_t * data); |
chrigelburri | 17:f0a973f17917 | 42 | |
chrigelburri | 17:f0a973f17917 | 43 | void connect(); |
chrigelburri | 17:f0a973f17917 | 44 | |
chrigelburri | 17:f0a973f17917 | 45 | void init(); |
chrigelburri | 17:f0a973f17917 | 46 | |
chrigelburri | 17:f0a973f17917 | 47 | //#endif |