Skip to content

Commit 428951c

Browse files
author
Hasnain Virk
committed
Warning remedy - forcing value to be a float
A warning was being generated that a float is being converted to a double. To mediate that we make sure that value stored is a float.
1 parent 56a4246 commit 428951c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

DummySensor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
class DS1820
2525
{
2626
public:
27-
DS1820(uint32_t) { value = 1.0; };
27+
DS1820(uint32_t) { value = 1.0f; };
2828
bool begin() { return true; };
2929
void startConversion() {};
3030
float read() {
31-
value += 1.1;
31+
value += 1.1f;
3232
return value;
3333
}
3434

0 commit comments

Comments
 (0)