1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-18 08:54:15 +01:00

OP-174 ET OSD support - fix for writing configurations - temp workaround for what seems to be an issue with I2C driver OP-305

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2986 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
FredericG 2011-03-06 11:19:29 +00:00 committed by FredericG
parent 7c4f29508b
commit 5554973cea

View File

@ -267,12 +267,16 @@ static bool Write(uint32_t start, uint8_t length, const uint8_t * buffer)
ack[0] = 0;
if (PIOS_I2C_Transfer(PIOS_I2C_MAIN_ADAPTER, txn_list1, NELEMENTS(txn_list1))) {
//
// FIXME: See OP-305, the driver seems to return FALSE while all is OK
//
PIOS_I2C_Transfer(PIOS_I2C_MAIN_ADAPTER, txn_list1, NELEMENTS(txn_list1));
// if (PIOS_I2C_Transfer(PIOS_I2C_MAIN_ADAPTER, txn_list1, NELEMENTS(txn_list1))) {
//DEBUG_MSG("ACK=%d ", ack[0]);
if (ack[0] == 49) {
return TRUE;
}
}
// }
return FALSE;
}
@ -320,6 +324,8 @@ static void UpdateConfig(void)
DEBUG_MSG(".");
addr += n;
}
} else {
DEBUG_MSG(" FILEREAD FAILED ");
}
}