]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - apps/MultihopOscilloscope/MultihopOscilloscopeC.nc
Cleaned and rewrote the RV8564 interface and module a little.
[tinyos-2.x.git] / apps / MultihopOscilloscope / MultihopOscilloscopeC.nc
index fab099031e6077b7c5f6c489762187276c11c7cf..a7f39ca62041355d2ea9e79c1667babab6b34023 100644 (file)
@@ -19,7 +19,7 @@
 #include "Timer.h"
 #include "MultihopOscilloscope.h"
 
-module MultihopOscilloscopeC {
+module MultihopOscilloscopeC @safe(){
   uses {
     // Interfaces for initialization:
     interface Boot;
@@ -265,7 +265,8 @@ implementation {
       data = 0xffff;
       report_problem();
     }
-    local.readings[reading++] = data;
+    if (reading < NREADINGS)
+      local.readings[reading++] = data;
   }