This program is for an autonomous robot for the competition at the Hochschule Luzern. We are one of the 32 teams. <a href="http://cruisingcrepe.wordpress.com/">http://cruisingcrepe.wordpress.com/</a> The postition control is based on this Documentation: Control of Wheeled Mobile Robots: An Experimental Overview from Alessandro De Luca, Giuseppe Oriolo, Marilena Vendittelli. For more information see here: <a href="http://www.dis.uniroma1.it/~labrob/pub/papers/Ramsete01.pdf">http://www.dis.uniroma1.it/~labrob/pub/papers/Ramsete01.pdf</a>

Dependencies:   mbed

Fork of autonomousRobotAndroid by Christian Burri

Committer:
chrigelburri
Date:
Fri May 03 08:35:29 2013 +0000
Revision:
18:306d362d692b
androidADB successfully linking

Who changed what in which revision?

UserRevisionLine numberNew contents of line
chrigelburri 18:306d362d692b 1
chrigelburri 18:306d362d692b 2
chrigelburri 18:306d362d692b 3 /** @file PacketBuffer.h
chrigelburri 18:306d362d692b 4 * @brief Packet Buffer
chrigelburri 18:306d362d692b 5 */
chrigelburri 18:306d362d692b 6
chrigelburri 18:306d362d692b 7 #ifndef PacketBuffer_H
chrigelburri 18:306d362d692b 8 #define PacketBuffer_H
chrigelburri 18:306d362d692b 9
chrigelburri 18:306d362d692b 10 #include "mbed.h"
chrigelburri 18:306d362d692b 11
chrigelburri 18:306d362d692b 12 typedef struct
chrigelburri 18:306d362d692b 13 {
chrigelburri 18:306d362d692b 14 char *buf;
chrigelburri 18:306d362d692b 15 int size;
chrigelburri 18:306d362d692b 16 } PacketBufInf;
chrigelburri 18:306d362d692b 17
chrigelburri 18:306d362d692b 18 class PacketBuffer {
chrigelburri 18:306d362d692b 19 public:
chrigelburri 18:306d362d692b 20 /** init Stack class
chrigelburri 18:306d362d692b 21 * @param num buffering packet num
chrigelburri 18:306d362d692b 22 * @param packet_size size of packet(max size)
chrigelburri 18:306d362d692b 23 */
chrigelburri 18:306d362d692b 24 PacketBuffer(int num,int packet_size);
chrigelburri 18:306d362d692b 25 ~PacketBuffer();
chrigelburri 18:306d362d692b 26
chrigelburri 18:306d362d692b 27 /** put to Packet buffer
chrigelburri 18:306d362d692b 28 * @param packet packet data
chrigelburri 18:306d362d692b 29 * @param len packet length
chrigelburri 18:306d362d692b 30 * @return put length
chrigelburri 18:306d362d692b 31 */
chrigelburri 18:306d362d692b 32 int PutPacket(char *packet, int len);
chrigelburri 18:306d362d692b 33
chrigelburri 18:306d362d692b 34 /** get from ring buffer
chrigelburri 18:306d362d692b 35 * @param packet packet data
chrigelburri 18:306d362d692b 36 * @return get length
chrigelburri 18:306d362d692b 37 */
chrigelburri 18:306d362d692b 38 int GetPacket(char *packet);
chrigelburri 18:306d362d692b 39
chrigelburri 18:306d362d692b 40 void clear();
chrigelburri 18:306d362d692b 41 int available();
chrigelburri 18:306d362d692b 42 int use();
chrigelburri 18:306d362d692b 43
chrigelburri 18:306d362d692b 44 private:
chrigelburri 18:306d362d692b 45 PacketBufInf *p_buf;
chrigelburri 18:306d362d692b 46 int max_num,max_size;
chrigelburri 18:306d362d692b 47 int addr_w, addr_r;
chrigelburri 18:306d362d692b 48 };
chrigelburri 18:306d362d692b 49 #endif