Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TestBenchSerenity-proto_F429ZI TestBenchFlow HSPFLOW1 TestBenchFlow1 ... more
Diff: sensirion_sf04.cpp
- Revision:
- 7:0c1bbd80bec3
- Parent:
- 5:1243b362ece8
--- 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;