hoge
Dependents: 2017_Bteam_jushinkun-gamma
gamma_ctrl.h@0:c9adbf27bd9b, 2017-08-17 (annotated)
- Committer:
- Komazawa_sun
- Date:
- Thu Aug 17 06:34:06 2017 +0000
- Revision:
- 0:c9adbf27bd9b
jushinkun_for_gamma_ctrl;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Komazawa_sun | 0:c9adbf27bd9b | 1 | #ifndef GAMMA_CTRL_H_ |
Komazawa_sun | 0:c9adbf27bd9b | 2 | #define GAMMA_CTRL_H_ |
Komazawa_sun | 0:c9adbf27bd9b | 3 | |
Komazawa_sun | 0:c9adbf27bd9b | 4 | #include "ctrl_serial.h" |
Komazawa_sun | 0:c9adbf27bd9b | 5 | |
Komazawa_sun | 0:c9adbf27bd9b | 6 | class gamma_ctrl : public ctrl_serial |
Komazawa_sun | 0:c9adbf27bd9b | 7 | { |
Komazawa_sun | 0:c9adbf27bd9b | 8 | public: |
Komazawa_sun | 0:c9adbf27bd9b | 9 | gamma_ctrl(int baudrate_g); |
Komazawa_sun | 0:c9adbf27bd9b | 10 | void get_data(); |
Komazawa_sun | 0:c9adbf27bd9b | 11 | |
Komazawa_sun | 0:c9adbf27bd9b | 12 | union gamma_packet |
Komazawa_sun | 0:c9adbf27bd9b | 13 | { |
Komazawa_sun | 0:c9adbf27bd9b | 14 | char all_data[GAMMA_DATA_SIZE]; |
Komazawa_sun | 0:c9adbf27bd9b | 15 | struct |
Komazawa_sun | 0:c9adbf27bd9b | 16 | { |
Komazawa_sun | 0:c9adbf27bd9b | 17 | unsigned char start_byte:8; |
Komazawa_sun | 0:c9adbf27bd9b | 18 | signed int rx :8; |
Komazawa_sun | 0:c9adbf27bd9b | 19 | signed int ry :8; |
Komazawa_sun | 0:c9adbf27bd9b | 20 | signed int lx :8; |
Komazawa_sun | 0:c9adbf27bd9b | 21 | unsigned int r_sw1 :1; |
Komazawa_sun | 0:c9adbf27bd9b | 22 | unsigned int r_sw2 :1; |
Komazawa_sun | 0:c9adbf27bd9b | 23 | unsigned int r_sw3 :1; |
Komazawa_sun | 0:c9adbf27bd9b | 24 | unsigned int r_sw4 :1; |
Komazawa_sun | 0:c9adbf27bd9b | 25 | unsigned int r_s_sw1 :1; |
Komazawa_sun | 0:c9adbf27bd9b | 26 | unsigned int r_s_sw2 :1; |
Komazawa_sun | 0:c9adbf27bd9b | 27 | unsigned int l_sw1 :1; |
Komazawa_sun | 0:c9adbf27bd9b | 28 | unsigned int l_sw2 :1; |
Komazawa_sun | 0:c9adbf27bd9b | 29 | unsigned int l_sw3 :1; |
Komazawa_sun | 0:c9adbf27bd9b | 30 | unsigned int l_sw4 :1; |
Komazawa_sun | 0:c9adbf27bd9b | 31 | unsigned int l_s_sw1 :1; |
Komazawa_sun | 0:c9adbf27bd9b | 32 | unsigned int l_s_sw2 :1; |
Komazawa_sun | 0:c9adbf27bd9b | 33 | unsigned int mode1 :1; |
Komazawa_sun | 0:c9adbf27bd9b | 34 | unsigned int mode2 :1; |
Komazawa_sun | 0:c9adbf27bd9b | 35 | signed int r_srd :8; |
Komazawa_sun | 0:c9adbf27bd9b | 36 | signed int l_srd :8; |
Komazawa_sun | 0:c9adbf27bd9b | 37 | unsigned int no_data :2; |
Komazawa_sun | 0:c9adbf27bd9b | 38 | unsigned char phecksum:8; |
Komazawa_sun | 0:c9adbf27bd9b | 39 | unsigned char stop_byte :8; |
Komazawa_sun | 0:c9adbf27bd9b | 40 | }data; |
Komazawa_sun | 0:c9adbf27bd9b | 41 | }; |
Komazawa_sun | 0:c9adbf27bd9b | 42 | |
Komazawa_sun | 0:c9adbf27bd9b | 43 | gamma_packet pack; |
Komazawa_sun | 0:c9adbf27bd9b | 44 | |
Komazawa_sun | 0:c9adbf27bd9b | 45 | }; |
Komazawa_sun | 0:c9adbf27bd9b | 46 | |
Komazawa_sun | 0:c9adbf27bd9b | 47 | #endif |