From: sdhsdh Date: Wed, 16 Sep 2009 00:18:05 +0000 (+0000) Subject: - basestation fixes X-Git-Tag: rc_6_tinyos_2_1_1~263 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=fffd345e6fa1693873307844887c4370a0d75bb4 - basestation fixes --- diff --git a/apps/IPBaseStation/BaseStationC.nc b/apps/IPBaseStation/BaseStationC.nc index aa36022e..8c53be0a 100644 --- a/apps/IPBaseStation/BaseStationC.nc +++ b/apps/IPBaseStation/BaseStationC.nc @@ -84,10 +84,19 @@ z * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT * @author Philip Levis * @date August 10 2005 */ +#include 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; diff --git a/apps/IPBaseStation/BaseStationP.nc b/apps/IPBaseStation/BaseStationP.nc index 20008a99..dfe80cd4 100644 --- a/apps/IPBaseStation/BaseStationP.nc +++ b/apps/IPBaseStation/BaseStationP.nc @@ -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) {