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 AigamozuControlPackets by
Diff: AigamozuControlPackets.h
- Revision:
- 0:2b8b56ac7a82
- Child:
- 1:80448565c15c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AigamozuControlPackets.h Fri May 30 15:33:50 2014 +0000 @@ -0,0 +1,44 @@ +#include "mbed.h" +#include "VNH5019.h" + +#ifndef AIGAMOZU_CONTROL_PACKETS +#define AIGAMOZU_CONTROL_PACKETS + +#define RECEIVES_GPS_STATUS_LENGTH 32 +#define RECEIVES_ACK_LENGTH 13 + + +enum COMMAND_TYPE {MANUAL = 'M', STATUS_REQUEST = 'S', CHANGE_MODE = 'C', RECEIVE_STATUS = 'R'}; +enum MODE {STANDBY_MODE, MANUAL_MODE,AUTO_MODE}; +enum STATUS {NORMAL,BUSY}; + +union TEST_T{ + long a; + uint8_t b[4]; + }; + +class AigamozuControlPackets{ + + public: + Ticker randomAxis; + + //Change + + //Create Command: Robot -> Controller/Base + uint8_t* createStatusPacket(long latitudeH,long latitudeL,long longitudeH,long longitudeL,uint8_t fromID,uint8_t toID); + uint8_t* createAckPacket(uint8_t fromID,uint8_t toID); + + //check Command: + uint8_t check(); + + // + bool checkCommandAvilable(COMMAND_TYPE requestCommand); + uint8_t checkCommnadType(uint8_t* buf); + + MODE nowMode; + STATUS nowStatus; + + private: + }; + +#endif \ No newline at end of file