2016_05_19ver Auto mode 10sec forward, 2sec stop, 2sec right turn Please change test_mode's right turn ppm

Dependencies:   VNH5019 AigamozuControlPackets_2016

Dependents:   Aigamozu_Robot_2016_ver1 GPSLOG_program AigamozuControlPackets_2016

Fork of AigamozuControlPackets by aigamozu

Committer:
m5171135
Date:
Fri May 30 15:33:50 2014 +0000
Revision:
0:2b8b56ac7a82
Child:
1:80448565c15c
to Mr.watanabe

Who changed what in which revision?

UserRevisionLine numberNew contents of line
m5171135 0:2b8b56ac7a82 1 #include "mbed.h"
m5171135 0:2b8b56ac7a82 2 #include "VNH5019.h"
m5171135 0:2b8b56ac7a82 3
m5171135 0:2b8b56ac7a82 4 #ifndef AIGAMOZU_CONTROL_PACKETS
m5171135 0:2b8b56ac7a82 5 #define AIGAMOZU_CONTROL_PACKETS
m5171135 0:2b8b56ac7a82 6
m5171135 0:2b8b56ac7a82 7 #define RECEIVES_GPS_STATUS_LENGTH 32
m5171135 0:2b8b56ac7a82 8 #define RECEIVES_ACK_LENGTH 13
m5171135 0:2b8b56ac7a82 9
m5171135 0:2b8b56ac7a82 10
m5171135 0:2b8b56ac7a82 11 enum COMMAND_TYPE {MANUAL = 'M', STATUS_REQUEST = 'S', CHANGE_MODE = 'C', RECEIVE_STATUS = 'R'};
m5171135 0:2b8b56ac7a82 12 enum MODE {STANDBY_MODE, MANUAL_MODE,AUTO_MODE};
m5171135 0:2b8b56ac7a82 13 enum STATUS {NORMAL,BUSY};
m5171135 0:2b8b56ac7a82 14
m5171135 0:2b8b56ac7a82 15 union TEST_T{
m5171135 0:2b8b56ac7a82 16 long a;
m5171135 0:2b8b56ac7a82 17 uint8_t b[4];
m5171135 0:2b8b56ac7a82 18 };
m5171135 0:2b8b56ac7a82 19
m5171135 0:2b8b56ac7a82 20 class AigamozuControlPackets{
m5171135 0:2b8b56ac7a82 21
m5171135 0:2b8b56ac7a82 22 public:
m5171135 0:2b8b56ac7a82 23 Ticker randomAxis;
m5171135 0:2b8b56ac7a82 24
m5171135 0:2b8b56ac7a82 25 //Change
m5171135 0:2b8b56ac7a82 26
m5171135 0:2b8b56ac7a82 27 //Create Command: Robot -> Controller/Base
m5171135 0:2b8b56ac7a82 28 uint8_t* createStatusPacket(long latitudeH,long latitudeL,long longitudeH,long longitudeL,uint8_t fromID,uint8_t toID);
m5171135 0:2b8b56ac7a82 29 uint8_t* createAckPacket(uint8_t fromID,uint8_t toID);
m5171135 0:2b8b56ac7a82 30
m5171135 0:2b8b56ac7a82 31 //check Command:
m5171135 0:2b8b56ac7a82 32 uint8_t check();
m5171135 0:2b8b56ac7a82 33
m5171135 0:2b8b56ac7a82 34 //
m5171135 0:2b8b56ac7a82 35 bool checkCommandAvilable(COMMAND_TYPE requestCommand);
m5171135 0:2b8b56ac7a82 36 uint8_t checkCommnadType(uint8_t* buf);
m5171135 0:2b8b56ac7a82 37
m5171135 0:2b8b56ac7a82 38 MODE nowMode;
m5171135 0:2b8b56ac7a82 39 STATUS nowStatus;
m5171135 0:2b8b56ac7a82 40
m5171135 0:2b8b56ac7a82 41 private:
m5171135 0:2b8b56ac7a82 42 };
m5171135 0:2b8b56ac7a82 43
m5171135 0:2b8b56ac7a82 44 #endif