1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #523 from mehlis/trickle

trickle: replace call to pow (base of 2)
This commit is contained in:
Oleg Hahm 2014-01-20 09:44:29 -08:00
commit caa947dcec

View File

@ -99,7 +99,7 @@ void start_trickle(uint8_t DIOIntMin, uint8_t DIOIntDoubl,
{
c = 0;
k = DIORedundancyConstant;
Imin = pow(2, DIOIntMin);
Imin = (1 << DIOIntMin);
Imax = DIOIntDoubl;
/* Eigentlich laut Spezifikation erste Bestimmung von I wie auskommentiert: */
/* I = Imin + ( rand() % ( (Imin << Imax) - Imin + 1 ) ); */