changed RSSI samples count to maximum (=16)

This commit is contained in:
zhitao 2008-11-17 16:14:09 +00:00
parent 3c0d67c14f
commit 0be308b7ce
2 changed files with 3 additions and 8 deletions

View File

@ -186,7 +186,7 @@ const uint8_t cc1020_config_115200[41] = {
0x4C, // 0x0F, AFC_CONTROL Ruetten 0xCC 0x4C, // 0x0F, AFC_CONTROL Ruetten 0xCC
0x80, // 0x10, FILTER Bandwith 500 kHz 0x80, // 0x10, FILTER Bandwith 500 kHz
0x61, // 0x11, VGA1 0x61, // 0x11, VGA1
0x55, // 0x12, VGA2 0x57, // 0x12, VGA2
0x30, // 0x13, VGA3 0x30, // 0x13, VGA3
0x35, // 0x14, VGA4 0x35, // 0x14, VGA4
0x20, // 0x15, LOCK is Carrier SENSE 0x20, // 0x15, LOCK is Carrier SENSE

View File

@ -1,7 +1,7 @@
/* /*
Copyright 2006, Freie Universitaet Berlin. All rights reserved. Copyright 2006, Freie Universitaet Berlin. All rights reserved.
These sources were developed at the Freie Universität Berlin, Computer These sources were developed at the Freie Universit<EFBFBD>t Berlin, Computer
Systems and Telematics group. Systems and Telematics group.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
@ -45,7 +45,7 @@ Berlin, 2006
* @file cc1020.c * @file cc1020.c
* @author FUB ScatterWeb Developers, Michael Baar, Nicolas Tsiftes * @author FUB ScatterWeb Developers, Michael Baar, Nicolas Tsiftes
* *
* Taken from ScatterWeb² 1.1 and modified/reformatted for Contiki 2.0 * Taken from ScatterWeb<EFBFBD> 1.1 and modified/reformatted for Contiki 2.0
**/ **/
#include <stdio.h> #include <stdio.h>
@ -474,11 +474,6 @@ interrupt(UART0RX_VECTOR) cc1020_rxhandler(void)
} else { } else {
return; return;
} }
/*
* Update RSSI.
* TODO: add sampling/averaging of several RSSI to get
* more reliable RSSI values.
*/
rssi = cc1020_read_reg(CC1020_RSS); rssi = cc1020_read_reg(CC1020_RSS);
CC1020_SET_OPSTATE(CC1020_RX | CC1020_RX_RECEIVING); CC1020_SET_OPSTATE(CC1020_RX | CC1020_RX_RECEIVING);
} else if (cc1020_state & CC1020_RX_RECEIVING) { } else if (cc1020_state & CC1020_RX_RECEIVING) {