From f3c8946d992889edabffbab40aead578963de75f Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 7 Aug 2020 21:48:09 -0700 Subject: [PATCH] altos: Don't report inhibited pyro channels as fired Inhibiting channels happens when the channel conditions change during the delay period and was done by marking them as already fired. This worked, but the log file would then indicate that the channel had fired when in fact it was inhibited instead. Separate out the inhibited status so that the correct data appears in the log. Signed-off-by: Keith Packard --- src/kernel/ao_pyro.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/kernel/ao_pyro.c b/src/kernel/ao_pyro.c index 30d1518f..80e1980e 100644 --- a/src/kernel/ao_pyro.c +++ b/src/kernel/ao_pyro.c @@ -69,6 +69,7 @@ ao_pyro_print_status(void) #endif uint16_t ao_pyro_fired; +uint16_t ao_pyro_inhibited; #ifndef PYRO_DBG #define PYRO_DBG 0 @@ -274,9 +275,9 @@ ao_pyro_check(void) for (p = 0; p < AO_PYRO_NUM; p++) { pyro = &ao_config.pyro[p]; - /* Ignore igniters which have already fired + /* Ignore igniters which have already fired or inhibited */ - if (ao_pyro_fired & (1 << p)) + if ((ao_pyro_fired|ao_pyro_inhibited) & (1 << p)) continue; /* Ignore disabled igniters @@ -308,10 +309,10 @@ ao_pyro_check(void) /* Check to make sure the required conditions * remain valid. If not, inhibit the channel - * by setting the fired bit + * by setting the inhibited bit */ if (!ao_pyro_ready(pyro)) { - ao_pyro_fired |= (1 << p); + ao_pyro_inhibited |= (1 << p); continue; } -- 2.30.2