]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Updated to work with the changes to the Packet interface
authorklueska <klueska>
Thu, 4 Oct 2007 16:43:08 +0000 (16:43 +0000)
committerklueska <klueska>
Thu, 4 Oct 2007 16:43:08 +0000 (16:43 +0000)
apps/tutorials/LowPowerSensing/Base/LowPowerSensingBaseC.nc
apps/tutorials/LowPowerSensing/Sampler/LowPowerSensingPeriodicSamplerC.nc

index 919b7a6daa8a9a63d113ced881a531b9b654e19f..48e2dc0245418a2d37a42f8af48bb75dad522304 100644 (file)
@@ -65,7 +65,7 @@ implementation {
 
   event void Boot.booted() {
     serialSending = FALSE;
-    sample_msg_payload = (serial_sample_msg_t*)call SerialPacket.getPayload(&sample_msg, NULL);
+    sample_msg_payload = (serial_sample_msg_t*)call SerialPacket.getPayload(&sample_msg, sizeof(serial_sample_msg_t));
     call RadioAMControl.start();
   }
   
index 17a1b1efca03166275e445b4d63a947d44e6016e..2fd455b3b7144a7fd28bc0910035f3b6bf16a460 100644 (file)
@@ -92,7 +92,7 @@ implementation {
   
   event void SampleLogRead.readDone(sensor_sample_t* sample, error_t error) {
     if(error == SUCCESS) {
-      nx_sensor_sample_t* nx_sample = call SampleSend.getPayload(&sample_msg);
+      nx_sensor_sample_t* nx_sample = call SampleSend.getPayload(&sample_msg, sizeof(nx_sample));
       call SampleNxConverter.copyToNx(nx_sample, sample);
       sendSampleMsg();
     }