projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pass accel calibration over telemetry stream. Telemetry data format change.
[fw/altos]
/
src
/
ao.h
diff --git
a/src/ao.h
b/src/ao.h
index 65a594c0529ebd8413d1fd6592f3c878673cf6f2..bc9afcc32ca38430986dce42caefb85c64813f31 100644
(file)
--- a/
src/ao.h
+++ b/
src/ao.h
@@
-117,8
+117,9
@@
ao_panic(uint8_t reason);
*/
/* Our timer runs at 100Hz */
*/
/* Our timer runs at 100Hz */
-#define AO_MS_TO_TICKS(ms) ((ms) / 10)
-#define AO_SEC_TO_TICKS(s) ((s) * 100)
+#define AO_HERTZ 100
+#define AO_MS_TO_TICKS(ms) ((ms) / (1000 / AO_HERTZ))
+#define AO_SEC_TO_TICKS(s) ((s) * AO_HERTZ)
/* Returns the current time in ticks */
uint16_t
/* Returns the current time in ticks */
uint16_t
@@
-291,6
+292,12
@@
ao_usb_putchar(char c);
char
ao_usb_getchar(void);
char
ao_usb_getchar(void);
+/* Poll for a charcter on the USB input queue.
+ * returns AO_READ_AGAIN if none are available
+ */
+char
+ao_usb_pollchar(void);
+
/* Flush the USB output queue */
void
ao_usb_flush(void);
/* Flush the USB output queue */
void
ao_usb_flush(void);
@@
-777,6
+784,7
@@
ao_gps_report_init(void);
*/
#define AO_MAX_CALLSIGN 8
*/
#define AO_MAX_CALLSIGN 8
+#define AO_TELEMETRY_VERSION 1
struct ao_telemetry {
uint8_t addr;
struct ao_telemetry {
uint8_t addr;
@@
-786,6
+794,8
@@
struct ao_telemetry {
int32_t flight_vel;
int16_t flight_pres;
int16_t ground_pres;
int32_t flight_vel;
int16_t flight_pres;
int16_t ground_pres;
+ int16_t accel_plus_g;
+ int16_t accel_minus_g;
struct ao_adc adc;
struct ao_gps_data gps;
char callsign[AO_MAX_CALLSIGN];
struct ao_adc adc;
struct ao_gps_data gps;
char callsign[AO_MAX_CALLSIGN];
@@
-922,16
+932,17
@@
ao_igniter_init(void);
*/
#define AO_CONFIG_MAJOR 1
*/
#define AO_CONFIG_MAJOR 1
-#define AO_CONFIG_MINOR
1
+#define AO_CONFIG_MINOR
2
struct ao_config {
uint8_t major;
uint8_t minor;
uint16_t main_deploy;
struct ao_config {
uint8_t major;
uint8_t minor;
uint16_t main_deploy;
- int16_t accel_
zero
_g;
+ int16_t accel_
plus
_g;
uint8_t radio_channel;
char callsign[AO_MAX_CALLSIGN + 1];
uint8_t apogee_delay;
uint8_t radio_channel;
char callsign[AO_MAX_CALLSIGN + 1];
uint8_t apogee_delay;
+ int16_t accel_minus_g;
};
extern __xdata struct ao_config ao_config;
};
extern __xdata struct ao_config ao_config;