Library to read/write Sensirion SF04 based gas/liquid flow sensors.

Dependents:   TestBenchSerenity-proto_F429ZI TestBenchFlow HSPFLOW1 TestBenchFlow1 ... more

Files at this revision

API Documentation at this revision

Comitter:
dmwahl
Date:
Thu Sep 16 20:46:51 2021 +0000
Parent:
6:585dc94d5161
Commit message:
Added static_cast<char>(____) to line 188 of sensirion_sf04.cpp

Changed in this revision

sensirion_sf04.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 585dc94d5161 -r 0c1bbd80bec3 sensirion_sf04.cpp
--- a/sensirion_sf04.cpp	Thu Sep 16 20:34:31 2021 +0000
+++ b/sensirion_sf04.cpp	Thu Sep 16 20:46:51 2021 +0000
@@ -185,7 +185,7 @@
         error=0;
         //-- write register to sensor --
         int writeAddr = (mi2cAddress | I2C_WRITE);
-        char dataWrite[3] = {(eSF04Register & ~0x01 | I2C_WRITE), pRegisterValue->s16.u8H, pRegisterValue->s16.u8L};
+        char dataWrite[3] = {static_cast<char>((eSF04Register & ~0x01 | I2C_WRITE)), pRegisterValue->s16.u8H, pRegisterValue->s16.u8L};
         i2c.write(writeAddr, dataWrite, 3);
     }
     ready = true;