+#ifndef PYRO_DBG
+#define PYRO_DBG 0
+#endif
+
+#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)
+#else
+#define DBG(...)
+#endif
+
+static angle_t
+ao_sample_max_orient(void)
+{
+ uint8_t i;
+ angle_t max = ao_sample_orients[0];
+
+ for (i = 1; i < AO_NUM_ORIENT; i++) {
+ angle_t a = ao_sample_orients[i];
+ if (a > max)
+ max = a;
+ }
+ return max;
+}