Rev 500 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 500 | Rev 513 | ||
---|---|---|---|
1 | #ifndef HANDLER_H |
1 | #ifndef HANDLER_H |
2 | #define HANDLER_H |
2 | #define HANDLER_H |
3 | #include "Parser.h" |
3 | #include "Parser.h" |
4 | #include "Communication.h" |
4 | #include "Communication.h" |
5 | #include "Kopter.h" |
5 | #include "Kopter.h" |
6 | #include "../Parameter_Positions.h" |
6 | #include "../Parameter_Positions.h" |
7 | #include "../typedefs.h" |
7 | #include "../typedefs.h" |
8 | 8 | ||
9 | /** |
9 | /** |
10 | * The Handler handels commands that are send from/to the Mikrokopter |
10 | * The Handler handels commands that are send from/to the Mikrokopter |
11 | * and parses them using the Parser-class. |
11 | * and parses them using the Parser-class. |
12 | */ |
12 | */ |
13 | 13 | ||
14 | class Handler { |
14 | class Handler { |
15 | private: |
15 | private: |
16 | Communication * com; |
16 | Communication * com; |
17 | 17 | ||
18 | public: |
18 | public: |
19 | KopterData * data; |
19 | KopterData * data; |
20 | 20 | ||
21 | Handler(Communication * com, KopterData * data); |
21 | Handler(Communication * com, KopterData * data); |
22 | 22 | ||
23 | //FlightCtrl commands |
23 | //FlightCtrl commands |
24 | void get_flightctrl_settings(int index); |
24 | void get_flightctrl_settings(int index); |
25 | void set_flightctrl_settings(char * tx_data); |
25 | void set_flightctrl_settings(char * tx_data); |
26 | void motor_test(sMotorData motor); |
26 | void motor_test(sMotorData motor); |
27 | void reset_motor(); |
27 | void reset_motor(); |
28 | void read_motor_mixer(); |
28 | void read_motor_mixer(); |
29 | void write_motor_mixer(char * tx_data, int length); |
29 | void write_motor_mixer(char * tx_data, int length); |
30 | int get_motor_config(char * tx_data); |
30 | int get_motor_config(char * tx_data); |
31 | 31 | ||
32 | //NaviCtrl commands |
32 | //NaviCtrl commands |
33 | void set_navictrl_debug(int speed); |
33 | void set_navictrl_debug(int speed); |
34 | void stop_navictrl_debug(); |
34 | void stop_navictrl_debug(); |
35 | void send_waypoint(Waypoint_t desired_pos); |
35 | void send_waypoint(Waypoint_t desired_pos); |
36 | void add_waypoint(Waypoint_t wp); |
36 | void add_waypoint(Waypoint_t wp); |
37 | void delete_waypoints(); |
37 | void delete_waypoints(); |
38 | 38 | ||
39 | //switch between MK modules/components |
39 | //switch between MK modules/components |
40 | void switch_navictrl(); |
40 | void switch_navictrl(); |
41 | void switch_flightctrl(); |
41 | void switch_flightctrl(); |
42 | void switch_mk3mag(); |
42 | void switch_mk3mag(); |
43 | 43 | ||
44 | //commands for MK3MAG |
44 | //commands for MK3MAG |
45 | 45 | ||
46 | //commands for all modules/components |
46 | //commands for all modules/components |
47 | void set_all_debug(int speed); |
47 | void set_all_debug(int speed); |
48 | void stop_all_debug(); |
48 | void stop_all_debug(); |
49 | void get_analog(); |
49 | void get_analog(); |
50 | void show_lcd(); |
50 | void show_lcd(); |
51 | void lcd_up(); |
51 | void lcd_up(); |
52 | void lcd_down(); |
52 | void lcd_down(); |
53 | void get_version(); |
53 | void get_version(); |
54 | void get_ppm_channels(); |
54 | void get_ppm_channels(); |
55 | 55 | ||
56 | void receive_data(char * incomming, int length); |
56 | void receive_data(char * incomming, int length); |
- | 57 | void new_navi_data(char * data); |
|
57 | }; |
58 | }; |
58 | 59 | ||
59 | #endif |
60 | #endif |