0,0 → 1,60 |
#ifndef HANDLER_H |
#define HANDLER_H |
#include <string> |
#include "Parser.h" |
#include "Communication.h" |
#include "Kopter.h" |
#include "../Parameter_Positions.h" |
#include "../typedefs.h" |
|
/** |
* The Handler handels commands that are send from/to the Mikrokopter |
* and parses them using the Parser-class. |
*/ |
|
class Handler { |
private: |
Communication * com; |
|
KopterData * data; |
sRxData rxData; |
public: |
|
Handler(Communication * com, KopterData * data); |
//FlightCtrl commands |
void get_flightctrl_settings(int index); |
void set_flightctrl_settings(char * tx_data); |
void motor_test(sMotor motor); |
void reset_motor(); |
void read_motor_mixer(); |
void write_motor_mixer(char * tx_data, int length); |
int get_motor_config(char * tx_data); |
|
//NaviCtrl commands |
void set_navictrl_debug(int speed); |
void stop_navictrl_debug(); |
void send_waypoint(Waypoint_t desired_pos); |
void add_waypoint(Waypoint_t wp); |
void delete_waypoints(); |
|
//switch between MK modules/components |
void switch_navictrl(); |
void switch_flightctrl(); |
void switch_mk3mag(); |
|
//commands for MK3MAG |
|
//commands for all modules/components |
void set_all_debug(int speed); |
void stop_all_debug(); |
void get_analog(); |
void show_lcd(); |
void lcd_up(); |
void lcd_down(); |
void get_version(); |
void get_ppm_channels(); |
|
void receive_data(sRxData rx); |
}; |
|
#endif |