]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - apps/BaseStation/BaseStationP.nc
copy src from radio to uart pkt
[tinyos-2.x.git] / apps / BaseStation / BaseStationP.nc
index a918a6db87437fd9ecb53e5d3383ffb54da3fd14..3395508ea731a97fc8c2dcf6350152c101eb14f8 100644 (file)
@@ -177,7 +177,7 @@ implementation
   task void uartSendTask() {
     uint8_t len;
     am_id_t id;
-    am_addr_t addr;
+    am_addr_t addr, src;
     message_t* msg;
     atomic
       if (uartIn == uartOut && !uartFull)
@@ -190,6 +190,8 @@ implementation
     tmpLen = len = call RadioPacket.payloadLength(msg);
     id = call RadioAMPacket.type(msg);
     addr = call RadioAMPacket.destination(msg);
+    src = call RadioAMPacket.source(msg);
+    call UartAMPacket.setSource(msg, src);
 
     if (call UartSend.send[id](addr, uartQueue[uartOut], len) == SUCCESS)
       call Leds.led1Toggle();