bird

Dependencies:   mbed

Committer:
1013373474
Date:
Mon May 06 05:02:25 2019 +0000
Revision:
6:9bf0273ee25f
change the class name of structure_2.h file

Who changed what in which revision?

UserRevisionLine numberNew contents of line
1013373474 6:9bf0273ee25f 1 #include "mbed.h"
1013373474 6:9bf0273ee25f 2 #include "N5110.h"
1013373474 6:9bf0273ee25f 3 #include "Gamepad.h"
1013373474 6:9bf0273ee25f 4
1013373474 6:9bf0273ee25f 5 /**
1013373474 6:9bf0273ee25f 6 *@brief Data struct includes the structure position.
1013373474 6:9bf0273ee25f 7 */
1013373474 6:9bf0273ee25f 8
1013373474 6:9bf0273ee25f 9 struct Data2{
1013373474 6:9bf0273ee25f 10 int mm; /**<int the position of the first structure */
1013373474 6:9bf0273ee25f 11 int nn; /**<int the position of the first channel */
1013373474 6:9bf0273ee25f 12 int qq; /**<int the position of the second structure */
1013373474 6:9bf0273ee25f 13 int oo; /**<int the position of the second channel */
1013373474 6:9bf0273ee25f 14 int pp; /**<int the position of the third structure */
1013373474 6:9bf0273ee25f 15 int ee; /**<int the position of the third channel */
1013373474 6:9bf0273ee25f 16 int tt;/**<int the position of the third channel */
1013373474 6:9bf0273ee25f 17 };
1013373474 6:9bf0273ee25f 18 /** structure2 Class
1013373474 6:9bf0273ee25f 19 *@brief Data used to make the structure
1013373474 6:9bf0273ee25f 20 *@author Zhou Yongzhi
1013373474 6:9bf0273ee25f 21 *@date May 2019
1013373474 6:9bf0273ee25f 22 */
1013373474 6:9bf0273ee25f 23 class structure2
1013373474 6:9bf0273ee25f 24 {
1013373474 6:9bf0273ee25f 25 public:
1013373474 6:9bf0273ee25f 26 /**
1013373474 6:9bf0273ee25f 27 *@brief initialise the parameters
1013373474 6:9bf0273ee25f 28 *@param size,speed
1013373474 6:9bf0273ee25f 29 */
1013373474 6:9bf0273ee25f 30 void init(int size,int speed);
1013373474 6:9bf0273ee25f 31 /**
1013373474 6:9bf0273ee25f 32 *@brief initialise the parameters
1013373474 6:9bf0273ee25f 33 *@param lcd
1013373474 6:9bf0273ee25f 34 *@details The function in N5110 is used
1013373474 6:9bf0273ee25f 35 */
1013373474 6:9bf0273ee25f 36 void draw(N5110 &lcd);
1013373474 6:9bf0273ee25f 37 /**
1013373474 6:9bf0273ee25f 38 *@brief initialise the parameters
1013373474 6:9bf0273ee25f 39 */
1013373474 6:9bf0273ee25f 40 void init();
1013373474 6:9bf0273ee25f 41 /**
1013373474 6:9bf0273ee25f 42 *@brief The data which are sent to main.cpp
1013373474 6:9bf0273ee25f 43 */
1013373474 6:9bf0273ee25f 44 Data2 get_data2();
1013373474 6:9bf0273ee25f 45
1013373474 6:9bf0273ee25f 46
1013373474 6:9bf0273ee25f 47 private:
1013373474 6:9bf0273ee25f 48 int _mm; //障碍物左上角的点的横坐标
1013373474 6:9bf0273ee25f 49 int _nn; // 障碍物间隔左上角点的纵坐标
1013373474 6:9bf0273ee25f 50 int _qq; //the second
1013373474 6:9bf0273ee25f 51 int _oo; // the third
1013373474 6:9bf0273ee25f 52 int _pp; // the second heng zuobiao
1013373474 6:9bf0273ee25f 53 int _ee; // the third heng zuobiao
1013373474 6:9bf0273ee25f 54 int _tt; // the score
1013373474 6:9bf0273ee25f 55 Data2 _data2;
1013373474 6:9bf0273ee25f 56 };