X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=aoview%2Faoview.h;h=4abbde88839ca0c8bdd4420dc3ff0c62824b9cde;hp=028b2f162839a56aed1c598a3dd829c1197c0608;hb=91b07410122d0eaaf292cdb31c200925d45eaf2c;hpb=09771c644de54ae354e8f98af7ba74289b3c0fcc diff --git a/aoview/aoview.h b/aoview/aoview.h index 028b2f16..4abbde88 100644 --- a/aoview/aoview.h +++ b/aoview/aoview.h @@ -18,8 +18,7 @@ #ifndef _AOVIEW_H_ #define _AOVIEW_H_ -#include -#include +#define _GNU_SOURCE #include #include @@ -33,6 +32,10 @@ #include #include +#include +#include +#include + struct usbdev { char *sys; char *tty; @@ -55,6 +58,11 @@ struct aostate { int batt; int drogue; int main; + int flight_accel; + int ground_accel; + int flight_vel; + int flight_pres; + int ground_pres; int nsat; int locked; struct { @@ -70,7 +78,7 @@ struct aostate { void aoview_monitor_disconnect(void); -void +gboolean aoview_monitor_connect(char *tty); struct aoview_serial * @@ -79,9 +87,11 @@ aoview_serial_open(const char *tty); void aoview_serial_close(struct aoview_serial *serial); +typedef void (*aoview_serial_callback)(gpointer user_data, struct aoview_serial *serial, gint revents); + void aoview_serial_set_callback(struct aoview_serial *serial, - GSourceFunc func, + aoview_serial_callback func, gpointer data, GDestroyNotify notify); @@ -106,6 +116,9 @@ aoview_usbdev_free(struct usbdev *usbdev); void aoview_state_notify(struct aostate *state); +void +aoview_state_new(void); + void aoview_state_init(GladeXML *xml); @@ -115,4 +128,46 @@ aoview_pres_to_altitude(int16_t pres); int16_t aoview_altitude_to_pres(int16_t alt); +char * +aoview_fullname (char *dir, char *file); + +char * +aoview_basename(char *file); + +GtkTreeViewColumn * +aoview_add_plain_text_column (GtkTreeView *view, const gchar *title, gint model_column, gint width); + +int +aoview_mkdir(char *dir); + +void +aoview_log_init(GladeXML *xml); + +void +aoview_log_set_serial(int serial); + +int +aoview_log_get_serial(void); + +void +aoview_log_printf(char *format, ...); + +void +aoview_log_new(void); + +void +aoview_table_start(void); + +void +aoview_table_add_row(char *label, char *format, ...); + +void +aoview_table_finish(void); + +void +aoview_table_init(GladeXML *xml); + +void +aoview_table_clear(void); + #endif /* _AOVIEW_H_ */