forked from EE-LiuYunhao/RoboMaster_General_Control
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathShootFSM.h
More file actions
31 lines (27 loc) · 790 Bytes
/
ShootFSM.h
File metadata and controls
31 lines (27 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
typedef struct
{
unsigned short int a : 1;
unsigned short int b : 2;
unsigned short int prev: 2;
}shoot_mode;
typedef struct
{
unsigned short int a :1;
unsigned short int b1 :1;
unsigned short int b2 :1;
unsigned short int Shoot:1;
unsigned short int TimeO:1;
}OneBit_t;
typedef enum
{
Nil=0, Semi=1, Burst=2, Auto=3
}MODE;
typedef enum
{
fire=1, wait=0
}shoot_t;
void shootTask(shoot_mode * mode, unsigned short int sig, unsigned int * ctime);
void printShoot(const shoot_mode * mode);
shoot_t shootCtrl(unsigned short int instru, unsigned short int * fireMode, unsigned short int * fireInst, unsigned short int * n);
int setPIDRef(unsigned short int cmd, unsigned short int prev_cmd);
void printFire(const shoot_t * cmd);