]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/platforms/eyesIFX/net/lqi/CC2420ActiveMessageC.nc
limit good quality to prevent count to infinity problem
[tinyos-2.x.git] / tos / platforms / eyesIFX / net / lqi / CC2420ActiveMessageC.nc
index 36940eba3c48c0918266e8e26301fbf0ff6ca6ac..50121a5937da9290e626cf698e04b1a229016a5c 100644 (file)
@@ -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);
     }
 }