Fix compile warning

This commit is contained in:
Theo Arends 2024-11-11 16:05:03 +01:00
parent 08f99de2a5
commit a013c7e36d
1 changed files with 3 additions and 3 deletions

View File

@ -45,7 +45,7 @@ bool MS5837::init(TwoWire &wirePort) {
_i2cPort->write(MS5837_PROM_READ+i*2); _i2cPort->write(MS5837_PROM_READ+i*2);
_i2cPort->endTransmission(); _i2cPort->endTransmission();
_i2cPort->requestFrom(MS5837_ADDR,2); _i2cPort->requestFrom(MS5837_ADDR, (uint8_t)2);
C[i] = (_i2cPort->read() << 8) | _i2cPort->read(); C[i] = (_i2cPort->read() << 8) | _i2cPort->read();
} }
@ -113,7 +113,7 @@ void MS5837::read() {
_i2cPort->write(MS5837_ADC_READ); _i2cPort->write(MS5837_ADC_READ);
_i2cPort->endTransmission(); _i2cPort->endTransmission();
_i2cPort->requestFrom(MS5837_ADDR,3); _i2cPort->requestFrom(MS5837_ADDR, (uint8_t)3);
D1_pres = 0; D1_pres = 0;
D1_pres = _i2cPort->read(); D1_pres = _i2cPort->read();
D1_pres = (D1_pres << 8) | _i2cPort->read(); D1_pres = (D1_pres << 8) | _i2cPort->read();
@ -130,7 +130,7 @@ void MS5837::read() {
_i2cPort->write(MS5837_ADC_READ); _i2cPort->write(MS5837_ADC_READ);
_i2cPort->endTransmission(); _i2cPort->endTransmission();
_i2cPort->requestFrom(MS5837_ADDR,3); _i2cPort->requestFrom(MS5837_ADDR, (uint8_t)3);
D2_temp = 0; D2_temp = 0;
D2_temp = _i2cPort->read(); D2_temp = _i2cPort->read();
D2_temp = (D2_temp << 8) | _i2cPort->read(); D2_temp = (D2_temp << 8) | _i2cPort->read();