From: idgay Date: Thu, 8 Feb 2007 17:52:32 +0000 (+0000) Subject: remove left adjustment X-Git-Tag: tinyos/2.0.1~183 X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=commitdiff_plain;h=ec51c4c7e2047662f805cbadd5cec240c705fdaa;p=tinyos-2.x.git remove left adjustment fix bug in ReadStream (only 1st request worked) --- diff --git a/tos/chips/atm128/adc/AdcP.nc b/tos/chips/atm128/adc/AdcP.nc index afb58823..fa918c7f 100644 --- a/tos/chips/atm128/adc/AdcP.nc +++ b/tos/chips/atm128/adc/AdcP.nc @@ -80,7 +80,7 @@ implementation { } void sample() { - call Atm128AdcSingle.getData(channel(), refVoltage(), TRUE, prescaler()); + call Atm128AdcSingle.getData(channel(), refVoltage(), FALSE, prescaler()); } error_t startGet(uint8_t newState, uint8_t newClient) { diff --git a/tos/chips/atm128/adc/AdcStreamP.nc b/tos/chips/atm128/adc/AdcStreamP.nc index 1db0bfe1..9435c30f 100644 --- a/tos/chips/atm128/adc/AdcStreamP.nc +++ b/tos/chips/atm128/adc/AdcStreamP.nc @@ -100,7 +100,7 @@ implementation { } void sample() { - call Atm128AdcSingle.getData(channel(), refVoltage(), TRUE, prescaler()); + call Atm128AdcSingle.getData(channel(), refVoltage(), FALSE, prescaler()); } command error_t ReadStream.postBuffer[uint8_t c](uint16_t *buf, uint16_t n) { @@ -123,6 +123,12 @@ implementation { uint8_t c = client; uint32_t actualPeriod = call Atm128Calibrate.actualMicro(period); + atomic + { + bufferQueue[c] = NULL; + bufferQueueEnd[c] = &bufferQueue[c]; + } + client = NSTREAM; signal ReadStream.readDone[c](SUCCESS, actualPeriod); } diff --git a/tos/chips/cc1000/CC1000RssiP.nc b/tos/chips/cc1000/CC1000RssiP.nc index 275bb2f8..ee6ccd08 100644 --- a/tos/chips/cc1000/CC1000RssiP.nc +++ b/tos/chips/cc1000/CC1000RssiP.nc @@ -100,9 +100,8 @@ implementation async event void ActualRssi.readDone(error_t result, uint16_t data) { atomic { - /* The code assumes that RSSI measurements are 10-bits - (legacy effect) */ - signal Rssi.readDone[currentOp](result, data >> 6); + /* The RSSI measurements are assumed to be 10-bits */ + signal Rssi.readDone[currentOp](result, data); startNextOp(); } }