]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
limit good quality to prevent count to infinity problem
authorandreaskoepke <andreaskoepke>
Fri, 24 Oct 2008 10:07:10 +0000 (10:07 +0000)
committerandreaskoepke <andreaskoepke>
Fri, 24 Oct 2008 10:07:10 +0000 (10:07 +0000)
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);
     }
 }