]> oss.titaniummirror.com Git - rgblamp.git/blobdiff - main.c
Update comments
[rgblamp.git] / main.c
diff --git a/main.c b/main.c
index 0ca9cdc69c1983806c766eecfb6a3293f75b5d6c..6eaf3d77159fdcfe566e85dbf2f7b2ec06a77aa1 100644 (file)
--- a/main.c
+++ b/main.c
@@ -109,8 +109,8 @@ enum {
   BRIGHT_BOTTOM = -5,    /* ... then down to bottom */
   BRIGHT_MAX = 85,       /* Bright values are constrained for computations */
   BRIGHT_MIN = 1,        /* ... by min and max. */
-  BRIGHT_INIT = 42,      /* later, get from eeprom */
-  CBRIGHT_VARIANCE = 20, /* brightness range for candle flicker */
+  BRIGHT_INIT = 42,      /* Initial value is replaced by value from eeprom */
+  CBRIGHT_VARIANCE = 20, /* Brightness range for candle flicker */
   STD_FADE = 16,         /* Fade time in 32.768 ms units */
   STD_INCOLOR = 29491,   /* Time in color when MODE_CYCLE, in 32.768 ms units */
   PARTY_MIN = 8,         /* Min party fade and incolor units */
@@ -272,9 +272,9 @@ void turnOn()
   btn_pben();
 }
 
+/* Event on to off, either by switch or auto-off timer */
 void turnOff()
 {
-  /* Event on to off, either by switch or auto-off timer */
   tmr_stop(TMR_CFG);
   tmr_stop(TMR_CANDLE);
   tmr_stop(TMR_INCOLOR);
@@ -304,9 +304,9 @@ void pb_clicked()
   }
 }
 
+/* The button is being held.  Change the color magnitude. */
 void pb_held()
 {
-  /* The button has been held.  Change the color magnitude. */
   if (bright_up) {
     if (bright == BRIGHT_TOP)
       bright_up = 0;
@@ -444,28 +444,28 @@ void user_tasks(unsigned char block)
 
   while ((tid = task_get(block)) >= 0) {
     switch (tid) {
-      case TASK_BTN_PB:         /* pushbutton state change */
+      case TASK_BTN_PB:
         pb_task();
         break;
-      case TASK_BTN_RS:         /* rocker switch state change */
+      case TASK_BTN_RS:
         rs_task();
         break;
-      case TASK_BTN_PB_HELD:    /* pushbutton is being held down */
+      case TASK_BTN_PB_HELD:
         pb_held_task();
         break;
-      case TASK_FADE:           /* fade timer has fired */
+      case TASK_FADE:
         fade_task();
         break;
-      case TASK_INCOLOR:        /* in-color timer has fired */
+      case TASK_INCOLOR:
         start_fade();
         break;
-      case TASK_CANDLE:         /* periodic adjustment for candle flicker */
+      case TASK_CANDLE:
         candle_task();
         break;
-      case TASK_TMR32:          /* auto on/off event */
+      case TASK_TMR32:
         auto_offon_task();
         break;
-      case TASK_CFG:            /* Save config to EEPROM event */
+      case TASK_CFG:
         cfg_write();
         break;
     }