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; version 2 of the License.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
35 #include <sys/types.h>
43 #include <glade/glade.h>
44 #include <gconf/gconf-client.h>
51 struct cc_telem prev_data;
55 gboolean ascent; /* going up? */
68 double max_acceleration;
72 struct cc_gps_tracking gps_tracking;
92 extern struct aostate aostate;
94 /* GPS is 'stable' when we've seen at least this many samples */
95 #define MIN_PAD_SAMPLES 10
98 aoview_monitor_disconnect(void);
101 aoview_monitor_connect(char *tty);
104 aoview_monitor_parse(const char *line);
107 aoview_monitor_set_channel(int channel);
110 aoview_monitor_reset(void);
112 struct aoview_serial *
113 aoview_serial_open(const char *tty);
116 aoview_serial_close(struct aoview_serial *serial);
118 typedef void (*aoview_serial_callback)(gpointer user_data, struct aoview_serial *serial, gint revents);
121 aoview_serial_set_callback(struct aoview_serial *serial,
122 aoview_serial_callback func);
125 aoview_serial_printf(struct aoview_serial *serial, char *format, ...);
128 aoview_serial_read(struct aoview_serial *serial, char *buf, int len);
131 aoview_serial_getc(struct aoview_serial *serial);
134 aoview_dev_dialog_init(GladeXML *xml);
137 aoview_state_notify(struct cc_telem *data);
140 aoview_state_new(void);
143 aoview_state_init(GladeXML *xml);
146 aoview_pres_to_altitude(int16_t pres);
149 aoview_altitude_to_pres(int16_t alt);
152 aoview_fullname (char *dir, char *file);
155 aoview_basename(char *file);
158 aoview_add_plain_text_column (GtkTreeView *view, const gchar *title, gint model_column, gint width);
161 aoview_mkdir(char *dir);
164 aoview_log_init(GladeXML *xml);
167 aoview_log_set_serial(int serial);
170 aoview_log_get_serial(void);
173 aoview_log_printf(char *format, ...);
176 aoview_log_new(void);
179 aoview_table_start(void);
182 aoview_table_add_row(int column, char *label, char *format, ...);
185 aoview_table_finish(void);
188 aoview_table_init(GladeXML *xml);
191 aoview_table_clear(void);
195 extern char *aoview_file_dir;
198 aoview_file_finish(struct aoview_file *file);
201 aoview_file_start(struct aoview_file *file);
204 aoview_file_name(struct aoview_file *file);
207 aoview_file_set_serial(struct aoview_file *file, int serial);
210 aoview_file_get_serial(struct aoview_file *file);
213 aoview_file_printf(struct aoview_file *file, char *format, ...);
216 aoview_file_vprintf(struct aoview_file *file, char *format, va_list ap);
219 aoview_file_new(char *ext);
222 aoview_file_destroy(struct aoview_file *file);
225 aoview_file_init(GladeXML *xml);
227 /* aoview_eeprom.c */
230 aoview_eeprom_save(const char *device);
233 aoview_eeprom_init(GladeXML *xml);
236 void aoview_voice_open(void);
238 void aoview_voice_close(void);
240 void aoview_voice_speak(char *format, ...);
244 void aoview_label_init(GladeXML *xml);
247 aoview_label_show(struct aostate *state);
252 aoview_flite_start(void);
255 aoview_flite_stop(void);
259 extern char *aoview_tty;
261 /* aoview_channel.c */
264 aoview_channel_current(void);
267 aoview_channel_init(GladeXML *xml);
269 #endif /* _AOVIEW_H_ */