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