changed to use radio_sensor directly instead of a variable depending on interrupts
This commit is contained in:
parent
377ad07d77
commit
c40a2071f0
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* @(#)$Id: tr1001-gcr.c,v 1.11 2007/11/19 09:50:54 adamdunkels Exp $
|
* @(#)$Id: tr1001-gcr.c,v 1.12 2007/11/28 21:28:03 nifi Exp $
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* \addtogroup esb
|
* \addtogroup esb
|
||||||
|
@ -53,6 +53,7 @@
|
||||||
#include "contiki-esb.h"
|
#include "contiki-esb.h"
|
||||||
|
|
||||||
#include "dev/tr1001.h"
|
#include "dev/tr1001.h"
|
||||||
|
#include "dev/radio-sensor.h"
|
||||||
#include "lib/gcr.h"
|
#include "lib/gcr.h"
|
||||||
#include "lib/crc16.h"
|
#include "lib/crc16.h"
|
||||||
|
|
||||||
|
@ -444,7 +445,7 @@ PT_THREAD(tr1001_default_rxhandler_pt(unsigned char incoming_byte))
|
||||||
timer_restart(&rxtimer);
|
timer_restart(&rxtimer);
|
||||||
|
|
||||||
if(tr1001_rxstate == RXSTATE_RECEVING) {
|
if(tr1001_rxstate == RXSTATE_RECEVING) {
|
||||||
unsigned short signal = radio_sensor_signal;
|
unsigned short signal = radio_sensor.value(0);;
|
||||||
tmp_sstrength += (signal >> 2);
|
tmp_sstrength += (signal >> 2);
|
||||||
tmp_count++;
|
tmp_count++;
|
||||||
if(signal < tmp_sstrength_min) {
|
if(signal < tmp_sstrength_min) {
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* @(#)$Id: tr1001.c,v 1.8 2007/10/25 09:30:39 adamdunkels Exp $
|
* @(#)$Id: tr1001.c,v 1.9 2007/11/28 21:28:03 nifi Exp $
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* \addtogroup esb
|
* \addtogroup esb
|
||||||
|
@ -53,6 +53,7 @@
|
||||||
#include "contiki-esb.h"
|
#include "contiki-esb.h"
|
||||||
|
|
||||||
#include "dev/tr1001.h"
|
#include "dev/tr1001.h"
|
||||||
|
#include "dev/radio-sensor.h"
|
||||||
#include "lib/me.h"
|
#include "lib/me.h"
|
||||||
#include "lib/crc16.h"
|
#include "lib/crc16.h"
|
||||||
|
|
||||||
|
@ -415,7 +416,7 @@ PT_THREAD(tr1001_default_rxhandler_pt(unsigned char incoming_byte))
|
||||||
timer_restart(&rxtimer);
|
timer_restart(&rxtimer);
|
||||||
|
|
||||||
if(tr1001_rxstate == RXSTATE_RECEVING) {
|
if(tr1001_rxstate == RXSTATE_RECEVING) {
|
||||||
unsigned short signal = radio_sensor_signal;
|
unsigned short signal = radio_sensor.value(0);
|
||||||
tmp_sstrength += (signal >> 2);
|
tmp_sstrength += (signal >> 2);
|
||||||
tmp_count++;
|
tmp_count++;
|
||||||
if(signal < tmp_sstrength_min) {
|
if(signal < tmp_sstrength_min) {
|
||||||
|
|
Loading…
Reference in a new issue