projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Trim aoview_serial_set_callback args down to just port and callback
[fw/altos]
/
aoview
/
aoview.h
diff --git
a/aoview/aoview.h
b/aoview/aoview.h
index d49bd6f4968e656d45a5ecc4194f0773a605cf27..4ed0ffaba51804005c83fd05a42ba7419c06f137 100644
(file)
--- a/
aoview/aoview.h
+++ b/
aoview/aoview.h
@@
-35,6
+35,7
@@
#include <sys/types.h>
#include <sys/stat.h>
#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <assert.h>
+#include <math.h>
#include <gtk/gtk.h>
#include <glade/glade.h>
#include <gtk/gtk.h>
#include <glade/glade.h>
@@
-50,7
+51,7
@@
struct usbdev {
int idVendor;
};
int idVendor;
};
-struct ao
state
{
+struct ao
data
{
char callsign[16];
int serial;
int rssi;
char callsign[16];
int serial;
int rssi;
@@
-68,7
+69,8
@@
struct aostate {
int flight_pres;
int ground_pres;
int nsat;
int flight_pres;
int ground_pres;
int nsat;
- int locked;
+ int gps_locked;
+ int gps_connected;
struct {
int hour;
int minute;
struct {
int hour;
int minute;
@@
-83,9
+85,17
@@
struct aostate {
double hdop; /* unitless? */
int h_error; /* m */
int v_error; /* m */
double hdop; /* unitless? */
int h_error; /* m */
int v_error; /* m */
+};
+
+struct aostate {
+ struct aodata data;
/* derived data */
/* derived data */
+ struct aodata prev_data;
+
+ double report_time;
+
gboolean ascent; /* going up? */
int ground_altitude;
gboolean ascent; /* going up? */
int ground_altitude;
@@
-96,11
+106,16
@@
struct aostate {
double temperature;
double main_sense;
double drogue_sense;
double temperature;
double main_sense;
double drogue_sense;
+ double baro_speed;
int max_height;
double max_acceleration;
double max_speed;
int max_height;
double max_acceleration;
double max_speed;
+ double lat;
+ double lon;
+ int gps_valid;
+
double pad_lat;
double pad_lon;
double pad_alt;
double pad_lat;
double pad_lon;
double pad_alt;
@@
-108,11
+123,18
@@
struct aostate {
double pad_lon_total;
double pad_alt_total;
int npad;
double pad_lon_total;
double pad_alt_total;
int npad;
+ int prev_npad;
double distance;
double bearing;
double distance;
double bearing;
+ int gps_height;
+
+ int speak_tick;
+ int speak_altitude;
};
};
+extern struct aostate aostate;
+
/* GPS is 'stable' when we've seen at least this many samples */
#define MIN_PAD_SAMPLES 10
/* GPS is 'stable' when we've seen at least this many samples */
#define MIN_PAD_SAMPLES 10
@@
-123,7
+145,10
@@
gboolean
aoview_monitor_connect(char *tty);
gboolean
aoview_monitor_connect(char *tty);
gboolean
-aoview_monitor_parse(char *line);
+aoview_monitor_parse(const char *line);
+
+void
+aoview_monitor_reset(void);
struct aoview_serial *
aoview_serial_open(const char *tty);
struct aoview_serial *
aoview_serial_open(const char *tty);
@@
-135,9
+160,7
@@
typedef void (*aoview_serial_callback)(gpointer user_data, struct aoview_serial
void
aoview_serial_set_callback(struct aoview_serial *serial,
void
aoview_serial_set_callback(struct aoview_serial *serial,
- aoview_serial_callback func,
- gpointer data,
- GDestroyNotify notify);
+ aoview_serial_callback func);
void
aoview_serial_printf(struct aoview_serial *serial, char *format, ...);
void
aoview_serial_printf(struct aoview_serial *serial, char *format, ...);
@@
-158,7
+181,7
@@
void
aoview_usbdev_free(struct usbdev *usbdev);
void
aoview_usbdev_free(struct usbdev *usbdev);
void
-aoview_state_notify(struct ao
state *state
);
+aoview_state_notify(struct ao
data *data
);
void
aoview_state_new(void);
void
aoview_state_new(void);
@@
-203,7
+226,7
@@
void
aoview_table_start(void);
void
aoview_table_start(void);
void
-aoview_table_add_row(char *label, char *format, ...);
+aoview_table_add_row(
int column,
char *label, char *format, ...);
void
aoview_table_finish(void);
void
aoview_table_finish(void);
@@
-270,4
+293,12
@@
void aoview_label_init(GladeXML *xml);
void
aoview_label_show(struct aostate *state);
void
aoview_label_show(struct aostate *state);
+/* aoview_flite.c */
+
+FILE *
+aoview_flite_start(void);
+
+void
+aoview_flite_stop(void);
+
#endif /* _AOVIEW_H_ */
#endif /* _AOVIEW_H_ */