Subversion Repositories Projects

Rev

Rev 396 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 396 Rev 399
Line 3... Line 3...
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"
Line 8... Line 9...
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.
Line 12... Line 13...
12
 */
13
 */
13
 
14
 
14
class Handler {
15
class Handler {
Line -... Line 16...
-
 
16
    private:
-
 
17
        Communication * com;
-
 
18
 
-
 
19
        // current LCD page
15
    private:
20
        int lcd_cur;
16
        Communication * com;
21
        //max count of LCD pages
17
 
22
        int lcd_max;
18
        //buffer to send data
23
        //buffer to send data
-
 
24
        //char tx_data[150];
-
 
25
    public:
-
 
26
        Handler(Communication * com);
-
 
27
        //FlightCtrl commands
19
        //char tx_data[150];
28
        void get_flightctrl_settings(int index);
20
    public:
29
        void set_flightctrl_settings(char * tx_data);
21
        Handler(Communication * com);
30
        void motor_test(sMotor motor);
-
 
31
        void read_mixer();
-
 
32
        void write_mixer(char * tx_data, int length);
-
 
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();
22
        void read_mixer();
58
 
Line 23... Line 59...
23
        void receive_data(sRxData rx);
59
        void receive_data(sRxData rx);
24
        void get_motor_config();
60