2011-11-16 21:49:56 -04:00
|
|
|
#ifndef _DESKTOP_H
|
|
|
|
#define _DESKTOP_H
|
2011-11-07 05:52:12 -04:00
|
|
|
|
2011-11-26 03:18:51 -04:00
|
|
|
#include <unistd.h>
|
2011-12-02 00:15:12 -04:00
|
|
|
#include <sys/time.h>
|
2011-11-26 03:18:51 -04:00
|
|
|
|
2011-11-16 21:49:56 -04:00
|
|
|
struct desktop_info {
|
2011-11-07 05:52:12 -04:00
|
|
|
bool slider; // slider switch state, True means CLI mode
|
|
|
|
struct timeval sketch_start_time;
|
2011-11-16 21:49:56 -04:00
|
|
|
bool quadcopter; // use quadcopter outputs
|
2011-11-25 23:47:06 -04:00
|
|
|
unsigned framerate;
|
|
|
|
float initial_height;
|
2011-11-07 05:52:12 -04:00
|
|
|
};
|
|
|
|
|
2011-11-16 21:49:56 -04:00
|
|
|
extern struct desktop_info desktop_state;
|
2011-11-07 05:52:12 -04:00
|
|
|
|
2011-10-30 03:31:16 -03:00
|
|
|
void desktop_serial_select_setup(fd_set *fds, int *fd_high);
|
2011-11-16 21:49:56 -04:00
|
|
|
void sitl_input(void);
|
|
|
|
void sitl_setup(void);
|
|
|
|
int sitl_gps_pipe(void);
|
|
|
|
ssize_t sitl_gps_read(int fd, void *buf, size_t count);
|
|
|
|
void sitl_update_compass(float heading, float roll, float pitch, float yaw);
|
2012-01-11 06:30:48 -04:00
|
|
|
void sitl_update_gps(double latitude, double longitude, float altitude,
|
|
|
|
double speedN, double speedE, bool have_lock);
|
2011-12-02 00:15:12 -04:00
|
|
|
void sitl_update_adc(float roll, float pitch, float yaw,
|
2012-01-11 06:30:48 -04:00
|
|
|
double rollRate, double pitchRate, double yawRate,
|
|
|
|
double xAccel, double yAccel, double zAccel,
|
2011-12-02 00:15:12 -04:00
|
|
|
float airspeed);
|
2011-11-16 21:49:56 -04:00
|
|
|
void sitl_setup_adc(void);
|
|
|
|
void sitl_update_barometer(float altitude);
|
2011-10-30 03:31:16 -03:00
|
|
|
|
2011-11-16 21:49:56 -04:00
|
|
|
#endif
|