X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fcore%2Fao_pyro.c;h=e59f5bc4bdbf8881ab1c88a1970127ae687604bc;hp=531e1f5003118228c05969ef5b8f4d8de956730e;hb=316d898715746a379068ac8511692bdb9da14b39;hpb=3e8b72a9dc5b6c3a0f6132dc2dec04f8c08a1deb diff --git a/src/core/ao_pyro.c b/src/core/ao_pyro.c index 531e1f50..e59f5bc4 100644 --- a/src/core/ao_pyro.c +++ b/src/core/ao_pyro.c @@ -113,13 +113,13 @@ ao_pyro_ready(struct ao_pyro *pyro) continue; break; -#if HAS_ORIENT +#if HAS_GYRO case ao_pyro_orient_less: - if (ao_orient <= pyro->orient_less) + if (ao_sample_orient <= pyro->orient_less) continue; break; case ao_pyro_orient_greater: - if (ao_orient >= pyro->orient_greater) + if (ao_sample_orient >= pyro->orient_greater) continue; break; #endif @@ -310,7 +310,7 @@ const struct { { "h<", ao_pyro_height_less, offsetof(struct ao_pyro, height_less), HELP("height less (m)") }, { "h>", ao_pyro_height_greater, offsetof(struct ao_pyro, height_greater), HELP("height greater (m)") }, -#if HAS_ORIENT +#if HAS_GYRO { "o<", ao_pyro_orient_less, offsetof(struct ao_pyro, orient_less), HELP("orient less (deg)") }, { "o>", ao_pyro_orient_greater, offsetof(struct ao_pyro, orient_greater), HELP("orient greater (deg)") }, #endif @@ -436,7 +436,7 @@ ao_pyro_set(void) if (ao_cmd_status != ao_cmd_success) return; p = ao_cmd_lex_i; - if (p < 0 || AO_PYRO_NUM <= p) { + if (AO_PYRO_NUM <= p) { printf ("invalid pyro channel %d\n", p); return; }