projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altosui: Add config and pyro tabs to graph widget
[fw/altos]
/
src
/
kernel
/
ao_host.h
diff --git
a/src/kernel/ao_host.h
b/src/kernel/ao_host.h
index 6eb752c9636f8e2f9645eabbc7e1e1bc1105e71f..30df8edc0e66ffc7cc7f610adc57103edbfd881c 100644
(file)
--- a/
src/kernel/ao_host.h
+++ b/
src/kernel/ao_host.h
@@
-3,7
+3,8
@@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-31,7
+32,7
@@
* One set of samples read from the A/D converter
*/
struct ao_adc {
* One set of samples read from the A/D converter
*/
struct ao_adc {
-
uint16_t
tick; /* tick when the sample was read */
+
AO_TICK_TYPE
tick; /* tick when the sample was read */
int16_t accel; /* accelerometer */
int16_t pres; /* pressure sensor */
int16_t temp; /* temperature sensor */
int16_t accel; /* accelerometer */
int16_t pres; /* pressure sensor */
int16_t temp; /* temperature sensor */
@@
-40,16
+41,6
@@
struct ao_adc {
int16_t sense_m; /* main continuity sense */
};
int16_t sense_m; /* main continuity sense */
};
-#define __pdata
-#define __data
-#define __xdata
-#define __code
-#define __reentrant
-
-#define DATA_TO_XDATA(a) (a)
-#define PDATA_TO_XDATA(a) (a)
-#define CODE_TO_XDATA(a) (a)
-
enum ao_flight_state {
ao_flight_startup = 0,
ao_flight_idle = 1,
enum ao_flight_state {
ao_flight_startup = 0,
ao_flight_idle = 1,
@@
-90,12
+81,20
@@
struct ao_task {
int dummy;
};
int dummy;
};
+enum ao_igniter_status {
+ ao_igniter_unknown, /* unknown status (ambiguous voltage) */
+ ao_igniter_ready, /* continuity detected */
+ ao_igniter_active, /* igniter firing */
+ ao_igniter_open, /* open circuit detected */
+};
+
#define ao_add_task(t,f,n)
#define ao_log_start()
#define ao_log_stop()
#define AO_MS_TO_TICKS(ms) ((ms) / 10)
#define ao_add_task(t,f,n)
#define ao_log_start()
#define ao_log_stop()
#define AO_MS_TO_TICKS(ms) ((ms) / 10)
+#define AO_NS_TO_TICKS(ns) ((ns) / (10000000L))
#define AO_SEC_TO_TICKS(s) ((s) * 100)
#define AO_FLIGHT_TEST
#define AO_SEC_TO_TICKS(s) ((s) * 100)
#define AO_FLIGHT_TEST
@@
-110,7
+109,7
@@
ao_dump_state(void *wchan);
void
ao_sleep(void *wchan);
void
ao_sleep(void *wchan);
-const char
const
* const ao_state_names[] = {
+const char * const ao_state_names[] = {
"startup", "idle", "pad", "boost", "fast",
"coast", "drogue", "main", "landed", "invalid"
};
"startup", "idle", "pad", "boost", "fast",
"coast", "drogue", "main", "landed", "invalid"
};
@@
-130,6
+129,6
@@
struct ao_config {
struct ao_config ao_config = { 250, 16000 };
struct ao_config ao_config = { 250, 16000 };
-#define
ao_x
memcpy(d,s,c) memcpy(d,s,c)
-#define
ao_x
memset(d,v,c) memset(d,v,c)
-#define
ao_x
memcmp(d,s,c) memcmp(d,s,c)
+#define memcpy(d,s,c) memcpy(d,s,c)
+#define memset(d,v,c) memset(d,v,c)
+#define memcmp(d,s,c) memcmp(d,s,c)