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
MicroBridge/androidADB.h
- Committer:
- chrigelburri
- Date:
- 2013-05-20
- Revision:
- 28:b3e195e80439
- Parent:
- 21:48248c5b8992
- Child:
- 32:767044a3e421
File content as of revision 28:b3e195e80439:
#ifndef _ANDROIDADB_H_
#define _ANDROIDADB_H_
#include "mbed.h"
#include "Adb.h"
#include "defines.h"
#include "RobotControl.h"
#include <string>
#include <sstream>
#include <vector>
#include <iostream>
#include <stdlib.h>
/**
* @brief Takes an string, a vector of strings for the delimited tokens, and a with the
* @param str
* @param tokens
* @param delimiters
*/
void Tokenize(const string& str,
vector<string>& tokens,
const string& delimiters = " ");
/**
* @brief @todo
* @param length
* @param data
*/
void parseMessage(uint16_t length, uint8_t * data);
/**
* @brief @todo
* Connecting to android.
*/
void connect();
/**
* @brief Gets the desired θ value.
* @return the desired θ, given in [°] GRad oder rad??????????????????
*/
float getDesiredTheta();
/**
* @brief Gets the desired X-postition.
* @return the desired X-postition, given in [m]
*/
float getDesiredX();
/**
* @brief Gets the desired Y-postition.
* @return the desired Y-postition, given in [m]
*/
float getDesiredY();
/**
* @brief Sets the desired θ value.
* @param t desired θ value, given in [°]
*/
void setDesiredTheta(float t);
/**
* @brief Initialise the ADB subsystem. Open an ADB stream on tcp port 4568.
*/
void init();
/**
* @brief @todo
* @param str
*/
void write2Android(char str [32]);
/**
* @brief Write the Parameterlist to the android smartphone.
* @param x
* @param y
* @param t
* @param state_u
* @param state_r
* @param volt_b
*/
void writeActualPosition(float x, float y, float t, int state_u, int state_l, int state_r, float volt_b);
#endif
