I would say that the code "while(size > 0)" is never executed and count
is always equal to 0. Or maybe it is finally simply congruent to 0 [8]
depending of the value of length.
On Mon, 2007-10-15 at 03:04 +0530, Bhavish Aggarwal wrote:
> Hi,
>
> I am facing a very strange issue with Leds.
>
> In the following code, the leds light up when i give a constant value.
> But not when I give a variable. Can somebody help me with this.
>
> Bhavish
>
> The code is:
>
> uint8_t count = 0;
>
> while(!(call UartControl.isRxIntrPending()));
> length = call UartControl.rx();
> size = length;
>
> while(size > 0){
> while(!(call UartControl.isRxIntrPending()));
> packet[length - size] = call UartControl.rx();
> count++;
> size--;
> }
>
> call Leds.set(2 /*if i replace 2 by "count", the leds don't light up*/);
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help