     Serial.println();                               \
   }
 
-#if 1
-#define DEBUG(fmt, ...)  { }
-#define DEBUG_BYTES(s, p, n)  { }
+#if 0
+#define DEBUG_STATE(s) { Serial.print("D State -> "); \
+    Serial.print(state_name(s)); }
 #else
+#define DEBUG_STATE(s) {}
+#endif
+
+#if 0
 #define DEBUG(fmt, ...)  { Serial.print("D ");  \
     p(fmt, ## __VA_ARGS__);                     \
     Serial.println();                           \


  void set_state(int state) {
    if (current_state_ != state) {
      DEBUG("Switching to state %s.", state_name(state));
    }
    current_state_ = state;
  }

    print_bytes(p, n);                                                \
    Serial.println();                                                 \
  }
#else
#define DEBUG(fmt, ...)  { }
#define DEBUG_BYTES(s, p, n)  { }
#endif

void print_bytes(uint8_t* pb, uint8_t count) {
  while (count--) {
    p("%02x", *pb++);
  }
}

