+ if ((buttons & IN_ROCKERB) && auto_off == 0)
+ auto_off = AUTO_OFF_COUNT;
+
+ if (((buttons & IN_ROCKERB) && auto_off && --auto_off == 0) ||
+ (!(buttons & (IN_ROCKERA | IN_ROCKERB)))) {
+ /* Sleep when auto-off time has expired or if rocker switch is
+ * turned off.
+ */
+ rgb_off();
+ dbgpin_low();
+ auto_off = 0;
+ buttons_sleep();
+ dbgpin_high();
+ reset_steps();
+ rgb_on();
+ red.value = 0;
+ grn.value = 0;
+ blu.value = 0;
+ wht.value = 0;
+ } else {