2 * Copyright © 2009 Keith Packard <keithp@keithp.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
36 #include <sys/types.h>
44 #include <glade/glade.h>
45 #include <gconf/gconf-client.h>
52 struct cc_telem prev_data;
56 gboolean ascent; /* going up? */
69 double max_acceleration;
73 struct cc_gps_tracking gps_tracking;
93 extern struct aostate aostate;
95 /* GPS is 'stable' when we've seen at least this many samples */
96 #define MIN_PAD_SAMPLES 10
99 aoview_monitor_disconnect(void);
102 aoview_monitor_connect(char *tty);
105 aoview_monitor_parse(const char *line);
108 aoview_monitor_set_channel(int channel);
111 aoview_monitor_reset(void);
113 struct aoview_serial *
114 aoview_serial_open(const char *tty);
117 aoview_serial_close(struct aoview_serial *serial);
119 typedef void (*aoview_serial_callback)(gpointer user_data, struct aoview_serial *serial, gint revents);
122 aoview_serial_set_callback(struct aoview_serial *serial,
123 aoview_serial_callback func);
126 aoview_serial_printf(struct aoview_serial *serial, char *format, ...);
129 aoview_serial_read(struct aoview_serial *serial, char *buf, int len);
132 aoview_serial_getc(struct aoview_serial *serial);
135 aoview_dev_dialog_init(GladeXML *xml);
138 aoview_state_notify(struct cc_telem *data);
141 aoview_state_new(void);
144 aoview_state_init(GladeXML *xml);
147 aoview_pres_to_altitude(int16_t pres);
150 aoview_altitude_to_pres(int16_t alt);
153 aoview_fullname (char *dir, char *file);
156 aoview_basename(char *file);
159 aoview_add_plain_text_column (GtkTreeView *view, const gchar *title, gint model_column, gint width);
162 aoview_mkdir(char *dir);
165 aoview_log_init(GladeXML *xml);
168 aoview_log_set_serial(int serial);
171 aoview_log_get_serial(void);
174 aoview_log_printf(char *format, ...);
177 aoview_log_new(void);
180 aoview_table_start(void);
183 aoview_table_add_row(int column, char *label, char *format, ...);
186 aoview_table_finish(void);
189 aoview_table_init(GladeXML *xml);
192 aoview_table_clear(void);
196 extern char *aoview_file_dir;
199 aoview_file_finish(struct aoview_file *file);
202 aoview_file_start(struct aoview_file *file);
205 aoview_file_name(struct aoview_file *file);
208 aoview_file_set_serial(struct aoview_file *file, int serial);
211 aoview_file_get_serial(struct aoview_file *file);
214 aoview_file_printf(struct aoview_file *file, char *format, ...);
217 aoview_file_vprintf(struct aoview_file *file, char *format, va_list ap);
220 aoview_file_new(char *ext);
223 aoview_file_destroy(struct aoview_file *file);
226 aoview_file_init(GladeXML *xml);
228 /* aoview_eeprom.c */
231 aoview_eeprom_save(const char *device);
234 aoview_eeprom_init(GladeXML *xml);
237 void aoview_voice_open(void);
239 void aoview_voice_close(void);
241 void aoview_voice_speak(char *format, ...);
245 void aoview_label_init(GladeXML *xml);
248 aoview_label_show(struct aostate *state);
253 aoview_flite_start(void);
256 aoview_flite_stop(void);
260 extern char *aoview_tty;
262 /* aoview_channel.c */
265 aoview_channel_current(void);
268 aoview_channel_init(GladeXML *xml);
270 #endif /* _AOVIEW_H_ */