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.
OmniPosition.h
- Committer:
- UCHITAKE
- Date:
- 2018-10-23
- Revision:
- 13:913b647071a8
- Parent:
- 9:222f7fcbd05a
- Child:
- 14:16ee2a638ecb
File content as of revision 13:913b647071a8:
#ifndef OMNI_POSITION_H
#define OMNI_POSITION_H
#include "mbed.h"
#define OP_SERIAL_BUFFER_SIZE 9
#define OP_HEADER_FIRST_BYTE 72
#define OP_HEADER_SECOND_BYTE 42
#define OP_DEFAULT_BAUD 115200
class OmniPosition : public RawSerial {
public:
OmniPosition(PinName serialTX, PinName serialRX);
int16_t getX();
int16_t getY();
float getTheta();
void reset();
private:
DigitalOut debugled;
void receiveByte();
void checkData();
uint8_t buffer[9];
uint8_t bufferSize;
uint8_t bufferPoint;
uint8_t receivedBytes;
int16_t X;
int16_t Y;
int16_t theta;
};
#endif