]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
- basestation fixes
authorsdhsdh <sdhsdh>
Wed, 16 Sep 2009 00:18:05 +0000 (00:18 +0000)
committersdhsdh <sdhsdh>
Wed, 16 Sep 2009 00:18:05 +0000 (00:18 +0000)
apps/IPBaseStation/BaseStationC.nc
apps/IPBaseStation/BaseStationP.nc

index aa36022ef6eeec6d9ea6fdad5ae693090665e5ae..8c53be0a541c47ac518c554dc2640d2f6ba809bb 100644 (file)
@@ -84,10 +84,19 @@ z * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
  * @author Philip Levis
  * @date August 10 2005
  */
+#include <Ieee154.h>
 
 configuration BaseStationC {
 }
 implementation {
+
+  enum {
+    // becasue we're the only one's using the radio, we're lazy and
+    // don't acquire the resource.  For some reason, it seems to crash
+    // occasionally if we don't do this.
+    RESOURCE_IDX = unique(IEEE154_SEND_CLIENT),
+  };
+
   components MainC, BaseStationP, LedsC;
   components Ieee154MessageC as Radio;
   components SerialDispatcherC as SerialControl, Serial802_15_4C as Serial;
index 20008a991e63eecd55d880b16d0cd7a0580d8db1..dfe80cd48065cf05ab3c3306423a319c1d96e9d9 100644 (file)
@@ -111,7 +111,7 @@ implementation
   };
 
   uint16_t radioRetries = BLIP_L2_RETRIES;
-  uint16_t radioDelay   = 30;
+  uint16_t radioDelay   = BLIP_L2_DELAY;
 
   uint16_t serial_read;
   uint16_t radio_read;
@@ -306,7 +306,6 @@ implementation
 #if defined(PLATFORM_TELOS) || defined(PLATFORM_TELOSB) || defined(PLATFORM_EPIC)
     WDTCTL = WDT_ARST_1000;
 #endif
-
     atomic
       if (!radioFull)
        {