Reduced ETX_LIMIT in order to avoid overflows. Removed ETX_LOSS_PENALTY and set packet_etx to ETX_LIMIT instead upon packet loss.
This commit is contained in:
parent
a1e7d9c256
commit
6e28b1d3fb
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: neighbor-info.c,v 1.11 2010/09/15 15:59:52 nvt-se Exp $
|
||||
* $Id: neighbor-info.c,v 1.12 2010/10/21 19:46:21 nvt-se Exp $
|
||||
*/
|
||||
/**
|
||||
* \file
|
||||
|
@ -48,16 +48,10 @@
|
|||
#define PRINTF(...)
|
||||
#endif /* DEBUG */
|
||||
|
||||
#ifndef ETX_CONF_LIMIT
|
||||
#define ETX_LIMIT 31
|
||||
#else
|
||||
#define ETX_LIMIT ETX_CONF_LIMIT
|
||||
#endif /* !ETX_CONF_LIMIT */
|
||||
|
||||
#define ETX_LIMIT 15
|
||||
#define ETX_SCALE 100
|
||||
#define ETX_ALPHA 80
|
||||
#define ETX_ALPHA 70
|
||||
#define ETX_FIRST_GUESS 3
|
||||
#define ETX_LOSS_PENALTY ETX_LIMIT
|
||||
|
||||
#define ETX2FIX(etx) ((etx) << 4)
|
||||
#define FIX2ETX(fix) ((fix) >> 4)
|
||||
|
@ -135,7 +129,7 @@ neighbor_info_packet_sent(int status, int numtx)
|
|||
case MAC_TX_ERR:
|
||||
case MAC_TX_NOACK:
|
||||
default:
|
||||
packet_etx = numtx + ETX_LOSS_PENALTY;
|
||||
packet_etx = ETX_LIMIT;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue