projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TeleMega default is now v3.0
[fw/altos]
/
src
/
kernel
/
ao_pyro.c
diff --git
a/src/kernel/ao_pyro.c
b/src/kernel/ao_pyro.c
index 0aed50d5434f65b8b0c7c03190bf47cc5b89160c..e5c30eec42da6e1504880684f773da59760bd482 100644
(file)
--- a/
src/kernel/ao_pyro.c
+++ b/
src/kernel/ao_pyro.c
@@
-76,7
+76,7
@@
uint16_t ao_pyro_fired;
#if PYRO_DBG
int pyro_dbg;
#if PYRO_DBG
int pyro_dbg;
-#define DBG(...) do { if (pyro_dbg)
printf("\t%d: ", (int) (pyro - ao_config.pyro)); printf(__VA_ARGS__);
} while (0)
+#define DBG(...) do { if (pyro_dbg)
{ printf("\t%d: ", (int) (pyro - ao_config.pyro)); printf(__VA_ARGS__); }
} while (0)
#else
#define DBG(...)
#endif
#else
#define DBG(...)
#endif
@@
-239,11
+239,8
@@
ao_pyro_pins_fire(uint16_t fire)
}
ao_delay(ao_config.pyro_time);
for (p = 0; p < AO_PYRO_NUM; p++) {
}
ao_delay(ao_config.pyro_time);
for (p = 0; p < AO_PYRO_NUM; p++) {
- if (fire & (1 << p))
{
+ if (fire & (1 << p))
ao_pyro_pin_set(p, 0);
ao_pyro_pin_set(p, 0);
- ao_config.pyro[p].fired = 1;
- ao_pyro_fired |= (1 << p);
- }
}
ao_delay(AO_MS_TO_TICKS(50));
}
}
ao_delay(AO_MS_TO_TICKS(50));
}
@@
-261,7
+258,7
@@
ao_pyro_check(void)
/* Ignore igniters which have already fired
*/
/* Ignore igniters which have already fired
*/
- if (
pyro->fired
)
+ if (
ao_pyro_fired & (1 << p)
)
continue;
/* Ignore disabled igniters
continue;
/* Ignore disabled igniters
@@
-296,7
+293,7
@@
ao_pyro_check(void)
* by setting the fired bit
*/
if (!ao_pyro_ready(pyro)) {
* by setting the fired bit
*/
if (!ao_pyro_ready(pyro)) {
-
pyro->fired = 1
;
+
ao_pyro_fired |= (1 << p)
;
continue;
}
continue;
}
@@
-307,8
+304,10
@@
ao_pyro_check(void)
fire |= (1 << p);
}
fire |= (1 << p);
}
- if (fire)
+ if (fire) {
+ ao_pyro_fired |= fire;
ao_pyro_pins_fire(fire);
ao_pyro_pins_fire(fire);
+ }
return any_waiting;
}
return any_waiting;
}