From: andreaskoepke Date: Fri, 24 Oct 2008 10:07:10 +0000 (+0000) Subject: limit good quality to prevent count to infinity problem X-Git-Tag: rc_6_tinyos_2_1_1~581 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=7e5c42f3c3e5c393d801460c7e2b5bf7bd42fb61 limit good quality to prevent count to infinity problem --- diff --git a/tos/platforms/eyesIFX/net/lqi/CC2420ActiveMessageC.nc b/tos/platforms/eyesIFX/net/lqi/CC2420ActiveMessageC.nc index 36940eba..50121a59 100644 --- a/tos/platforms/eyesIFX/net/lqi/CC2420ActiveMessageC.nc +++ b/tos/platforms/eyesIFX/net/lqi/CC2420ActiveMessageC.nc @@ -56,6 +56,7 @@ implementation { async command uint8_t CC2420Packet.getLqi( message_t* p_msg ) { uint32_t s = (getMetadata(p_msg))->strength; if(s > 60) s = 10; + if(s > 22) s = 22; return (s*13/5 + 48); } }