wtf is this interface

This commit is contained in:
Robin Müller 2023-02-18 13:51:24 +01:00
parent 5f9eb01d94
commit 2d6622b8b8

View File

@ -102,13 +102,12 @@ ReturnValue_t I2cComIF::sendMessage(CookieIF* cookie, const uint8_t* sendData, s
if (fileHelper.getOpenResult() != returnvalue::OK) {
return fileHelper.getOpenResult();
}
int slaveFd = 0;
result = openI2cSlave(deviceFile, i2cAddress, slaveFd);
result = openI2cSlave(deviceFile, i2cAddress, fd);
if (result != returnvalue::OK) {
return result;
}
if (write(slaveFd, sendData, sendLen) != static_cast<int>(sendLen)) {
if (write(fd, sendData, sendLen) != static_cast<int>(sendLen)) {
i2cCookie->errorCounter++;
if (i2cCookie->errorCounter < 3) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
@ -161,8 +160,7 @@ ReturnValue_t I2cComIF::requestReceiveMessage(CookieIF* cookie, size_t requestLe
if (fileHelper.getOpenResult() != returnvalue::OK) {
return fileHelper.getOpenResult();
}
int slaveFd = 0;
result = openI2cSlave(deviceFile, i2cAddress, slaveFd);
result = openI2cSlave(deviceFile, i2cAddress, fd);
if (result != returnvalue::OK) {
return result;
}