We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04ac94c commit 6211d25Copy full SHA for 6211d25
devices/Max44009/Max44009.cs
@@ -85,7 +85,7 @@ private double GetIlluminance()
85
byte exponent = (byte)((readBuff[0] & 0b_1111_0000) >> 4);
86
byte mantissa = (byte)(((readBuff[0] & 0b_0000_1111) << 4) | (readBuff[1]) & 0b_0000_1111);
87
88
- double lux = Math.Pow(2, exponent) * mantissa * 0.045;
+ double lux = Math.Pow(2.0, exponent) * mantissa * 0.045;
89
90
return Math.Round(lux * 1000) / 1000.0;
91
}
0 commit comments