Hi all,

I implemented an algorithm for regression based on SVM.
I tested all using Tossim and now I would like to verify the results using a
micaz mote.
I send the firmware to the mote but I have the following problem:
when mote boots with the event (called with Timer0.startOneShot( 250 ) )
-----
event void Timer0.fired()
{
    call Leds.led1On();
    ComputeSVM();
    call Leds.led2On();
}
-----

I see the green led (led1)  toggling!!! (I never see led2On)
Why?????
I have verified that the problem is inside a function of mine which is:
----
long compute_index(long int *binfeature, long int range, long int *index)
{
  int i=0,ii=0;
/*THE PROBLEM IS HERE: IF I PUT A NUMBER (e.g. 2) INSTEAD OF range THE
STATEMENT for WORKS WELL */
  for(i=0;i<range;i++) /* <----T
  {
    if(binfeature[i])
    {
       index[ii]=i;
       ii++;
    }
  }
  /* THE PROBLEM IS ALSO HERE WITH i AND ii VARIABLES
  for(i=0;i<4;i++) { <--------------------
    index[ii+i]=-1;
  }
  return ii;
}

------
I hope you can help me.
Thanks in advance.

Roberto
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to