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