Hi

When using Leds.set, there is no dbg message in HEAD. I believe there
should be. The following patch (against HEAD - but I think the code is the
same in 1.1, as it was a student working with 1.1 that had troubles) tries
to correct this.

Please tell me if I should redirect this elsewhere:

Index: LedsC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/tos/system/LedsC.nc,v
retrieving revision 1.3
diff -u -r1.3 LedsC.nc
--- LedsC.nc    20 Jun 2003 17:00:21 -0000      1.3
+++ LedsC.nc    16 Sep 2003 10:40:40 -0000
@@ -187,18 +187,27 @@
   async command result_t Leds.set(uint8_t ledsNum) {
     atomic {
       ledsOn = (ledsNum & 0x7);
-      if (ledsOn & GREEN_BIT)
+      if (ledsOn & GREEN_BIT) {
+       dbg(DBG_LED, "LEDS: Green on.\n");
        TOSH_CLR_GREEN_LED_PIN();
-      else
+      } else {
+       dbg(DBG_LED, "LEDS: Green off.\n");
        TOSH_SET_GREEN_LED_PIN();
-      if (ledsOn & YELLOW_BIT )
+      }
+      if (ledsOn & YELLOW_BIT ) {
+       dbg(DBG_LED, "LEDS: Yellow on.\n");
        TOSH_CLR_YELLOW_LED_PIN();
-      else
+      } else {
+       dbg(DBG_LED, "LEDS: Yellow off.\n");
        TOSH_SET_YELLOW_LED_PIN();
-      if (ledsOn & RED_BIT)
+      }
+      if (ledsOn & RED_BIT) {
+       dbg(DBG_LED, "LEDS: Red on.\n");
        TOSH_CLR_RED_LED_PIN();
-      else
+      } else {
+       dbg(DBG_LED, "LEDS: Red off.\n");
        TOSH_SET_RED_LED_PIN();
+      }
     }
     return SUCCESS;
   }


Regards,

Mads

-- 
+----------------------------------------------------------------------+
|  Mads Bondo Dydensborg.               http://www.distlab.dk/madsdyd/ |
|  +45 35 32 14 18                                                     |
+----------------------------------------------------------------------+
_______________________________________________
Tinyos-users mailing list
[EMAIL PROTECTED]
http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-users

Reply via email to